MediaWiki  REL1_19
LocalFileRestoreBatch Class Reference

Helper class for file undeletion. More...

List of all members.

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.

Public Attributes

 $all
 $cleanupBatch
 $file
 $ids
 $unsuppress = false

Detailed Description

Helper class for file undeletion.

Definition at line 1777 of file LocalFile.php.


Constructor & Destructor Documentation

LocalFileRestoreBatch::__construct ( File file,
unsuppress = false 
)

Definition at line 1785 of file LocalFile.php.

References $file, and $unsuppress.


Member Function Documentation

Add all revisions of the file.

Definition at line 1809 of file LocalFile.php.

Add a file by ID.

Definition at line 1795 of file LocalFile.php.

Add a whole lot of files by ID.

Definition at line 1802 of file LocalFile.php.

References $ids.

Delete unused files in the deleted zone.

This should be called from outside the transaction in which execute() was called.

Definition at line 2085 of file LocalFile.php.

References removeNonexistentFromCleanup().

Here is the call graph for this function:

LocalFileRestoreBatch::cleanupFailedBatch ( storeStatus,
storeBatch 
)

Cleanup a failed batch.

The batch was only partially successful, so rollback by removing all items that were succesfully copied.

Parameters:
Status$storeStatus
array$storeBatch

Definition at line 2104 of file LocalFile.php.

References $cleanupBatch, and $success.

Referenced by execute().

Here is the caller graph for this function:

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

References $result, $wgLang, cleanupFailedBatch(), File\DELETED_FILE, FileRepo\OVERWRITE_SAME, removeNonexistentFiles(), RepoGroup\singleton(), wfDebug(), and wfTimestamp().

Here is the call graph for this function:

Removes non-existent files from a store batch.

Definition at line 2042 of file LocalFile.php.

References $file, $files, $result, and FileRepo\FILES_ONLY.

Referenced by execute().

Here is the caller graph for this function:

Removes non-existent files from a cleanup batch.

Definition at line 2061 of file LocalFile.php.

References $file, $files, $result, and FileRepo\FILES_ONLY.

Referenced by cleanup().

Here is the caller graph for this function:


Member Data Documentation

LocalFileRestoreBatch::$all

Definition at line 1783 of file LocalFile.php.

LocalFileRestoreBatch::$cleanupBatch

Definition at line 1783 of file LocalFile.php.

Referenced by cleanupFailedBatch().

LocalFileRestoreBatch::$file
LocalFileRestoreBatch::$ids

Definition at line 1783 of file LocalFile.php.

Referenced by addIds().

LocalFileRestoreBatch::$unsuppress = false

Definition at line 1783 of file LocalFile.php.

Referenced by __construct().


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