[Pkg-owncloud-commits] [owncloud] 40/49: config switch to disable auto expire for the trash bin
David Prévot
taffit at moszumanska.debian.org
Thu Dec 5 16:02:56 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit d3e2226b38d9df40e0f7c311f080ae633ad845df
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date: Wed Dec 4 14:20:29 2013 +0100
config switch to disable auto expire for the trash bin
---
apps/files_trashbin/lib/trashbin.php | 7 ++++++-
config/config.sample.php | 7 +++++--
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 48d43b0..567f88b 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;
diff --git a/config/config.sample.php b/config/config.sample.php
index 7b533a8..ba06896 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -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,
@@ -185,8 +188,8 @@ $CONFIG = array(
// "datadirectory" => "",
/* Enable maintenance mode to disable ownCloud
- If you want to prevent users to login to ownCloud before you start doing some maintenance work,
- you need to set the value of the maintenance parameter to true.
+ If you want to prevent users to login to ownCloud before you start doing some maintenance work,
+ you need to set the value of the maintenance parameter to true.
Please keep in mind that users who are already logged-in are kicked out of ownCloud instantly.
*/
"maintenance" => false,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list