summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2013-12-04 07:44:02 -0800
committerBjörn Schießle <bjoern@schiessle.org>2013-12-04 07:44:02 -0800
commit737b9a990f73ffe362cbe03b2878f8a633414336 (patch)
treeddc487bdbd852f79d2324002b7b18482d353ad0d /apps
parent36bc6b871f7dbd27e5b764d7a218bfab6dba96c8 (diff)
parent6b7fdda4f5b11c1ec92cd66270c2aa37f7324432 (diff)
downloadnextcloud-server-737b9a990f73ffe362cbe03b2878f8a633414336.tar.gz
nextcloud-server-737b9a990f73ffe362cbe03b2878f8a633414336.zip
Merge pull request #6181 from owncloud/auto_expire_trash
config switch to disable auto expire for the trash bin
Diffstat (limited to 'apps')
-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;