summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/ajax
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-06-17 20:08:40 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-06-18 14:41:16 +0200
commite06fa200b394162f2a30a481a8b1423685182863 (patch)
tree787db396b2837193f0dc2032ce85397b42cfa678 /apps/files_trashbin/ajax
parentb486f48fbca0d8659d720bd37d6422d01bc09420 (diff)
downloadnextcloud-server-e06fa200b394162f2a30a481a8b1423685182863.tar.gz
nextcloud-server-e06fa200b394162f2a30a481a8b1423685182863.zip
make sure that we always use the right user
Diffstat (limited to 'apps/files_trashbin/ajax')
-rw-r--r--apps/files_trashbin/ajax/delete.php2
-rw-r--r--apps/files_trashbin/ajax/list.php2
-rw-r--r--apps/files_trashbin/ajax/undelete.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_trashbin/ajax/delete.php b/apps/files_trashbin/ajax/delete.php
index ebabc5bc7a2..9d9c1dd100f 100644
--- a/apps/files_trashbin/ajax/delete.php
+++ b/apps/files_trashbin/ajax/delete.php
@@ -37,7 +37,7 @@ foreach ($list as $file) {
$timestamp = null;
}
- OCA\Files_Trashbin\Trashbin::delete($filename, $timestamp);
+ OCA\Files_Trashbin\Trashbin::delete($filename, \OCP\User::getUser(), $timestamp);
if (OCA\Files_Trashbin\Trashbin::file_exists($filename, $timestamp)) {
$error[] = $filename;
OC_Log::write('trashbin','can\'t delete ' . $filename . ' permanently.', OC_Log::ERROR);
diff --git a/apps/files_trashbin/ajax/list.php b/apps/files_trashbin/ajax/list.php
index e1f52e814bb..6cad101d34a 100644
--- a/apps/files_trashbin/ajax/list.php
+++ b/apps/files_trashbin/ajax/list.php
@@ -10,7 +10,7 @@ $data = array();
// make filelist
try {
- $files = \OCA\Files_Trashbin\Helper::getTrashFiles($dir, $sortAttribute, $sortDirection);
+ $files = \OCA\Files_Trashbin\Helper::getTrashFiles($dir, \OCP\User::getUser(), $sortAttribute, $sortDirection);
} catch (Exception $e) {
header("HTTP/1.0 404 Not Found");
exit();
diff --git a/apps/files_trashbin/ajax/undelete.php b/apps/files_trashbin/ajax/undelete.php
index 2b00078669e..afab79fcac6 100644
--- a/apps/files_trashbin/ajax/undelete.php
+++ b/apps/files_trashbin/ajax/undelete.php
@@ -16,7 +16,7 @@ if (isset($_POST['allfiles']) and $_POST['allfiles'] === 'true') {
if ($dir === '' || $dir === '/') {
$dirListing = false;
}
- foreach (OCA\Files_Trashbin\Helper::getTrashFiles($dir) as $file) {
+ foreach (OCA\Files_Trashbin\Helper::getTrashFiles($dir, \OCP\User::getUser()) as $file) {
$fileName = $file['name'];
if (!$dirListing) {
$fileName .= '.d' . $file['mtime'];