MediaWiki
master
purgeOldText.php
Go to the documentation of this file.
1
<?php
25
use
MediaWiki\Maintenance\Maintenance
;
26
27
// @codeCoverageIgnoreStart
28
require_once __DIR__ .
'/Maintenance.php'
;
29
// @codeCoverageIgnoreEnd
30
36
class
PurgeOldText
extends
Maintenance
{
37
public
function
__construct
() {
38
parent::__construct();
39
$this->
addDescription
(
'Purge old text records from the database'
);
40
$this->
addOption
(
'purge'
,
'Performs the deletion'
);
41
}
42
43
public
function
execute
() {
44
$this->
purgeRedundantText
( $this->
hasOption
(
'purge'
) );
45
}
46
}
47
48
// @codeCoverageIgnoreStart
49
$maintClass
= PurgeOldText::class;
50
require_once RUN_MAINTENANCE_IF_MAIN;
51
// @codeCoverageIgnoreEnd
MediaWiki\Maintenance\Maintenance
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
Definition
Maintenance.php:78
MediaWiki\Maintenance\Maintenance\addOption
addOption( $name, $description, $required=false, $withArg=false, $shortName=false, $multiOccurrence=false)
Add a parameter to the script.
Definition
Maintenance.php:273
MediaWiki\Maintenance\Maintenance\hasOption
hasOption( $name)
Checks to see if a particular option was set.
Definition
Maintenance.php:292
MediaWiki\Maintenance\Maintenance\purgeRedundantText
purgeRedundantText( $delete=true)
Support function for cleaning up redundant text records.
Definition
Maintenance.php:1049
MediaWiki\Maintenance\Maintenance\addDescription
addDescription( $text)
Set the description text.
Definition
Maintenance.php:343
PurgeOldText
Maintenance script that purges old text records from the database.
Definition
purgeOldText.php:36
PurgeOldText\__construct
__construct()
Default constructor.
Definition
purgeOldText.php:37
PurgeOldText\execute
execute()
Do the actual work.
Definition
purgeOldText.php:43
$maintClass
$maintClass
Definition
purgeOldText.php:49
maintenance
purgeOldText.php
Generated on Thu Feb 13 2025 12:27:45 for MediaWiki by
1.10.0