summaryrefslogtreecommitdiff
path: root/maintenance/deleteArchivedFiles.php
blob: 97dc58248c81edc9ea38c2914591395ba05ad68f (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 (non-current) files from the database
 *
 * @file
 * @ingroup Maintenance
 * @author Aaron Schulz
 * Based on deleteOldRevisions.php by Rob Church
 */

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

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

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

function ShowUsage() {
	echo( "Deletes all archived images.\n\n" );
	echo( "These images 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" );
}