From: Chad Horohoe Date: Tue, 4 Aug 2009 23:09:43 +0000 (+0000) Subject: Declare globals. Move this all inside the $method = pipe stuff anyway. X-Git-Tag: 1.31.0-rc.0~40503 X-Git-Url: http://git.cyclocoop.org/%22.%20%20%20generer_url_action%28%22logout%22%2C%22logout=prive%22%29%20.%20%20%20%22?a=commitdiff_plain;h=aa68aff5c6d28e776a9fb527c0be6a107bc0f02f;p=lhc%2Fweb%2Fwiklou.git Declare globals. Move this all inside the $method = pipe stuff anyway. --- diff --git a/maintenance/populateSha1.php b/maintenance/populateSha1.php index cc06a2ae9e..4233cb2a10 100644 --- a/maintenance/populateSha1.php +++ b/maintenance/populateSha1.php @@ -55,10 +55,11 @@ 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' ) { + 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' ); }