summaryrefslogtreecommitdiff
path: root/maintenance/deleteOldRevisions.php
blob: c283c6072072122d969b9efc2e34cbe387265081 (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
<?php

/**
 * Delete old (non-current) revisions from the database
 *
 * @file
 * @ingroup 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'], $args );
}

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