From aa68aff5c6d28e776a9fb527c0be6a107bc0f02f Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 4 Aug 2009 23:09:43 +0000 Subject: [PATCH] Declare globals. Move this all inside the $method = pipe stuff anyway. --- maintenance/populateSha1.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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' ); } -- 2.20.1