aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib/trashbin.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-12-06 18:27:46 +0100
committerRobin Appelman <icewind@owncloud.com>2013-12-06 18:27:46 +0100
commit9eca2471b3e8b75c21a1a8fd2a88c20c577c07bc (patch)
tree082f05cc105e5540c6ef642d9b3d6daaa64fd749 /apps/files_trashbin/lib/trashbin.php
parente888bdda30589d4d8c20bca3c1f962436794bf10 (diff)
parentb5939324b0053b6447423ebc8b269e9f773f7f02 (diff)
downloadnextcloud-server-9eca2471b3e8b75c21a1a8fd2a88c20c577c07bc.tar.gz
nextcloud-server-9eca2471b3e8b75c21a1a8fd2a88c20c577c07bc.zip
Merge branch 'master' into backgroundscan-reuse-etag
Diffstat (limited to 'apps/files_trashbin/lib/trashbin.php')
-rw-r--r--apps/files_trashbin/lib/trashbin.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 48d43b059fa..567f88b91b1 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -778,8 +778,13 @@ class Trashbin {
*/
private static function expire($trashbinSize, $user) {
+ // let the admin disable auto expire
+ $autoExpire = \OC_Config::getValue('trashbin_auto_expire', true);
+ if ($autoExpire === false) {
+ return 0;
+ }
+
$user = \OCP\User::getUser();
- $view = new \OC\Files\View('/' . $user);
$availableSpace = self::calculateFreeSpace($trashbinSize);
$size = 0;