parent
9e08f85c5e
commit
e2516a2b65
@ -0,0 +1,24 @@ |
||||
<?php |
||||
|
||||
OCP\JSON::checkLoggedIn(); |
||||
OCP\JSON::callCheck(); |
||||
|
||||
$file = $_REQUEST['file']; |
||||
|
||||
$path_parts = pathinfo($file); |
||||
if ($path_parts['dirname'] == '.') { |
||||
$delimiter = strrpos($file, '.d'); |
||||
$filename = substr($file, 0, $delimiter); |
||||
$timestamp = substr($file, $delimiter+2); |
||||
} else { |
||||
$filename = $file; |
||||
$timestamp = null; |
||||
} |
||||
sleep(5); |
||||
if (OCA_Trash\Trashbin::delete($filename, $timestamp)) { |
||||
error_log("feinifeini"); |
||||
OCP\JSON::success(array("data" => array("filename" => $file))); |
||||
} else { |
||||
OCP\JSON::error(array("data" => array("message" => "Couldn't delete ".$file. " permanently"))); |
||||
} |
||||
|
@ -1,3 +1,4 @@ |
||||
/* disable download and sharing actions */ |
||||
var disableDownloadActions = true; |
||||
var disableSharing = true; |
||||
var trashBinApp = true; |
Loading…
Reference in new issue