2004-02-23 07:44:11 +00:00
|
|
|
<?php
|
2004-09-03 20:33:01 +00:00
|
|
|
/**
|
2010-12-16 19:15:12 +00:00
|
|
|
* Backwards-compatibility wrapper for old-style maintenance scripts.
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
|
*
|
|
|
|
|
* @file
|
|
|
|
|
* @ingroup Maintenance
|
2004-09-03 20:33:01 +00:00
|
|
|
*/
|
2010-12-16 19:15:12 +00:00
|
|
|
|
2010-05-22 16:50:39 +00:00
|
|
|
require( dirname( __FILE__ ) . '/Maintenance.php' );
|
2009-09-05 19:40:52 +00:00
|
|
|
|
2010-09-11 12:21:11 +00:00
|
|
|
global $optionsWithArgs;
|
2009-09-05 19:40:52 +00:00
|
|
|
if ( !isset( $optionsWithArgs ) ) {
|
2010-12-04 03:20:14 +00:00
|
|
|
$optionsWithArgs = array();
|
2009-09-05 19:40:52 +00:00
|
|
|
}
|
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
|
|
|
|
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';
|
2011-01-13 22:58:55 +00:00
|
|
|
require( RUN_MAINTENANCE_IF_MAIN );
|
2009-01-19 23:43:54 +00:00
|
|
|
|