15require_once __DIR__ .
'/Maintenance.php';
26 parent::__construct();
28 "Deletes all archived revisions\nThese revisions will no longer be restorable" );
29 $this->
addOption(
'delete',
'Performs the deletion' );
36 $count = $dbw->newSelectQueryBuilder()
37 ->select(
'COUNT(*)' )
39 ->caller( __METHOD__ )
41 $this->
output(
"Found $count revisions to delete.\n" );
42 $this->
output(
"Please run the script again with the --delete option "
43 .
"to really delete the revisions.\n" );
47 $this->
output(
"Deleting archived revisions..." );
48 $dbw->newDeleteQueryBuilder()
49 ->deleteFrom(
'archive' )
51 ->caller( __METHOD__ )->execute();
52 $count = $dbw->affectedRows();
53 $this->
output(
"done. $count revisions deleted.\n" );
63require_once RUN_MAINTENANCE_IF_MAIN;
Maintenance script to delete archived (deleted from public) revisions from the database.
__construct()
Default constructor.
execute()
Do the actual work.
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
output( $out, $channel=null)
Throw some output to the user.
addOption( $name, $description, $required=false, $withArg=false, $shortName=false, $multiOccurrence=false)
Add a parameter to the script.
hasOption( $name)
Checks to see if a particular option was set.
purgeRedundantText( $delete=true)
Support function for cleaning up redundant text records.
getPrimaryDB(string|false $virtualDomain=false)
addDescription( $text)
Set the description text.