MediaWiki
master
purgeOldText.php
Go to the documentation of this file.
1
<?php
11
use
MediaWiki\Maintenance\Maintenance
;
12
13
// @codeCoverageIgnoreStart
14
require_once __DIR__ .
'/Maintenance.php'
;
15
// @codeCoverageIgnoreEnd
16
22
class
PurgeOldText
extends
Maintenance
{
23
public
function
__construct
() {
24
parent::__construct();
25
$this->
addDescription
(
'Purge old text records from the database'
);
26
$this->
addOption
(
'purge'
,
'Performs the deletion'
);
27
}
28
29
public
function
execute
() {
30
$this->
purgeRedundantText
( $this->
hasOption
(
'purge'
) );
31
}
32
}
33
34
// @codeCoverageIgnoreStart
35
$maintClass
= PurgeOldText::class;
36
require_once RUN_MAINTENANCE_IF_MAIN;
37
// @codeCoverageIgnoreEnd
MediaWiki\Maintenance\Maintenance
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
Definition
Maintenance.php:65
MediaWiki\Maintenance\Maintenance\addOption
addOption( $name, $description, $required=false, $withArg=false, $shortName=false, $multiOccurrence=false)
Add a parameter to the script.
Definition
Maintenance.php:266
MediaWiki\Maintenance\Maintenance\hasOption
hasOption( $name)
Checks to see if a particular option was set.
Definition
Maintenance.php:285
MediaWiki\Maintenance\Maintenance\purgeRedundantText
purgeRedundantText( $delete=true)
Support function for cleaning up redundant text records.
Definition
Maintenance.php:1029
MediaWiki\Maintenance\Maintenance\addDescription
addDescription( $text)
Set the description text.
Definition
Maintenance.php:336
PurgeOldText
Maintenance script that purges old text records from the database.
Definition
purgeOldText.php:22
PurgeOldText\__construct
__construct()
Default constructor.
Definition
purgeOldText.php:23
PurgeOldText\execute
execute()
Do the actual work.
Definition
purgeOldText.php:29
$maintClass
$maintClass
Definition
purgeOldText.php:35
maintenance
purgeOldText.php
Generated on Sat Feb 14 2026 16:30:22 for MediaWiki by
1.10.0