diff options
author | Felix Moeller <mail@felixmoeller.de> | 2012-10-28 23:58:08 +0100 |
---|---|---|
committer | Felix Moeller <mail@felixmoeller.de> | 2012-10-28 23:58:08 +0100 |
commit | dfc8228fb47220e9fe107368da2ebd5da79e780a (patch) | |
tree | fb9ee5821bb9d1ca1058336d796a5d00de3a9cb5 /lib/filesystemview.php | |
parent | e5a74903e453e0628a1544ddc37ee05454a38462 (diff) | |
download | nextcloud-server-dfc8228fb47220e9fe107368da2ebd5da79e780a.tar.gz nextcloud-server-dfc8228fb47220e9fe107368da2ebd5da79e780a.zip |
NoSpaceAfterComma
Diffstat (limited to 'lib/filesystemview.php')
-rw-r--r-- | lib/filesystemview.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/filesystemview.php b/lib/filesystemview.php index 872da992fab..dbb6681656f 100644 --- a/lib/filesystemview.php +++ b/lib/filesystemview.php @@ -142,7 +142,7 @@ class OC_FilesystemView { * @return string */ public function getLocalFile($path) { - $parent=substr($path, 0, strrpos($path,'/')); + $parent=substr($path, 0, strrpos($path, '/')); if(OC_Filesystem::isValidPath($parent) and $storage=$this->getStorage($path)) { return $storage->getLocalFile($this->getInternalPath($path)); } @@ -152,7 +152,7 @@ class OC_FilesystemView { * @return string */ public function getLocalFolder($path) { - $parent=substr($path, 0, strrpos($path,'/')); + $parent=substr($path, 0, strrpos($path, '/')); if(OC_Filesystem::isValidPath($parent) and $storage=$this->getStorage($path)) { return $storage->getLocalFolder($this->getInternalPath($path)); } @@ -215,13 +215,13 @@ class OC_FilesystemView { * @deprecated Replaced by isReadable() as part of CRUDS */ public function is_readable($path) { - return $this->basicOperation('isReadable',$path); + return $this->basicOperation('isReadable', $path); } /** * @deprecated Replaced by isCreatable(), isUpdatable(), isDeletable() as part of CRUDS */ public function is_writable($path) { - return $this->basicOperation('isUpdatable',$path); + return $this->basicOperation('isUpdatable', $path); } public function isCreatable($path) { return $this->basicOperation('isCreatable', $path); @@ -325,8 +325,8 @@ class OC_FilesystemView { return $this->basicOperation( 'deleteAll', $directory, array('delete'), $empty ); } public function rename($path1, $path2) { - $postFix1=(substr($path1,-1,1)==='/')?'/':''; - $postFix2=(substr($path2,-1,1)==='/')?'/':''; + $postFix1=(substr($path1, -1, 1)==='/')?'/':''; + $postFix2=(substr($path2, -1, 1)==='/')?'/':''; $absolutePath1 = OC_Filesystem::normalizePath($this->getAbsolutePath($path1)); $absolutePath2 = OC_Filesystem::normalizePath($this->getAbsolutePath($path2)); if(OC_FileProxy::runPreProxies('rename', $absolutePath1, $absolutePath2) and OC_Filesystem::isValidPath($path2)) { @@ -377,8 +377,8 @@ class OC_FilesystemView { } } public function copy($path1, $path2) { - $postFix1=(substr($path1,-1,1)==='/')?'/':''; - $postFix2=(substr($path2,-1,1)==='/')?'/':''; + $postFix1=(substr($path1, -1, 1)==='/')?'/':''; + $postFix2=(substr($path2, -1, 1)==='/')?'/':''; $absolutePath1 = OC_Filesystem::normalizePath($this->getAbsolutePath($path1)); $absolutePath2 = OC_Filesystem::normalizePath($this->getAbsolutePath($path2)); if(OC_FileProxy::runPreProxies('copy', $absolutePath1, $absolutePath2) and OC_Filesystem::isValidPath($path2)) { @@ -489,7 +489,7 @@ class OC_FilesystemView { $hooks[]='write'; break; default: - OC_Log::write('core','invalid mode ('.$mode.') for '.$path,OC_Log::ERROR); + OC_Log::write('core', 'invalid mode ('.$mode.') for '.$path,OC_Log::ERROR); } return $this->basicOperation('fopen', $path, $hooks, $mode); @@ -501,7 +501,7 @@ class OC_FilesystemView { $extension=''; $extOffset=strpos($path, '.'); if($extOffset !== false) { - $extension=substr($path, strrpos($path,'.')); + $extension=substr($path, strrpos($path, '.')); } $tmpFile = OC_Helper::tmpFile($extension); file_put_contents($tmpFile, $source); @@ -530,7 +530,7 @@ class OC_FilesystemView { return $this->basicOperation('getMimeType', $path); } public function hash($type, $path, $raw = false) { - $postFix=(substr($path,-1,1)==='/')?'/':''; + $postFix=(substr($path, -1, 1)==='/')?'/':''; $absolutePath = OC_Filesystem::normalizePath($this->getAbsolutePath($path)); if (OC_FileProxy::runPreProxies('hash', $absolutePath) && OC_Filesystem::isValidPath($path)) { $path = $this->getRelativePath($absolutePath); @@ -570,7 +570,7 @@ class OC_FilesystemView { * OC_Filestorage for delegation to a storage backend for execution */ private function basicOperation($operation, $path, $hooks=array(), $extraParam=null) { - $postFix=(substr($path,-1,1)==='/')?'/':''; + $postFix=(substr($path, -1, 1)==='/')?'/':''; $absolutePath = OC_Filesystem::normalizePath($this->getAbsolutePath($path)); if(OC_FileProxy::runPreProxies($operation, $absolutePath, $extraParam) and OC_Filesystem::isValidPath($path)) { $path = $this->getRelativePath($absolutePath); @@ -578,7 +578,7 @@ class OC_FilesystemView { return false; } $internalPath = $this->getInternalPath($path.$postFix); - $run=$this->runHooks($hooks,$path); + $run=$this->runHooks($hooks, $path); if($run and $storage = $this->getStorage($path.$postFix)) { if(!is_null($extraParam)) { $result = $storage->$operation($internalPath, $extraParam); @@ -588,7 +588,7 @@ class OC_FilesystemView { $result = OC_FileProxy::runPostProxies($operation, $this->getAbsolutePath($path), $result); if(OC_Filesystem::$loaded and $this->fakeRoot==OC_Filesystem::getRoot()) { if($operation!='fopen') {//no post hooks for fopen, the file stream is still open - $this->runHooks($hooks,$path, true); + $this->runHooks($hooks, $path, true); } } return $result; |