summaryrefslogtreecommitdiff
path: root/maintenance/deleteArchivedRevisions.php
blob: 87eebfad6d460535a10da1eb34670d4ee92a11ec (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
31
<?php

/**
 * Delete archived (deleted from public) revisions from the database
 *
 * @file
 * @ingroup Maintenance
 * @author Aaron Schulz
 * Shamelessly stolen from deleteOldRevisions.php by Rob Church :)
 */

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

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

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

function ShowUsage() {
	echo( "Deletes all archived revisions.\n\n" );
	echo( "These revisions will no longer be restorable.\n\n" );
	echo( "Usage: php deleteArchivedRevisions.php [--delete|--help]\n\n" );
	echo( "delete : Performs the deletion\n" );
	echo( "  help : Show this usage information\n" );
}