4 * Backwards-compatibility wrapper for old-style maintenance scripts
6 require( dirname( __FILE__ ) . '/Maintenance.php' );
8 global $optionsWithArgs;
9 if ( !isset( $optionsWithArgs ) ) {
10 $optionsWithArgs = array();
13 class CommandLineInc extends Maintenance {
14 public function __construct() {
15 global $optionsWithArgs;
16 parent::__construct();
17 foreach ( $optionsWithArgs as $name ) {
18 $this->addOption( $name, '', false, true );
22 public function getDbType() {
23 global $wgUseNormalUser;
25 return ( isset( $wgUseNormalUser ) && $wgUseNormalUser ) ?
26 Maintenance::DB_STD : Maintenance::DB_ADMIN;
30 * No help, it would just be misleading since it misses custom options
32 protected function maybeHelp( $force = false ) {
35 parent::maybeHelp( true );
38 public function execute() {
39 global $args, $options;
41 $options = $this->mOptions;
45 $maintClass = 'CommandLineInc';
46 require( DO_MAINTENANCE );