fix $$ bug
parent
8d6864f145
commit
c48ebba178
|
@ -60,9 +60,9 @@ class Onedrive {
|
||||||
//$content1 = curl('GET', $parentfiles['children'][$filename][$this->DownurlStrName]);
|
//$content1 = curl('GET', $parentfiles['children'][$filename][$this->DownurlStrName]);
|
||||||
//$parentfiles['children'][$filename]['content'] = $content1;
|
//$parentfiles['children'][$filename]['content'] = $content1;
|
||||||
//savecache('path_' . $parentpath, $parentfiles, $this->disktag);
|
//savecache('path_' . $parentpath, $parentfiles, $this->disktag);
|
||||||
if ($$parentfiles['children'][$filename]['size']<1024*1024) {
|
if ($parentfiles['children'][$filename]['size']<1024*1024) {
|
||||||
if (!(isset($$parentfiles['children'][$filename]['content'])&&$$parentfiles['children'][$filename]['content']['stat']==200)) {
|
if (!(isset($parentfiles['children'][$filename]['content'])&&$parentfiles['children'][$filename]['content']['stat']==200)) {
|
||||||
$content1 = curl('GET', $$parentfiles['children'][$filename][$this->DownurlStrName]);
|
$content1 = curl('GET', $parentfiles['children'][$filename][$this->DownurlStrName]);
|
||||||
$tmp = null;
|
$tmp = null;
|
||||||
$tmp = json_decode(json_encode($content1), true);
|
$tmp = json_decode(json_encode($content1), true);
|
||||||
if ($tmp['body']===null) {
|
if ($tmp['body']===null) {
|
||||||
|
@ -71,12 +71,12 @@ class Onedrive {
|
||||||
$tmp = json_decode(json_encode($tmp), true);
|
$tmp = json_decode(json_encode($tmp), true);
|
||||||
if ($tmp['body']) $content1['body'] = $tmp['body'];
|
if ($tmp['body']) $content1['body'] = $tmp['body'];
|
||||||
}
|
}
|
||||||
$$parentfiles['children'][$filename]['content'] = $content1;
|
$parentfiles['children'][$filename]['content'] = $content1;
|
||||||
savecache('path_' . $path, $$parentfiles['children'][$filename], $this->disktag);
|
savecache('path_' . $path, $parentfiles['children'][$filename], $this->disktag);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$parentfiles['children'][$filename]['content']['stat'] = 202;
|
$parentfiles['children'][$filename]['content']['stat'] = 202;
|
||||||
$$parentfiles['children'][$filename]['content']['body'] = 'File too large.';
|
$parentfiles['children'][$filename]['content']['body'] = 'File too large.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue