And we now have CSSMin
[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
8 global $optionsWithArgs;
9 if ( !isset( $optionsWithArgs ) ) {
10 $optionsWithArgs = array();
11 }
12
13 class CommandLineInc extends Maintenance {
14 public function __construct() {
15 global $optionsWithArgs;
16 parent::__construct();
17 foreach ( $optionsWithArgs as $name ) {
18 $this->addOption( $name, '', false, true );
19 }
20 }
21
22 public function getDbType() {
23 global $wgUseNormalUser;
24
25 return ( isset( $wgUseNormalUser ) && $wgUseNormalUser ) ?
26 Maintenance::DB_STD : Maintenance::DB_ADMIN;
27 }
28
29 /**
30 * No help, it would just be misleading since it misses custom options
31 */
32 protected function maybeHelp( $force = false ) {
33 if ( !$force )
34 return;
35 parent::maybeHelp( true );
36 }
37
38 public function execute() {
39 global $args, $options;
40 $args = $this->mArgs;
41 $options = $this->mOptions;
42 }
43 }
44
45 $maintClass = 'CommandLineInc';
46 require( DO_MAINTENANCE );
47