MediaWiki REL1_39
LocalFileDeleteBatch Class Reference

Helper class for file deletion. More...

Public Member Functions

 __construct (File $file, UserIdentity $user, $reason='', $suppress=false)
 
 addCurrent ()
 
 addOld ( $oldName)
 
 addOlds ()
 Add the old versions of the image to the batch.
 
 execute ()
 Run the transaction.
 

Protected Member Functions

 doDBInserts ()
 
 getHashes (StatusValue $status)
 
 getOldRels ()
 
 removeNonexistentFiles ( $batch)
 Removes non-existent files from a deletion batch.
 

Detailed Description

Helper class for file deletion.

Access: internal

Definition at line 32 of file LocalFileDeleteBatch.php.

Constructor & Destructor Documentation

◆ __construct()

LocalFileDeleteBatch::__construct ( File $file,
UserIdentity $user,
$reason = '',
$suppress = false )
Parameters
File$file
UserIdentity$user
string$reason
bool$suppress

Definition at line 60 of file LocalFileDeleteBatch.php.

References $file.

Member Function Documentation

◆ addCurrent()

LocalFileDeleteBatch::addCurrent ( )

Definition at line 72 of file LocalFileDeleteBatch.php.

◆ addOld()

LocalFileDeleteBatch::addOld ( $oldName)
Parameters
string$oldName

Definition at line 79 of file LocalFileDeleteBatch.php.

Referenced by addOlds().

◆ addOlds()

LocalFileDeleteBatch::addOlds ( )

Add the old versions of the image to the batch.

Returns
string[] List of archive names from old versions

Definition at line 88 of file LocalFileDeleteBatch.php.

References addOld().

◆ doDBInserts()

LocalFileDeleteBatch::doDBInserts ( )
protected

Definition at line 182 of file LocalFileDeleteBatch.php.

References $ext, and $res.

◆ execute()

LocalFileDeleteBatch::execute ( )

Run the transaction.

Returns
Status

Definition at line 312 of file LocalFileDeleteBatch.php.

References $ext, $hashes, and StatusValue\newGood().

◆ getHashes()

LocalFileDeleteBatch::getHashes ( StatusValue $status)
protected
Parameters
StatusValue$statusTo add error messages to
Returns
array

Definition at line 126 of file LocalFileDeleteBatch.php.

◆ getOldRels()

LocalFileDeleteBatch::getOldRels ( )
protected
Returns
array

Definition at line 109 of file LocalFileDeleteBatch.php.

◆ removeNonexistentFiles()

LocalFileDeleteBatch::removeNonexistentFiles ( $batch)
protected

Removes non-existent files from a deletion batch.

Parameters
array[]$batch
Returns
Status A good status with existing files in $batch as value, or a fatal status in case of I/O errors.

Definition at line 385 of file LocalFileDeleteBatch.php.


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