summaryrefslogtreecommitdiff
path: root/maintenance/deleteArchivedFiles.php
blob: a556c3b9c3bc5b23118ea53377c5caad624955cf (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 archived (non-current) files from the database
 *
 * @addtogroup 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" );
}