Braces and spaces
[lhc/web/wiklou.git] / maintenance / commandLine.inc
index 625161a..0720e76 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Backwards-compatibility wrapper for old-style maintenance scripts
  */
-require( dirname(__FILE__) . '/Maintenance.php' );
+require( dirname( __FILE__ ) . '/Maintenance.php' );
 
 if ( !isset( $optionsWithArgs ) ) {
     $optionsWithArgs = array();
@@ -18,6 +18,13 @@ class CommandLineInc extends Maintenance {
                }
        }
 
+       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
         */