29require_once __DIR__ .
'/Maintenance.php';
40 parent::__construct();
42 "Deletes all archived revisions\nThese revisions will no longer be restorable" );
43 $this->
addOption(
'delete',
'Performs the deletion' );
50 $count = $dbw->newSelectQueryBuilder()
51 ->select(
'COUNT(*)' )
53 ->caller( __METHOD__ )
55 $this->
output(
"Found $count revisions to delete.\n" );
56 $this->
output(
"Please run the script again with the --delete option "
57 .
"to really delete the revisions.\n" );
61 $this->
output(
"Deleting archived revisions..." );
62 $dbw->newDeleteQueryBuilder()
63 ->deleteFrom(
'archive' )
65 ->caller( __METHOD__ )->execute();
66 $count = $dbw->affectedRows();
67 $this->
output(
"done. $count revisions deleted.\n" );
77require_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.
addDescription( $text)
Set the description text.