r54408 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54407‎ | r54408 | r54409 >
Date:23:09, 4 August 2009
Author:demon
Status:ok
Tags:
Comment:
Declare globals. Move this all inside the $method = pipe stuff anyway.
Modified paths:
  • /trunk/phase3/maintenance/populateSha1.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/populateSha1.php
@@ -55,10 +55,11 @@
5656 $oldimageTable = $dbw->tableName( 'oldimage' );
5757 $batch = array();
5858
59 - $cmd = 'mysql -u' . wfEscapeShellArg( $wgDBuser ) .
60 - ' -h' . wfEscapeShellArg( $wgDBserver ) .
61 - ' -p' . wfEscapeShellArg( $wgDBpassword, $wgDBname );
6259 if ( $method == 'pipe' ) {
 60+ global $wgDBuser, $wgDBserver, $wgDBpassword, $wgDBname;
 61+ $cmd = 'mysql -u' . wfEscapeShellArg( $wgDBuser ) .
 62+ ' -h' . wfEscapeShellArg( $wgDBserver ) .
 63+ ' -p' . wfEscapeShellArg( $wgDBpassword, $wgDBname );
6364 $this->output( "Using pipe method\n" );
6465 $pipe = popen( $cmd, 'w' );
6566 }

Status & tagging log