From 7da97550df61e7a82463b91139e8f18923765bc9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Mon, 25 Feb 2013 14:12:56 +0100 Subject: [PATCH] some final code clean-up --- apps/files_trashbin/lib/trash.php | 11 +++++++---- 1 file 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')); } -- 2.39.5