config switch to disable auto expire for the trash bin

This commit is contained in:
Bjoern Schiessle 2013-12-04 14:20:29 +01:00
parent 8fdbb98899
commit 6b7fdda4f5
2 changed files with 11 additions and 3 deletions

View File

@ -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;

View File

@ -117,6 +117,9 @@ $CONFIG = array(
/* How long should ownCloud keep deleted files in the trash bin, default value: 30 days */
'trashbin_retention_obligation' => 30,
/* Disable/Enable auto expire for the trash bin, by default auto expire is enabled */
'trashbin_auto_expire' => true,
/* allow user to change his display name, if it is supported by the back-end */
'allow_user_to_change_display_name' => true,