}
/**
- * Checks existance of specified array of files.
+ * Checks existence of specified array of files.
*
* @param array $files URLs of files to check
* @param integer $flags Bitwise combination of the following flags:
* self::FILES_ONLY Mark file as existing only if it is a file (not directory)
- * @return Either array of files and existance flags, or false
+ * @return Either array of files and existence flags, or false
*/
function fileExistsBatch( $files, $flags = 0 ) {
if ( !file_exists( $this->directory ) || !is_readable( $this->directory ) ) {
$status = $repo->newGood();
$triplets = $this->getMoveTriplets();
- $statusPreCheck = $this->checkFileExistance( 0 );
+ $statusPreCheck = $this->checkFileExistence( 0 );
if( !$statusPreCheck->isOk() ) {
- wfDebugLog( 'imagemove', "Move of {$this->file->name} aborted due to pre-move file existance check failure" );
+ wfDebugLog( 'imagemove', "Move of {$this->file->name} aborted due to pre-move file existence check failure" );
return $statusPreCheck;
}
$statusDb = $this->doDBUpdates();
wfDebugLog( 'imagemove', "Error in moving files: " . $statusMove->getWikiText() );
$this->db->rollback();
} else {
- $statusPostCheck = $this->checkFileExistance( 1 );
+ $statusPostCheck = $this->checkFileExistence( 1 );
if( !$statusPostCheck->isOk() ) {
// This clearly mustn't have happend. FSRepo::storeBatch should have given out an error in that case.
wfDebugLog( 'imagemove', "ATTENTION! Move of {$this->file->name} has some files missing, while storeBatch() reported success" );
}
/*
- * Checks file existance.
+ * Checks file existence.
* Set $key = 0 for source files check
* and $key = 1 for destination files check.
*/
- function checkFileExistance( $key = 0 ) {
+ function checkFileExistence( $key = 0 ) {
$files = array();
foreach( array_merge( array( $this->cur ), $this->olds ) as $file )
$files[$file[$key]] = $this->file->repo->getVirtualUrl() . '/public/' . rawurlencode( $file[$key] );