2004-02-23 07:44:11 +00:00
|
|
|
<?php
|
2009-09-04 08:02:00 +00:00
|
|
|
|
2004-09-03 20:33:01 +00:00
|
|
|
/**
|
2009-09-04 08:02:00 +00:00
|
|
|
* Backwards-compatibility wrapper for old-style maintenance scripts
|
2004-09-03 20:33:01 +00:00
|
|
|
*/
|
2009-09-04 08:02:00 +00:00
|
|
|
require( dirname(__FILE__) . '/Maintenance.php' );
|
2009-09-05 19:40:52 +00:00
|
|
|
|
|
|
|
|
if ( !isset( $optionsWithArgs ) ) {
|
|
|
|
|
$optionsWithArgs = array();
|
|
|
|
|
}
|
2009-09-04 08:02:00 +00:00
|
|
|
|
|
|
|
|
class CommandLineInc extends Maintenance {
|
|
|
|
|
public function __construct() {
|
|
|
|
|
global $optionsWithArgs;
|
|
|
|
|
parent::__construct();
|
|
|
|
|
foreach ( $optionsWithArgs as $name ) {
|
|
|
|
|
$this->addOption( $name, '', false, true );
|
2008-06-04 01:46:53 +00:00
|
|
|
}
|
2009-09-24 21:41:17 +00:00
|
|
|
}
|
2004-08-14 06:10:56 +00:00
|
|
|
|
2010-03-10 12:59:44 +00:00
|
|
|
public function getDbType() {
|
2010-02-06 14:29:37 +00:00
|
|
|
global $wgUseNormalUser;
|
|
|
|
|
|
|
|
|
|
return ( isset( $wgUseNormalUser ) && $wgUseNormalUser ) ?
|
|
|
|
|
Maintenance::DB_STD : Maintenance::DB_ADMIN;
|
|
|
|
|
}
|
|
|
|
|
|
2009-09-24 21:41:17 +00:00
|
|
|
/**
|
|
|
|
|
* No help, it would just be misleading since it misses custom options
|
|
|
|
|
*/
|
|
|
|
|
protected function maybeHelp( $force = false ) {
|
|
|
|
|
if ( !$force )
|
|
|
|
|
return;
|
|
|
|
|
parent::maybeHelp( true );
|
2008-05-12 22:01:44 +00:00
|
|
|
}
|
2004-06-15 15:18:50 +00:00
|
|
|
|
2009-09-04 08:02:00 +00:00
|
|
|
public function execute() {
|
|
|
|
|
global $args, $options;
|
|
|
|
|
$args = $this->mArgs;
|
|
|
|
|
$options = $this->mOptions;
|
2007-12-06 21:07:49 +00:00
|
|
|
}
|
|
|
|
|
}
|
2006-09-28 09:04:39 +00:00
|
|
|
|
2009-09-04 08:02:00 +00:00
|
|
|
$maintClass = 'CommandLineInc';
|
|
|
|
|
require( DO_MAINTENANCE );
|
2009-01-19 23:43:54 +00:00
|
|
|
|