MediaWiki  1.23.14
deleteArchivedFiles.php
Go to the documentation of this file.
1 <?php
27 require_once __DIR__ . '/Maintenance.php';
28 require_once __DIR__ . '/deleteArchivedFiles.inc';
29 
36  public function __construct() {
37  parent::__construct();
38  $this->mDescription = "Deletes all archived images.";
39  $this->addOption( 'delete', 'Perform the deletion' );
40  $this->addOption( 'force', 'Force deletion of rows from filearchive' );
41  }
42 
43  public function handleOutput( $str ) {
44  return $this->output( $str );
45  }
46 
47  public function execute() {
48  if ( !$this->hasOption( 'delete' ) ) {
49  $this->output( "Use --delete to actually confirm this script\n" );
50  return;
51  }
52  $force = $this->hasOption( 'force' );
54  }
55 }
56 
57 $maintClass = "DeleteArchivedFiles";
58 require_once RUN_MAINTENANCE_IF_MAIN;
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
DeleteArchivedFiles\execute
execute()
Do the actual work.
Definition: deleteArchivedFiles.php:47
Maintenance\addOption
addOption( $name, $description, $required=false, $withArg=false, $shortName=false)
Add a parameter to the script.
Definition: Maintenance.php:169
RUN_MAINTENANCE_IF_MAIN
require_once RUN_MAINTENANCE_IF_MAIN
Definition: maintenance.txt:50
DeleteArchivedFiles
Maintenance script to delete archived (non-current) files from the database.
Definition: deleteArchivedFiles.php:35
Maintenance
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
Definition: maintenance.txt:39
DeleteArchivedFiles\__construct
__construct()
Default constructor.
Definition: deleteArchivedFiles.php:36
$maintClass
$maintClass
Definition: deleteArchivedFiles.php:57
DeleteArchivedFiles\handleOutput
handleOutput( $str)
Definition: deleteArchivedFiles.php:43
DeleteArchivedFilesImplementation\doDelete
static doDelete( $output, $force)
Definition: deleteArchivedFiles.inc:30
Maintenance\output
output( $out, $channel=null)
Throw some output to the user.
Definition: Maintenance.php:314
Maintenance\hasOption
hasOption( $name)
Checks to see if a particular param exists.
Definition: Maintenance.php:181