Let crazy people run updates on broken setups like 5.3.1
[lhc/web/wiklou.git] / maintenance / populateSha1.php
index cc06a2a..72ef946 100644 (file)
@@ -55,10 +55,12 @@ class PopulateSha1 extends Maintenance {
                $oldimageTable = $dbw->tableName( 'oldimage' );
                $batch = array();
        
-               $cmd = 'mysql -u' . wfEscapeShellArg( $wgDBuser ) . 
-                       ' -h' . wfEscapeShellArg( $wgDBserver ) .
-                       ' -p' . wfEscapeShellArg( $wgDBpassword, $wgDBname );
                if ( $method == 'pipe' ) {
+                       // @fixme kill this and replace with a second unbuffered DB connection.
+                       global $wgDBuser, $wgDBserver, $wgDBpassword, $wgDBname;
+                       $cmd = 'mysql -u' . wfEscapeShellArg( $wgDBuser ) . 
+                               ' -h' . wfEscapeShellArg( $wgDBserver ) .
+                               ' -p' . wfEscapeShellArg( $wgDBpassword, $wgDBname );
                        $this->output( "Using pipe method\n" );
                        $pipe = popen( $cmd, 'w' );
                }