summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-02-25 14:12:56 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-02-25 14:12:56 +0100
commit7da97550df61e7a82463b91139e8f18923765bc9 (patch)
tree06422ee2fa912096dd86bb72e9ec80e65513b7e5
parent7ebbecd81f433bfdd3353d7be26cb462af423eb7 (diff)
downloadnextcloud-server-7da97550df61e7a82463b91139e8f18923765bc9.tar.gz
nextcloud-server-7da97550df61e7a82463b91139e8f18923765bc9.zip
some final code clean-up
-rw-r--r--apps/files_trashbin/lib/trash.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/files_trashbin/lib/trash.php b/apps/files_trashbin/lib/trash.php
index d4ab5ee7dbc..5963f9a1b7c 100644
--- a/apps/files_trashbin/lib/trash.php
+++ b/apps/files_trashbin/lib/trash.php
@@ -56,8 +56,9 @@ class Trashbin {
} else {
$type = 'file';
}
-
- if ( ($trashbinSize = \OCP\Config::getAppValue('files_trashbin', 'size')) === null ) {
+
+ $trashbinSize = \OCP\Config::getAppValue('files_trashbin', 'size');
+ if ( $trashbinSize === null ) {
$trashbinSize = self::calculateSize(new \OC_FilesystemView('/'. $user.'/files_trashbin'));
}
$trashbinSize += self::copy_recursive($file_path, 'files_trashbin/files/'.$deleted.'.d'.$timestamp, $view);
@@ -133,7 +134,8 @@ class Trashbin {
$user = \OCP\User::getUser();
$view = new \OC_FilesystemView('/'.$user);
- if ( ($trashbinSize = \OCP\Config::getAppValue('files_trashbin', 'size')) === null ) {
+ $trashbinSize = \OCP\Config::getAppValue('files_trashbin', 'size');
+ if ( $trashbinSize === null ) {
$trashbinSize = self::calculateSize(new \OC_FilesystemView('/'. $user.'/files_trashbin'));
}
if ( $timestamp ) {
@@ -242,7 +244,8 @@ class Trashbin {
$view = new \OC_FilesystemView('/'.$user);
$size = 0;
- if ( ($trashbinSize = \OCP\Config::getAppValue('files_trashbin', 'size')) === null ) {
+ $trashbinSize = \OCP\Config::getAppValue('files_trashbin', 'size');
+ if ( $trashbinSize === null ) {
$trashbinSize = self::calculateSize(new \OC_FilesystemView('/'. $user.'/files_trashbin'));
}