diff options
Diffstat (limited to 'lib/filecache/update.php')
-rw-r--r-- | lib/filecache/update.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/filecache/update.php b/lib/filecache/update.php index f9d64d0ae99..bc403113e7c 100644 --- a/lib/filecache/update.php +++ b/lib/filecache/update.php @@ -18,7 +18,7 @@ class OC_FileCache_Update{ * @param boolean folder * @return bool */ - public static function hasUpdated($path,$root=false,$folder=false) { + public static function hasUpdated($path, $root=false, $folder=false) { if($root===false) { $view=OC_Filesystem::getView(); }else{ @@ -46,14 +46,14 @@ class OC_FileCache_Update{ /** * delete non existing files from the cache */ - public static function cleanFolder($path,$root=false) { + public static function cleanFolder($path, $root=false) { if($root===false) { $view=OC_Filesystem::getView(); }else{ $view=new OC_FilesystemView($root); } - $cachedContent=OC_FileCache_Cached::getFolderContent($path,$root); + $cachedContent=OC_FileCache_Cached::getFolderContent($path, $root); foreach($cachedContent as $fileData) { $path=$fileData['path']; $file=$view->getRelativePath($path); @@ -72,7 +72,7 @@ class OC_FileCache_Update{ * @param string path * @param string root (optional) */ - public static function updateFolder($path,$root=false) { + public static function updateFolder($path, $root=false) { if($root===false) { $view=OC_Filesystem::getView(); }else{ @@ -85,7 +85,7 @@ class OC_FileCache_Update{ $file=$path.'/'.$filename; $isDir=$view->is_dir($file); if(self::hasUpdated($file, $root, $isDir)) { - if($isDir){ + if($isDir) { self::updateFolder($file, $root); }elseif($root===false) {//filesystem hooks are only valid for the default root OC_Hook::emit('OC_Filesystem', 'post_write', array('path'=>$file)); @@ -143,7 +143,7 @@ class OC_FileCache_Update{ * @param string path * @param string root (optional) */ - public static function update($path,$root=false) { + public static function update($path, $root=false) { if($root===false) { $view=OC_Filesystem::getView(); }else{ @@ -153,7 +153,7 @@ class OC_FileCache_Update{ $mimetype=$view->getMimeType($path); $size=0; - $cached=OC_FileCache_Cached::get($path,$root); + $cached=OC_FileCache_Cached::get($path, $root); $cachedSize=isset($cached['size'])?$cached['size']:0; if($view->is_dir($path.'/')) { @@ -165,7 +165,7 @@ class OC_FileCache_Update{ $mtime=$view->filemtime($path.'/'); $ctime=$view->filectime($path.'/'); $writable=$view->is_writable($path.'/'); - OC_FileCache::put($path, array('size'=>$size,'mtime'=>$mtime,'ctime'=>$ctime,'mimetype'=>$mimetype,'writable'=>$writable)); + OC_FileCache::put($path, array('size'=>$size,'mtime'=>$mtime,'ctime'=>$ctime,'mimetype'=>$mimetype, 'writable'=>$writable)); }else{ $count=0; OC_FileCache::scan($path, null, $count, $root); @@ -174,7 +174,7 @@ class OC_FileCache_Update{ }else{ $size=OC_FileCache::scanFile($path, $root); } - if($path !== '' and $path !== '/'){ + if($path !== '' and $path !== '/') { OC_FileCache::increaseSize(dirname($path), $size-$cachedSize, $root); } } @@ -184,7 +184,7 @@ class OC_FileCache_Update{ * @param string path * @param string root (optional) */ - public static function delete($path,$root=false) { + public static function delete($path, $root=false) { $cached=OC_FileCache_Cached::get($path, $root); if(!isset($cached['size'])) { return; @@ -200,7 +200,7 @@ class OC_FileCache_Update{ * @param string newPath * @param string root (optional) */ - public static function rename($oldPath,$newPath,$root=false) { + public static function rename($oldPath, $newPath, $root=false) { if(!OC_FileCache::inCache($oldPath, $root)) { return; } |