Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typos #10

Merged
merged 3 commits into from
Sep 10, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/filecache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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)
*/
Expand All @@ -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);
Expand Down
20 changes: 10 additions & 10 deletions lib/filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand All @@ -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);
Expand Down