Skip to content
Snippets Groups Projects
Commit dd2ef47e authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #9168 from owncloud/files-phpwarningondelete

Remove warning when deleting all entries
parents d1823411 c98b7fe7
Branches
No related tags found
No related merge requests found
......@@ -7,20 +7,17 @@ OCP\JSON::callCheck();
// Get data
$dir = stripslashes($_POST["dir"]);
$files = isset($_POST["file"]) ? $_POST["file"] : $_POST["files"];
$allFiles = isset($_POST["allfiles"]) ? $_POST["allfiles"] : false;
if ($allFiles === 'true') {
$allFiles = true;
}
// delete all files in dir ?
if ($allFiles) {
if ($allFiles === 'true') {
$files = array();
$fileList = \OC\Files\Filesystem::getDirectoryContent($dir);
foreach ($fileList as $fileInfo) {
$files[] = $fileInfo['name'];
}
} else {
$files = isset($_POST["file"]) ? $_POST["file"] : $_POST["files"];
$files = json_decode($files);
}
$filesWithError = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment