* @ingroup Maintenance
*/
-require_once dirname( __FILE__ ) . '/Maintenance.php';
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to populate the fa_sha1 field.
public function doDBUpdates() {
$startTime = microtime( true );
- $dbw = wfGetDB( DB_MASTER );
+ $dbw = $this->getDB( DB_MASTER );
$table = 'filearchive';
$conds = array( 'fa_sha1' => '', 'fa_storage_key IS NOT NULL' );
if ( !$dbw->fieldExists( $table, 'fa_sha1', __METHOD__ ) ) {
$this->output( "fa_sha1 column does not exist\n\n", true );
+
return false;
}