MediaWiki
1.34.0
|
Helper class for file deletion. More...
Public Member Functions | |
__construct (File $file, $reason='', $suppress=false, $user=null) | |
addCurrent () | |
addOld ( $oldName) | |
addOlds () | |
Add the old versions of the image to the batch. More... | |
doDBDeletes () | |
execute () | |
Run the transaction. More... | |
Protected Member Functions | |
doDBInserts () | |
getHashes () | |
getOldRels () | |
removeNonexistentFiles ( $batch) | |
Removes non-existent files from a deletion batch. More... | |
Private Attributes | |
array | $archiveUrls = [] |
array | $deletionBatch |
Items to be processed in the deletion batch. More... | |
LocalFile | $file |
string | $reason |
array | $srcRels = [] |
Status | $status |
bool | $suppress |
Whether to suppress all suppressable fields when deleting. More... | |
User | $user |
Helper class for file deletion.
Definition at line 31 of file LocalFileDeleteBatch.php.
LocalFileDeleteBatch::__construct | ( | File | $file, |
$reason = '' , |
|||
$suppress = false , |
|||
$user = null |
|||
) |
LocalFileDeleteBatch::addCurrent | ( | ) |
Definition at line 71 of file LocalFileDeleteBatch.php.
LocalFileDeleteBatch::addOld | ( | $oldName | ) |
string | $oldName |
Definition at line 78 of file LocalFileDeleteBatch.php.
Referenced by addOlds().
LocalFileDeleteBatch::addOlds | ( | ) |
Add the old versions of the image to the batch.
Definition at line 87 of file LocalFileDeleteBatch.php.
References addOld().
LocalFileDeleteBatch::doDBDeletes | ( | ) |
Definition at line 291 of file LocalFileDeleteBatch.php.
References getOldRels().
Referenced by execute().
|
protected |
Definition at line 180 of file LocalFileDeleteBatch.php.
References $ext, $reason, $res, $user, getOldRels(), OldLocalFile\getQueryInfo(), User\newFromAnyId(), and ActorMigration\newMigration().
Referenced by execute().
LocalFileDeleteBatch::execute | ( | ) |
Run the transaction.
Definition at line 312 of file LocalFileDeleteBatch.php.
References $ext, $hashes, $status, doDBDeletes(), doDBInserts(), getHashes(), StatusValue\isGood(), StatusValue\merge(), and removeNonexistentFiles().
|
protected |
Definition at line 124 of file LocalFileDeleteBatch.php.
References $hashes, $res, and getOldRels().
Referenced by execute().
|
protected |
Definition at line 108 of file LocalFileDeleteBatch.php.
References $srcRels.
Referenced by doDBDeletes(), doDBInserts(), and getHashes().
|
protected |
Removes non-existent files from a deletion batch.
array | $batch |
Definition at line 372 of file LocalFileDeleteBatch.php.
References StatusValue\newFatal(), and StatusValue\newGood().
Referenced by execute().
|
private |
Definition at line 42 of file LocalFileDeleteBatch.php.
|
private |
Items to be processed in the deletion batch.
Definition at line 45 of file LocalFileDeleteBatch.php.
|
private |
Definition at line 33 of file LocalFileDeleteBatch.php.
Referenced by __construct().
|
private |
Definition at line 36 of file LocalFileDeleteBatch.php.
Referenced by __construct(), and doDBInserts().
|
private |
Definition at line 39 of file LocalFileDeleteBatch.php.
Referenced by getOldRels().
|
private |
Definition at line 51 of file LocalFileDeleteBatch.php.
Referenced by execute().
|
private |
Whether to suppress all suppressable fields when deleting.
Definition at line 48 of file LocalFileDeleteBatch.php.
Referenced by __construct().
|
private |
Definition at line 54 of file LocalFileDeleteBatch.php.
Referenced by __construct(), and doDBInserts().