diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-11-04 19:58:48 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-11-04 19:58:48 +0100 |
commit | 00bb246a0d90ddbcc1016fdedb5cf629bfbca70a (patch) | |
tree | f5d69cf10ef3fd157a21990a38515c03b74035a1 /lib/fileproxy | |
parent | df8c67721df1358eab7aa5794ef223a5bc8f0b59 (diff) | |
parent | 8ac3849a95bd6a733cce9134bab4bf38c5c0fadd (diff) | |
download | nextcloud-server-00bb246a0d90ddbcc1016fdedb5cf629bfbca70a.tar.gz nextcloud-server-00bb246a0d90ddbcc1016fdedb5cf629bfbca70a.zip |
merge from master
Diffstat (limited to 'lib/fileproxy')
-rw-r--r-- | lib/fileproxy/fileoperations.php | 2 | ||||
-rw-r--r-- | lib/fileproxy/quota.php | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/fileproxy/fileoperations.php b/lib/fileproxy/fileoperations.php index 23fb63fcfb1..516629adaec 100644 --- a/lib/fileproxy/fileoperations.php +++ b/lib/fileproxy/fileoperations.php @@ -28,7 +28,7 @@ class OC_FileProxy_FileOperations extends OC_FileProxy{ static $rootView; public function premkdir($path) { - if(!self::$rootView){ + if(!self::$rootView) { self::$rootView = new OC_FilesystemView(''); } return !self::$rootView->file_exists($path); diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php index 012be582a51..81376fb6fca 100644 --- a/lib/fileproxy/quota.php +++ b/lib/fileproxy/quota.php @@ -38,9 +38,9 @@ class OC_FileProxy_Quota extends OC_FileProxy{ if(in_array($user, $this->userQuota)) { return $this->userQuota[$user]; } - $userQuota=OC_Preferences::getValue($user,'files','quota','default'); + $userQuota=OC_Preferences::getValue($user,'files','quota', 'default'); if($userQuota=='default') { - $userQuota=OC_AppConfig::getValue('files','default_quota','none'); + $userQuota=OC_AppConfig::getValue('files','default_quota', 'none'); } if($userQuota=='none') { $this->userQuota[$user]=0; @@ -77,33 +77,33 @@ class OC_FileProxy_Quota extends OC_FileProxy{ return $totalSpace-$usedSpace; } - public function postFree_space($path,$space) { + public function postFree_space($path, $space) { $free=$this->getFreeSpace($path); if($free==0) { return $space; } - return min($free,$space); + return min($free, $space); } - public function preFile_put_contents($path,$data) { + public function preFile_put_contents($path, $data) { if (is_resource($data)) { $data = '';//TODO: find a way to get the length of the stream without emptying it } return (strlen($data)<$this->getFreeSpace($path) or $this->getFreeSpace($path)==0); } - public function preCopy($path1,$path2) { - if(!self::$rootView){ + public function preCopy($path1, $path2) { + if(!self::$rootView) { self::$rootView = new OC_FilesystemView(''); } return (self::$rootView->filesize($path1)<$this->getFreeSpace($path2) or $this->getFreeSpace($path2)==0); } - public function preFromTmpFile($tmpfile,$path) { + public function preFromTmpFile($tmpfile, $path) { return (filesize($tmpfile)<$this->getFreeSpace($path) or $this->getFreeSpace($path)==0); } - public function preFromUploadedFile($tmpfile,$path) { + public function preFromUploadedFile($tmpfile, $path) { return (filesize($tmpfile)<$this->getFreeSpace($path) or $this->getFreeSpace($path)==0); } } |