some final code clean-up

This commit is contained in:
Björn Schießle 2013-02-25 14:12:56 +01:00
parent 7ebbecd81f
commit 7da97550df
1 changed files with 7 additions and 4 deletions

View File

@ -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'));
}