LocalFileRestoreBatch Class Reference
[FileRepo]

Helper class for file undeletion. More...

List of all members.

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.
 removeNonexistentFiles ($triplets)
 Removes non-existent files from a store batch.
 removeNonexistentFromCleanup ($batch)
 Removes non-existent files from a cleanup batch.
 cleanup ()
 Delete unused files in the deleted zone.

Public Attributes

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


Detailed Description

Helper class for file undeletion.

Definition at line 1499 of file LocalFile.php.


Constructor & Destructor Documentation

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

Definition at line 1502 of file LocalFile.php.

References $unsuppress.


Member Function Documentation

LocalFileRestoreBatch::addAll (  ) 

Add all revisions of the file.

Definition at line 1526 of file LocalFile.php.

LocalFileRestoreBatch::addId ( fa_id  ) 

Add a file by ID.

Definition at line 1512 of file LocalFile.php.

LocalFileRestoreBatch::addIds ( ids  ) 

Add a whole lot of files by ID.

Definition at line 1519 of file LocalFile.php.

References $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 1772 of file LocalFile.php.

References removeNonexistentFromCleanup().

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

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

LocalFileRestoreBatch::removeNonexistentFiles ( triplets  ) 

Removes non-existent files from a store batch.

Definition at line 1739 of file LocalFile.php.

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

Referenced by execute().

LocalFileRestoreBatch::removeNonexistentFromCleanup ( batch  ) 

Removes non-existent files from a cleanup batch.

Definition at line 1753 of file LocalFile.php.

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

Referenced by cleanup().


Member Data Documentation

LocalFileRestoreBatch::$all

Definition at line 1500 of file LocalFile.php.

LocalFileRestoreBatch::$cleanupBatch

Definition at line 1500 of file LocalFile.php.

LocalFileRestoreBatch::$file

Definition at line 1500 of file LocalFile.php.

Referenced by removeNonexistentFiles(), and removeNonexistentFromCleanup().

LocalFileRestoreBatch::$ids

Definition at line 1500 of file LocalFile.php.

Referenced by addIds().

LocalFileRestoreBatch::$unsuppress = false

Definition at line 1500 of file LocalFile.php.

Referenced by __construct().


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

Generated on Sat Apr 30 22:57:42 2011 for MediaWiki by  doxygen 1.5.9