00001 <?php 00002 00006 require( dirname(__FILE__) . '/Maintenance.php' ); 00007 00008 if ( !isset( $optionsWithArgs ) ) { 00009 $optionsWithArgs = array(); 00010 } 00011 00012 class CommandLineInc extends Maintenance { 00013 public function __construct() { 00014 global $optionsWithArgs; 00015 parent::__construct(); 00016 foreach ( $optionsWithArgs as $name ) { 00017 $this->addOption( $name, '', false, true ); 00018 } 00019 } 00020 00021 public function getDbType() { 00022 global $wgUseNormalUser; 00023 00024 return ( isset( $wgUseNormalUser ) && $wgUseNormalUser ) ? 00025 Maintenance::DB_STD : Maintenance::DB_ADMIN; 00026 } 00027 00031 protected function maybeHelp( $force = false ) { 00032 if ( !$force ) 00033 return; 00034 parent::maybeHelp( true ); 00035 } 00036 00037 public function execute() { 00038 global $args, $options; 00039 $args = $this->mArgs; 00040 $options = $this->mOptions; 00041 } 00042 } 00043 00044 $maintClass = 'CommandLineInc'; 00045 require( DO_MAINTENANCE ); 00046