MediaWikiBagOStuff -> SqlBagOStuff in comment, both are the same since r55079
[mediawiki.git] / maintenance / commandLine.inc
blob625161a98a56b731ccca46eab30b780369809430
1 <?php
3 /**
4  * Backwards-compatibility wrapper for old-style maintenance scripts
5  */
6 require( dirname(__FILE__) . '/Maintenance.php' );
8 if ( !isset( $optionsWithArgs ) ) {
9     $optionsWithArgs = array();
12 class CommandLineInc extends Maintenance {
13         public function __construct() {
14                 global $optionsWithArgs;
15                 parent::__construct();
16                 foreach ( $optionsWithArgs as $name ) {
17                         $this->addOption( $name, '', false, true );
18                 }
19         }
21         /**
22          * No help, it would just be misleading since it misses custom options
23          */
24         protected function maybeHelp( $force = false ) {
25                 if ( !$force )
26                         return;
27                 parent::maybeHelp( true );
28         }
30         public function execute() {
31                 global $args, $options;
32                 $args = $this->mArgs;
33                 $options = $this->mOptions;
34         }
37 $maintClass = 'CommandLineInc';
38 require( DO_MAINTENANCE );