|
|
|
|
@ -7,15 +7,15 @@ OCP\JSON::checkLoggedIn(); |
|
|
|
|
OCP\JSON::callCheck(); |
|
|
|
|
|
|
|
|
|
// Get data |
|
|
|
|
$dir = stripslashes($_GET["dir"]); |
|
|
|
|
$files = isset($_GET["file"]) ? stripslashes($_GET["file"]) : stripslashes($_GET["files"]); |
|
|
|
|
$dir = stripslashes($_POST["dir"]); |
|
|
|
|
$files = isset($_POST["file"]) ? stripslashes($_POST["file"]) : stripslashes($_POST["files"]); |
|
|
|
|
|
|
|
|
|
$files = explode(';', $files); |
|
|
|
|
$filesWithError = ''; |
|
|
|
|
$success = true; |
|
|
|
|
//Now delete |
|
|
|
|
foreach($files as $file) { |
|
|
|
|
if( !OC_Files::delete( $dir, $file )) { |
|
|
|
|
if( !OC_Files::delete( $dir, $file )) { |
|
|
|
|
$filesWithError .= $file . "\n"; |
|
|
|
|
$success = false; |
|
|
|
|
} |
|
|
|
|
|