* @ingroup Maintenance
*/
-require_once( dirname(__FILE__).'/Maintenance.php' );
+require_once( dirname( __FILE__ ) . '/Maintenance.php' );
class PopulateSha1 extends Maintenance {
public function __construct() {
$t = -microtime( true );
$dbw = wfGetDB( DB_MASTER );
- if( $file ) {
- $res = $dbw->selectRow(
- 'image',
- array( 'img_name' ),
+ if ( $file ) {
+ $res = $dbw->selectRow(
+ 'image',
+ array( 'img_name' ),
array( 'img_name' => $dbw->addQuotes( $file ) ),
__METHOD__
);
- if( !$res ) {
+ if ( !$res ) {
$this->error( "No such file: $file", true );
return;
}
if ( $method == 'pipe' ) {
// @fixme kill this and replace with a second unbuffered DB connection.
global $wgDBuser, $wgDBserver, $wgDBpassword, $wgDBname;
- $cmd = 'mysql -u' . wfEscapeShellArg( $wgDBuser ) .
+ $cmd = 'mysql -u' . wfEscapeShellArg( $wgDBuser ) .
' -h' . wfEscapeShellArg( $wgDBserver ) .
' -p' . wfEscapeShellArg( $wgDBpassword, $wgDBname );
$this->output( "Using pipe method\n" );