Revert "Add type hint against LinkTarget"
[lhc/web/wiklou.git] / maintenance / populateFilearchiveSha1.php
index 850a5a5..24c25b1 100644 (file)
@@ -21,7 +21,7 @@
  * @ingroup Maintenance
  */
 
-require_once dirname( __FILE__ ) . '/Maintenance.php';
+require_once __DIR__ . '/Maintenance.php';
 
 /**
  * Maintenance script to populate the fa_sha1 field.
@@ -32,7 +32,7 @@ require_once dirname( __FILE__ ) . '/Maintenance.php';
 class PopulateFilearchiveSha1 extends LoggedUpdateMaintenance {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Populate the fa_sha1 field from fa_storage_key";
+               $this->addDescription( 'Populate the fa_sha1 field from fa_storage_key' );
        }
 
        protected function getUpdateKey() {
@@ -45,7 +45,7 @@ class PopulateFilearchiveSha1 extends LoggedUpdateMaintenance {
 
        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' );