Update index.php
parent
3d717a7b1b
commit
761bc02fe3
|
@ -343,6 +343,7 @@ function adminoperate($path)
|
||||||
$data = '{"name":"' . $_GET['rename_newname'] . '"}';
|
$data = '{"name":"' . $_GET['rename_newname'] . '"}';
|
||||||
//echo $oldname;
|
//echo $oldname;
|
||||||
$result = MSAPI('PATCH',$oldname,$data,$_SERVER['access_token']);
|
$result = MSAPI('PATCH',$oldname,$data,$_SERVER['access_token']);
|
||||||
|
$cache->save('path_' . $path1, json_decode('{}',true), 1);
|
||||||
return output($result['body'], $result['stat']);
|
return output($result['body'], $result['stat']);
|
||||||
}
|
}
|
||||||
if ($_GET['delete_name']!='') {
|
if ($_GET['delete_name']!='') {
|
||||||
|
@ -351,6 +352,7 @@ function adminoperate($path)
|
||||||
$filename = path_format($path1 . '/' . $filename);
|
$filename = path_format($path1 . '/' . $filename);
|
||||||
//echo $filename;
|
//echo $filename;
|
||||||
$result = MSAPI('DELETE', $filename, '', $_SERVER['access_token']);
|
$result = MSAPI('DELETE', $filename, '', $_SERVER['access_token']);
|
||||||
|
$cache->save('path_' . $path1, json_decode('{}',true), 1);
|
||||||
return output($result['body'], $result['stat']);
|
return output($result['body'], $result['stat']);
|
||||||
}
|
}
|
||||||
if ($_GET['operate_action']==$constStr['encrypt'][$constStr['language']]) {
|
if ($_GET['operate_action']==$constStr['encrypt'][$constStr['language']]) {
|
||||||
|
@ -361,6 +363,7 @@ function adminoperate($path)
|
||||||
$filename = path_format($path1 . '/' . $foldername . '/' . getConfig('passfile'));
|
$filename = path_format($path1 . '/' . $foldername . '/' . getConfig('passfile'));
|
||||||
//echo $foldername;
|
//echo $foldername;
|
||||||
$result = MSAPI('PUT', $filename, $_GET['encrypt_newpass'], $_SERVER['access_token']);
|
$result = MSAPI('PUT', $filename, $_GET['encrypt_newpass'], $_SERVER['access_token']);
|
||||||
|
$cache->save('path_' . $path1, json_decode('{}',true), 1);
|
||||||
return output($result['body'], $result['stat']);
|
return output($result['body'], $result['stat']);
|
||||||
}
|
}
|
||||||
if ($_GET['move_folder']!='') {
|
if ($_GET['move_folder']!='') {
|
||||||
|
@ -374,6 +377,10 @@ function adminoperate($path)
|
||||||
$foldername = path_format('/'.urldecode($path1).'/'.$_GET['move_folder']);
|
$foldername = path_format('/'.urldecode($path1).'/'.$_GET['move_folder']);
|
||||||
$data = '{"parentReference":{"path": "/drive/root:'.$foldername.'"}}';
|
$data = '{"parentReference":{"path": "/drive/root:'.$foldername.'"}}';
|
||||||
$result = MSAPI('PATCH', $filename, $data, $_SERVER['access_token']);
|
$result = MSAPI('PATCH', $filename, $data, $_SERVER['access_token']);
|
||||||
|
$cache->save('path_' . $path1, json_decode('{}',true), 1);
|
||||||
|
if ($_GET['move_folder'] == '/../') $path2 = substr($path1, 0, strrpos($path1, '/'));
|
||||||
|
else $path2 = path_format( '/' . $path1 . '/' . $_GET['move_folder'] );
|
||||||
|
$cache->save('path_' . $path2, json_decode('{}',true), 1);
|
||||||
return output($result['body'], $result['stat']);
|
return output($result['body'], $result['stat']);
|
||||||
} else {
|
} else {
|
||||||
return output('{"error":"Can not Move!"}', 403);
|
return output('{"error":"Can not Move!"}', 403);
|
||||||
|
@ -403,6 +410,7 @@ function adminoperate($path)
|
||||||
$data = '{ "name": "' . $_GET['create_name'] . '", "folder": { }, "@microsoft.graph.conflictBehavior": "rename" }';
|
$data = '{ "name": "' . $_GET['create_name'] . '", "folder": { }, "@microsoft.graph.conflictBehavior": "rename" }';
|
||||||
$result = MSAPI('children', $path1, $data, $_SERVER['access_token']);
|
$result = MSAPI('children', $path1, $data, $_SERVER['access_token']);
|
||||||
}
|
}
|
||||||
|
$cache->save('path_' . $path1, json_decode('{}',true), 1);
|
||||||
return output($result['body'], $result['stat']);
|
return output($result['body'], $result['stat']);
|
||||||
}
|
}
|
||||||
return $tmparr;
|
return $tmparr;
|
||||||
|
|
Loading…
Reference in New Issue