MediaWiki REL1_33
|
Helper class for file movement. More...
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. | |
execute () | |
Perform the move. | |
Protected Member Functions | |
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 Status indicating how many rows where updated. | |
getMoveTriplets () | |
Generate triplets for FileRepo::storeBatch(). | |
removeNonexistentFiles ( $triplets) | |
Removes non-existent files from move batch. | |
verifyDBUpdates () | |
Verify the database updates and return a new Status indicating how many rows would be updated. | |
Protected Attributes | |
$archive | |
$cur | |
IDatabase | $db |
LocalFile | $file |
$oldCount | |
$olds | |
Title | $target |
Helper class for file movement.
Definition at line 3118 of file LocalFile.php.
LocalFileMoveBatch::addCurrent | ( | ) |
Add the current image to the batch.
Definition at line 3155 of file LocalFile.php.
References and().
LocalFileMoveBatch::addOlds | ( | ) |
Add the old versions of the image to the batch.
Definition at line 3163 of file LocalFile.php.
References and(), File\DELETED_FILE, list, and wfDebug().
|
protected |
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.
array[] | $triplets |
Definition at line 3418 of file LocalFile.php.
Referenced by execute().
|
protected |
Cleanup a partially moved array of triplets by deleting the target files.
Called if something went wrong half way.
array[] | $triplets |
Definition at line 3402 of file LocalFile.php.
Referenced by execute().
|
protected |
Do the database updates and return a new Status indicating how many rows where updated.
Definition at line 3322 of file LocalFile.php.
References $db, and Wikimedia\Rdbms\IDatabase\update().
Referenced by execute().
LocalFileMoveBatch::execute | ( | ) |
Perform the move.
Definition at line 3213 of file LocalFile.php.
References and(), cleanupSource(), cleanupTarget(), doDBUpdates(), getMoveTriplets(), FileRepo\OVERWRITE_SAME, removeNonexistentFiles(), verifyDBUpdates(), wfDebugLog(), and wfLocalFile().
|
protected |
Generate triplets for FileRepo::storeBatch().
Definition at line 3350 of file LocalFile.php.
References and(), and wfDebugLog().
Referenced by execute().
|
protected |
Removes non-existent files from move batch.
array | $triplets |
Definition at line 3372 of file LocalFile.php.
References $file, and(), and wfDebugLog().
Referenced by execute().
|
protected |
Verify the database updates and return a new Status indicating how many rows would be updated.
Definition at line 3285 of file LocalFile.php.
References $db, and(), and Wikimedia\Rdbms\IDatabase\lockForUpdate().
Referenced by execute().
|
protected |
Definition at line 3131 of file LocalFile.php.
|
protected |
Definition at line 3125 of file LocalFile.php.
|
protected |
Definition at line 3134 of file LocalFile.php.
Referenced by doDBUpdates(), and verifyDBUpdates().
|
protected |
Definition at line 3120 of file LocalFile.php.
Referenced by __construct(), and removeNonexistentFiles().
|
protected |
Definition at line 3129 of file LocalFile.php.
|
protected |
Definition at line 3127 of file LocalFile.php.
|
protected |
Definition at line 3123 of file LocalFile.php.
Referenced by __construct().