]> source.dussan.org Git - nextcloud-server.git/commitdiff
some final code clean-up
authorBjörn Schießle <schiessle@owncloud.com>
Mon, 25 Feb 2013 13:12:56 +0000 (14:12 +0100)
committerBjörn Schießle <schiessle@owncloud.com>
Mon, 25 Feb 2013 13:12:56 +0000 (14:12 +0100)
apps/files_trashbin/lib/trash.php

index d4ab5ee7dbcee8f9b139d5314911a26d3fe2eca3..5963f9a1b7c8c04f216a8e12a78490e885c57401 100644 (file)
@@ -56,8 +56,9 @@ class Trashbin {
                } else {\r
                        $type = 'file';\r
                }
-               \r
-               if (  ($trashbinSize = \OCP\Config::getAppValue('files_trashbin', 'size')) === null ) {\r
+               
+               $trashbinSize = \OCP\Config::getAppValue('files_trashbin', 'size');\r
+               if ( $trashbinSize === null ) {\r
                        $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 ) {\r
+               $trashbinSize = \OCP\Config::getAppValue('files_trashbin', 'size');
+               if ( $trashbinSize === null ) {\r
                        $trashbinSize = self::calculateSize(new \OC_FilesystemView('/'. $user.'/files_trashbin'));
                }
                if ( $timestamp ) {
@@ -242,7 +244,8 @@ class Trashbin {
                $view = new \OC_FilesystemView('/'.$user);
                $size = 0;\r
        
-               if (  ($trashbinSize = \OCP\Config::getAppValue('files_trashbin', 'size')) === null ) {\r
+               $trashbinSize = \OCP\Config::getAppValue('files_trashbin', 'size');
+               if ( $trashbinSize === null ) {\r
                        $trashbinSize = self::calculateSize(new \OC_FilesystemView('/'. $user.'/files_trashbin'));
                }