MediaWiki  REL1_23
LocalFileMoveBatch Class Reference

Helper class for file movement. More...

Collaboration diagram for LocalFileMoveBatch:

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.

Protected Attributes

 $archive
 $cur
DatabaseBase $db
 *
LocalFile $file
 *
 $oldCount
 $olds
Title $target
 *

Detailed Description

Helper class for file movement.

Definition at line 2590 of file LocalFile.php.


Constructor & Destructor Documentation

LocalFileMoveBatch::__construct ( File file,
Title target 
)
Parameters:
File$file
Title$target

Definition at line 2609 of file LocalFile.php.

References LocalFileRestoreBatch\$cleanupBatch, $success, and array().


Member Function Documentation

Add the current image to the batch.

Definition at line 2624 of file LocalFile.php.

Add the old versions of the image to the batch.

Returns:
array List of archive names from old versions

Definition at line 2632 of file LocalFile.php.

References $file, $target, file, and File\getRepo().

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 2853 of file LocalFile.php.

References $file, $files, $result, array(), as, file, and wfDebugLog().

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

Called if something went wrong half way.

Definition at line 2838 of file LocalFile.php.

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

Returns:
FileRepoStatus

Definition at line 2739 of file LocalFile.php.

Perform the move.

Returns:
FileRepoStatus

Definition at line 2681 of file LocalFile.php.

References $timestamp, array(), File\DELETED_FILE, list, and wfDebug().

Generate triplets for FileRepo::storeBatch().

Returns:
array

Definition at line 2791 of file LocalFile.php.

Removes non-existent files from move batch.

Parameters:
array$triplets
Returns:
array

Definition at line 2813 of file LocalFile.php.


Member Data Documentation

LocalFileMoveBatch::$archive [protected]

Definition at line 2601 of file LocalFile.php.

LocalFileMoveBatch::$cur [protected]

Definition at line 2595 of file LocalFile.php.

DatabaseBase LocalFileMoveBatch::$db [protected]

*

Definition at line 2603 of file LocalFile.php.

LocalFile LocalFileMoveBatch::$file [protected]

*

Definition at line 2591 of file LocalFile.php.

Referenced by addOlds(), and cleanupSource().

LocalFileMoveBatch::$oldCount [protected]

Definition at line 2599 of file LocalFile.php.

LocalFileMoveBatch::$olds [protected]

Definition at line 2597 of file LocalFile.php.

Title LocalFileMoveBatch::$target [protected]

*

Definition at line 2593 of file LocalFile.php.

Referenced by addOlds().


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