From ac4364040d905c8719a68bc90e9811fb4b682a5f Mon Sep 17 00:00:00 2001 From: Niko Ehrenfeuchter Date: Sun, 3 Jun 2012 17:53:01 +0200 Subject: [PATCH 1/3] fix typos + copy-paste errors in comments --- lib/filecache.php | 4 ++-- lib/filesystem.php | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/filecache.php b/lib/filecache.php index 7b7a2fac3ea0..4042815d9ff9 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -23,7 +23,7 @@ * provide caching for filesystem info in the database * * not used by OC_Filesystem for reading filesystem info, - * instread apps should use OC_FileCache::get where possible + * instead apps should use OC_FileCache::get where possible * * It will try to keep the data up to date but changes from outside ownCloud can invalidate the cache */ @@ -491,7 +491,7 @@ public static function fileSystemWatcherDelete($params,$root=''){ } /** - * called when files are deleted + * called when files are renamed * @param array $params * @param string root (optional) */ diff --git a/lib/filesystem.php b/lib/filesystem.php index 2a0c1cea93e6..372b611453d5 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -24,20 +24,20 @@ /** * Class for abstraction of filesystem functions - * This class won't call any filesystem functions for itself but but will pass them to the correct OC_Filestorage object - * this class should also handle all the file premission related stuff + * This class won't call any filesystem functions for itself but will pass them to the correct OC_Filestorage object + * this class should also handle all the file permission related stuff * * Hooks provided: * read(path) * write(path, &run) * post_write(path) - * create(path, &run) (when a file is created, both create and write will be emited in that order) + * create(path, &run) (when a file is created, both create and write will be emitted in that order) * post_create(path) * delete(path, &run) * post_delete(path) * rename(oldpath,newpath, &run) * post_rename(oldpath,newpath) - * copy(oldpath,newpath, &run) (if the newpath doesn't exists yes, copy, create and write will be emited in that order) + * copy(oldpath,newpath, &run) (if the newpath doesn't exists yes, copy, create and write will be emitted in that order) * post_rename(oldpath,newpath) * * the &run parameter can be set to false to prevent the operation from occuring @@ -59,28 +59,28 @@ class OC_Filesystem{ const CLASSNAME = 'OC_Filesystem'; /** - * signalname emited before file renaming + * signalname emitted before file renaming * @param oldpath * @param newpath */ const signal_rename = 'rename'; /** - * signal emited after file renaming + * signal emitted after file renaming * @param oldpath * @param newpath */ const signal_post_rename = 'post_rename'; /** - * signal emited before file/dir creation + * signal emitted before file/dir creation * @param path * @param run changing this flag to false in hook handler will cancel event */ const signal_create = 'create'; /** - * signal emited after file/dir creation + * signal emitted after file/dir creation * @param path * @param run changing this flag to false in hook handler will cancel event */ @@ -371,7 +371,7 @@ static public function isValidPath($path){ } /** - * checks if a file is blacklsited for storage in the filesystem + * checks if a file is blacklisted for storage in the filesystem * Listens to write and rename hooks * @param array $data from hook */ @@ -391,7 +391,7 @@ static public function isBlacklisted($data){ } /** - * following functions are equivilent to their php buildin equivilents for arguments/return values. + * following functions are equivalent to their php builtin equivalents for arguments/return values. */ static public function mkdir($path){ return self::$defaultInstance->mkdir($path); From 88d95823b2b9f0eaefa6be7ec4a79a68ae0cfa32 Mon Sep 17 00:00:00 2001 From: Niko Ehrenfeuchter Date: Mon, 4 Jun 2012 00:27:31 +0200 Subject: [PATCH 2/3] fix typos --- lib/filecache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/filecache.php b/lib/filecache.php index 4042815d9ff9..7df348cb1941 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -217,7 +217,7 @@ public static function delete($file,$root=''){ } /** - * return array of filenames matching the querty + * return array of filenames matching the query * @param string $query * @param boolean $returnData * @param string root (optional) @@ -308,7 +308,7 @@ public static function inCache($path,$root=''){ /** * get the file id as used in the cache - * unlike the public getId, full paths are used here (/usename/files/foo instead of /foo) + * unlike the public getId, full paths are used here (/username/files/foo instead of /foo) * @param string $path * @return int */ From 76ccd69cec0cb608fd02df8f9eb0a25eb9055887 Mon Sep 17 00:00:00 2001 From: Niko Ehrenfeuchter Date: Mon, 4 Jun 2012 00:41:32 +0200 Subject: [PATCH 3/3] mark unused variables --- lib/filecache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/filecache.php b/lib/filecache.php index 7df348cb1941..8ed917bbb8a2 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -506,12 +506,12 @@ public static function fileSystemWatcherRename($params,$root=''){ $newPath=$params['newpath']; $fullOldPath=$root.$oldPath; $fullNewPath=$root.$newPath; - if(($id=self::getFileId($fullOldPath))!=-1){ + if(($id=self::getFileId($fullOldPath))!=-1){ // $id is unused later on! $oldSize=self::getCachedSize($oldPath,$root); }else{ return; } - $size=OC_Filesystem::filesize($newPath); + $size=OC_Filesystem::filesize($newPath); // $size is unused later on! self::increaseSize(dirname($fullOldPath),-$oldSize); self::increaseSize(dirname($fullNewPath),$oldSize); self::move($oldPath,$newPath);