diff options
Diffstat (limited to 'apps/files_trashbin/ajax')
-rw-r--r-- | apps/files_trashbin/ajax/delete.php | 4 | ||||
-rw-r--r-- | apps/files_trashbin/ajax/list.php | 6 | ||||
-rw-r--r-- | apps/files_trashbin/ajax/undelete.php | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_trashbin/ajax/delete.php b/apps/files_trashbin/ajax/delete.php index 72553fa0ee0..812c5029698 100644 --- a/apps/files_trashbin/ajax/delete.php +++ b/apps/files_trashbin/ajax/delete.php @@ -7,7 +7,7 @@ OCP\JSON::callCheck(); $folder = isset($_POST['dir']) ? $_POST['dir'] : '/'; // "empty trash" command -if (isset($_POST['allfiles']) and $_POST['allfiles'] === 'true'){ +if (isset($_POST['allfiles']) && (string)$_POST['allfiles'] === 'true'){ $deleteAll = true; if ($folder === '/' || $folder === '') { OCA\Files_Trashbin\Trashbin::deleteAll(); @@ -19,7 +19,7 @@ if (isset($_POST['allfiles']) and $_POST['allfiles'] === 'true'){ } else { $deleteAll = false; - $files = $_POST['files']; + $files = (string)$_POST['files']; $list = json_decode($files); } diff --git a/apps/files_trashbin/ajax/list.php b/apps/files_trashbin/ajax/list.php index e25301a26cb..0a78b44fd9a 100644 --- a/apps/files_trashbin/ajax/list.php +++ b/apps/files_trashbin/ajax/list.php @@ -4,9 +4,9 @@ OCP\JSON::checkLoggedIn(); \OC::$server->getSession()->close(); // Load the files -$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; -$sortAttribute = isset( $_GET['sort'] ) ? $_GET['sort'] : 'name'; -$sortDirection = isset( $_GET['sortdirection'] ) ? ($_GET['sortdirection'] === 'desc') : false; +$dir = isset($_GET['dir']) ? (string)$_GET['dir'] : ''; +$sortAttribute = isset($_GET['sort']) ? (string)$_GET['sort'] : 'name'; +$sortDirection = isset($_GET['sortdirection']) ? ($_GET['sortdirection'] === 'desc') : false; $data = array(); // make filelist diff --git a/apps/files_trashbin/ajax/undelete.php b/apps/files_trashbin/ajax/undelete.php index ab7d57f5a7f..558761680cc 100644 --- a/apps/files_trashbin/ajax/undelete.php +++ b/apps/files_trashbin/ajax/undelete.php @@ -7,10 +7,10 @@ OCP\JSON::callCheck(); $files = $_POST['files']; $dir = '/'; if (isset($_POST['dir'])) { - $dir = rtrim($_POST['dir'], '/'). '/'; + $dir = rtrim((string)$_POST['dir'], '/'). '/'; } $allFiles = false; -if (isset($_POST['allfiles']) and $_POST['allfiles'] === 'true') { +if (isset($_POST['allfiles']) && (string)$_POST['allfiles'] === 'true') { $allFiles = true; $list = array(); $dirListing = true; |