summaryrefslogtreecommitdiff
path: root/maintenance/deleteOldRevisions.php
blob: 9695a8c5b7ad163c4596ea250902506e3d1a2a21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

/**
 * Delete old (non-current) revisions from the database
 *
 * @package MediaWiki
 * @subpackage Maintenance
 * @author Rob Church <robchur@gmail.com>
 */

$options = array( 'delete', 'help' );
require_once( 'commandLine.inc' );
require_once( 'deleteOldRevisions.inc' );

echo( "Delete Old Revisions\n\n" );

if( @$options['help'] ) {
	ShowUsage();
} else {
	DeleteOldRevisions( @$options['delete'] );
}

function ShowUsage() {
	echo( "Deletes non-current revisions from the database.\n\n" );
	echo( "Usage: php deleteOldRevisions.php [--delete|--help]\n\n" );
	echo( "delete : Performs the deletion\n" );
	echo( "  help : Show this usage information\n" );
}

?>