MediaWiki
REL1_24
|
Helper class for file undeletion. More...
Public Member Functions | |
__construct (File $file, $unsuppress=false) | |
addAll () | |
Add all revisions of the file. | |
addId ($fa_id) | |
Add a file by ID. | |
addIds ($ids) | |
Add a whole lot of files by ID. | |
cleanup () | |
Delete unused files in the deleted zone. | |
cleanupFailedBatch ($storeStatus, $storeBatch) | |
Cleanup a failed batch. | |
execute () | |
Run the transaction, except the cleanup batch. | |
removeNonexistentFiles ($triplets) | |
Removes non-existent files from a store batch. | |
removeNonexistentFromCleanup ($batch) | |
Removes non-existent files from a cleanup batch. | |
Private Attributes | |
bool | $all |
Add all revisions of the file *. | |
array | $cleanupBatch |
List of file IDs to restore *. | |
LocalFile | $file |
* | |
array | $ids |
List of file IDs to restore *. | |
bool | $unsuppress = false |
Wether to remove all settings for suppressed fields *. |
Helper class for file undeletion.
Definition at line 2322 of file LocalFile.php.
LocalFileRestoreBatch::__construct | ( | File $ | file, |
$ | unsuppress = false |
||
) |
File | $file | |
bool | $unsuppress |
Definition at line 2337 of file LocalFile.php.
Referenced by addIds().
Add all revisions of the file.
Definition at line 2363 of file LocalFile.php.
Referenced by addIds().
LocalFileRestoreBatch::addId | ( | $ | fa_id | ) |
Add a file by ID.
int | $fa_id |
Definition at line 2348 of file LocalFile.php.
Referenced by addIds().
LocalFileRestoreBatch::addIds | ( | $ | ids | ) |
Add a whole lot of files by ID.
int[] | $ids |
Definition at line 2356 of file LocalFile.php.
References $all, $cleanupBatch, $file, $ids, $result, $timestamp, $unsuppress, $wgLang, __construct(), addAll(), addId(), array(), as, cleanupFailedBatch(), File\DELETED_FILE, execute(), file, LocalRepo\getHashFromKey(), global, FileRepo\OVERWRITE_SAME, removeNonexistentFiles(), ArchivedFile\selectFields(), RepoGroup\singleton(), and wfTimestamp().
Delete unused files in the deleted zone.
This should be called from outside the transaction in which execute() was called.
Definition at line 2666 of file LocalFile.php.
LocalFileRestoreBatch::cleanupFailedBatch | ( | $ | storeStatus, |
$ | storeBatch | ||
) |
Cleanup a failed batch.
The batch was only partially successful, so rollback by removing all items that were succesfully copied.
Status | $storeStatus | |
array | $storeBatch |
Definition at line 2685 of file LocalFile.php.
Referenced by addIds().
Run the transaction, except the cleanup batch.
The cleanup batch should be run in a separate transaction, because it locks different rows and there's no need to keep the image row locked while it's acquiring those locks The caller may have its own transaction open. So we save the batch and let the caller call cleanup()
Definition at line 2375 of file LocalFile.php.
Referenced by addIds().
LocalFileRestoreBatch::removeNonexistentFiles | ( | $ | triplets | ) |
Removes non-existent files from a store batch.
array | $triplets |
Definition at line 2615 of file LocalFile.php.
Referenced by addIds().
Removes non-existent files from a cleanup batch.
array | $batch |
Definition at line 2641 of file LocalFile.php.
bool LocalFileRestoreBatch::$all [private] |
Add all revisions of the file *.
Definition at line 2329 of file LocalFile.php.
Referenced by addIds().
array LocalFileRestoreBatch::$cleanupBatch [private] |
List of file IDs to restore *.
Definition at line 2325 of file LocalFile.php.
Referenced by addIds().
array LocalFileRestoreBatch::$ids [private] |
List of file IDs to restore *.
Definition at line 2327 of file LocalFile.php.
Referenced by addIds().
bool LocalFileRestoreBatch::$unsuppress = false [private] |
Wether to remove all settings for suppressed fields *.
Definition at line 2331 of file LocalFile.php.
Referenced by addIds().