Merge pull request #9168 from owncloud/files-phpwarningondelete
Remove warning when deleting all entries
This commit is contained in:
commit
dd2ef47ed3
|
@ -7,20 +7,17 @@ OCP\JSON::callCheck();
|
||||||
|
|
||||||
// Get data
|
// Get data
|
||||||
$dir = stripslashes($_POST["dir"]);
|
$dir = stripslashes($_POST["dir"]);
|
||||||
$files = isset($_POST["file"]) ? $_POST["file"] : $_POST["files"];
|
|
||||||
$allFiles = isset($_POST["allfiles"]) ? $_POST["allfiles"] : false;
|
$allFiles = isset($_POST["allfiles"]) ? $_POST["allfiles"] : false;
|
||||||
if ($allFiles === 'true') {
|
|
||||||
$allFiles = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// delete all files in dir ?
|
// delete all files in dir ?
|
||||||
if ($allFiles) {
|
if ($allFiles === 'true') {
|
||||||
$files = array();
|
$files = array();
|
||||||
$fileList = \OC\Files\Filesystem::getDirectoryContent($dir);
|
$fileList = \OC\Files\Filesystem::getDirectoryContent($dir);
|
||||||
foreach ($fileList as $fileInfo) {
|
foreach ($fileList as $fileInfo) {
|
||||||
$files[] = $fileInfo['name'];
|
$files[] = $fileInfo['name'];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$files = isset($_POST["file"]) ? $_POST["file"] : $_POST["files"];
|
||||||
$files = json_decode($files);
|
$files = json_decode($files);
|
||||||
}
|
}
|
||||||
$filesWithError = '';
|
$filesWithError = '';
|
||||||
|
|
Loading…
Reference in New Issue