X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FcommandLine.inc;h=a6274f0cc9f19838341fb77d88fd8c0365083bfb;hb=217efb5ed63308c52cee06976a69d7c478ac512f;hp=fc5147c6851e7f08b230cdb2ee26f1dbf0d1ae44;hpb=d62c3ba4d93fe0884d96b628fa2cb1fbe157c63b;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index fc5147c685..a6274f0cc9 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -76,7 +76,7 @@ for( $arg = reset( $argv ); $arg !== false; $arg = next( $argv ) ) { $wgCommandLineMode = true; # Turn off output buffering if it's on @ob_end_flush(); -$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":"; +$sep = PATH_SEPARATOR; if (!isset( $wgUseNormalUser ) ) { $wgUseNormalUser = false; @@ -126,7 +126,10 @@ if ( file_exists( '/home/wikipedia/common/langlist' ) ) { require_once( "$IP/includes/Defines.php" ); require_once( "$IP/CommonSettings.php" ); - if ( !$wgUseNormalUser ) { + if ( $wgUseRootUser ) { + $wgDBuser = $wgDBadminuser = "root"; + $wgDBpassword = $wgDBadminpassword = trim(`mysql_root_pass`); + } elseif ( !$wgUseNormalUser ) { $wgDBuser = $wgDBadminuser = "wikiadmin"; $wgDBpassword = $wgDBadminpassword = trim(`wikiadmin_pass`); } @@ -165,6 +168,11 @@ if ( empty( $wgUseNormalUser ) && isset( $wgDBadminuser ) && $wgDBservers ) { } } +if ( defined( 'MW_CMDLINE_CALLBACK' ) ) { + $fn = MW_CMDLINE_CALLBACK; + $fn(); +} + ini_set( 'memory_limit', -1 ); require_once( "Setup.php" );