MediaWiki  REL1_19
LocalFileMoveBatch Class Reference

Helper class for file movement. More...

List of all members.

Public Member Functions

 __construct (File $file, Title $target)
 addCurrent ()
 Add the current image to the batch.
 addOlds ()
 Add the old versions of the image to the batch.
 cleanupSource ($triplets)
 Cleanup a fully moved array of triplets by deleting the source files.
 cleanupTarget ($triplets)
 Cleanup a partially moved array of triplets by deleting the target files.
 doDBUpdates ()
 Do the database updates and return a new FileRepoStatus indicating how many rows where updated.
 execute ()
 Perform the move.
 getMoveTriplets ()
 Generate triplets for FileRepo::storeBatch().
 removeNonexistentFiles ($triplets)
 Removes non-existent files from move batch.

Public Attributes

 $archive
 $cur
 $db
 $file
 $oldCount
 $olds
 $target

Detailed Description

Helper class for file movement.

Definition at line 2125 of file LocalFile.php.


Constructor & Destructor Documentation

LocalFileMoveBatch::__construct ( File file,
Title target 
)

Definition at line 2139 of file LocalFile.php.

References $file, and $target.


Member Function Documentation

Add the current image to the batch.

Definition at line 2154 of file LocalFile.php.

Add the old versions of the image to the batch.

Definition at line 2161 of file LocalFile.php.

References $result, File\DELETED_FILE, and wfDebug().

Here is the call graph for this function:

Cleanup a fully moved array of triplets by deleting the source files.

Called at the end of the move process if everything else went ok.

Definition at line 2351 of file LocalFile.php.

References $files.

Referenced by execute().

Here is the caller graph for this function:

Cleanup a partially moved array of triplets by deleting the target files.

Called if something went wrong half way.

Definition at line 2337 of file LocalFile.php.

Referenced by execute().

Here is the caller graph for this function:

Do the database updates and return a new FileRepoStatus indicating how many rows where updated.

Returns:
FileRepoStatus

Definition at line 2249 of file LocalFile.php.

References $total.

Referenced by execute().

Here is the caller graph for this function:

Perform the move.

Definition at line 2205 of file LocalFile.php.

References cleanupSource(), cleanupTarget(), doDBUpdates(), getMoveTriplets(), removeNonexistentFiles(), and wfDebugLog().

Here is the call graph for this function:

Generate triplets for FileRepo::storeBatch().

Definition at line 2295 of file LocalFile.php.

References wfDebugLog().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

Removes non-existent files from move batch.

Definition at line 2312 of file LocalFile.php.

References $file, $files, $result, FileRepo\FILES_ONLY, and wfDebugLog().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

LocalFileMoveBatch::$archive

Definition at line 2137 of file LocalFile.php.

LocalFileMoveBatch::$cur

Definition at line 2137 of file LocalFile.php.

LocalFileMoveBatch::$db

Definition at line 2137 of file LocalFile.php.

LocalFileMoveBatch::$file

Definition at line 2130 of file LocalFile.php.

Referenced by __construct(), and removeNonexistentFiles().

LocalFileMoveBatch::$oldCount

Definition at line 2137 of file LocalFile.php.

LocalFileMoveBatch::$olds

Definition at line 2137 of file LocalFile.php.

LocalFileMoveBatch::$target

Definition at line 2135 of file LocalFile.php.

Referenced by __construct().


The documentation for this class was generated from the following file: