Public Member Functions | |
__construct (File $file, $unsuppress=false) | |
addId ($fa_id) | |
Add a file by ID. | |
addIds ($ids) | |
Add a whole lot of files by ID. | |
addAll () | |
Add all revisions of the file. | |
execute () | |
Run the transaction, except the cleanup batch. | |
cleanup () | |
Delete unused files in the deleted zone. | |
Public Attributes | |
$file | |
$cleanupBatch | |
$ids | |
$all | |
$unsuppress = false |
Definition at line 1472 of file LocalFile.php.
LocalFileRestoreBatch::__construct | ( | File $ | file, | |
$ | unsuppress = false | |||
) |
LocalFileRestoreBatch::addAll | ( | ) |
LocalFileRestoreBatch::addId | ( | $ | fa_id | ) |
LocalFileRestoreBatch::addIds | ( | $ | ids | ) |
LocalFileRestoreBatch::cleanup | ( | ) |
Delete unused files in the deleted zone.
This should be called from outside the transaction in which execute() was called.
Definition at line 1709 of file LocalFile.php.
References $status.
LocalFileRestoreBatch::execute | ( | ) |
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 1510 of file LocalFile.php.
References $dbw, $result, $row, $status, $wgLang, $wgUser, File::DELETED_FILE, FileRepo::OVERWRITE_SAME, RepoGroup::singleton(), wfDebug(), and wfTimestamp().
LocalFileRestoreBatch::$all |
Definition at line 1473 of file LocalFile.php.
LocalFileRestoreBatch::$cleanupBatch |
Definition at line 1473 of file LocalFile.php.
LocalFileRestoreBatch::$file |
Definition at line 1473 of file LocalFile.php.
LocalFileRestoreBatch::$ids |
LocalFileRestoreBatch::$unsuppress = false |