MediaWiki  REL1_22
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.

Public Attributes

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

Detailed Description

Helper class for file movement.

Definition at line 2540 of file LocalFile.php.


Constructor & Destructor Documentation

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

Definition at line 2560 of file LocalFile.php.

References $file, $target, and file.


Member Function Documentation

Add the current image to the batch.

Definition at line 2575 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 2583 of file LocalFile.php.

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

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

Called if something went wrong half way.

Definition at line 2778 of file LocalFile.php.

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

Returns:
FileRepoStatus

Definition at line 2683 of file LocalFile.php.

Perform the move.

Returns:
FileRepoStatus

Definition at line 2632 of file LocalFile.php.

Generate triplets for FileRepo::storeBatch().

Returns:
array

Definition at line 2734 of file LocalFile.php.

Removes non-existent files from move batch.

Parameters:
$tripletsarray
Returns:
array

Definition at line 2753 of file LocalFile.php.

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


Member Data Documentation

LocalFileMoveBatch::$archive

Definition at line 2550 of file LocalFile.php.

LocalFileMoveBatch::$cur

Definition at line 2550 of file LocalFile.php.

DatabaseBase LocalFileMoveBatch::$db

Definition at line 2554 of file LocalFile.php.

LocalFile LocalFileMoveBatch::$file

Definition at line 2544 of file LocalFile.php.

Referenced by __construct(), and removeNonexistentFiles().

LocalFileMoveBatch::$oldCount

Definition at line 2550 of file LocalFile.php.

LocalFileMoveBatch::$olds

Definition at line 2550 of file LocalFile.php.

Title LocalFileMoveBatch::$target

Definition at line 2548 of file LocalFile.php.

Referenced by __construct().


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