/**
* Backwards-compatibility wrapper for old-style maintenance scripts
*/
-require( dirname(__FILE__) . '/Maintenance.php' );
+require( dirname( __FILE__ ) . '/Maintenance.php' );
+global $optionsWithArgs;
if ( !isset( $optionsWithArgs ) ) {
- $optionsWithArgs = array();
+ $optionsWithArgs = array();
}
class CommandLineInc extends Maintenance {
foreach ( $optionsWithArgs as $name ) {
$this->addOption( $name, '', false, true );
}
+ }
+
+ public function getDbType() {
+ global $wgUseNormalUser;
+
+ return ( isset( $wgUseNormalUser ) && $wgUseNormalUser ) ?
+ Maintenance::DB_STD : Maintenance::DB_ADMIN;
+ }
- # No help, it would just be misleading since it misses custom options
- unset( $this->mParams['help'] );
+ /**
+ * No help, it would just be misleading since it misses custom options
+ */
+ protected function maybeHelp( $force = false ) {
+ if ( !$force )
+ return;
+ parent::maybeHelp( true );
}
public function execute() {