* Rewrote commandLine.inc to be a simple wrapper around Maintenance.php
[lhc/web/wiklou.git] / maintenance / commandLine.inc
1 <?php
2
3 /**
4 * Backwards-compatibility wrapper for old-style maintenance scripts
5 */
6 require( dirname(__FILE__) . '/Maintenance.php' );
7 $optionsWithArgs = array();
8
9 class CommandLineInc extends Maintenance {
10 public function __construct() {
11 global $optionsWithArgs;
12 parent::__construct();
13 foreach ( $optionsWithArgs as $name ) {
14 $this->addOption( $name, '', false, true );
15 }
16
17 # No help, it would just be misleading since it misses custom options
18 unset( $this->mParams['help'] );
19 }
20
21 public function execute() {
22 global $args, $options;
23 $args = $this->mArgs;
24 $options = $this->mOptions;
25 }
26 }
27
28 $maintClass = 'CommandLineInc';
29 require( DO_MAINTENANCE );
30