From 6b7fdda4f5b11c1ec92cd66270c2aa37f7324432 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 4 Dec 2013 14:20:29 +0100 Subject: config switch to disable auto expire for the trash bin --- apps/files_trashbin/lib/trashbin.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apps/files_trashbin/lib/trashbin.php') 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; -- cgit v1.2.3