From 61152ae1acc2f8e12317ed66e412370620e4a189 Mon Sep 17 00:00:00 2001 From: Reedy Date: Tue, 8 Oct 2024 21:40:00 +0100 Subject: [PATCH] maintenance: Minor cleanup * Call non static functions non statically * Remove unused getConfig() call Change-Id: I36d618c1f070b303c6d50966b23979d31fa8266a --- maintenance/migrateNamespace.php | 4 +--- maintenance/migrateTagTemplate.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/maintenance/migrateNamespace.php b/maintenance/migrateNamespace.php index c0d906dc..449f8017 100644 --- a/maintenance/migrateNamespace.php +++ b/maintenance/migrateNamespace.php @@ -39,14 +39,12 @@ class MigrateNamespace extends LoggedUpdateMaintenance { * @inheritDoc */ protected function doDBUpdates() { - $config = $this->getConfig(); - $this->output( "Running linter migrate namespace function, this may take a while\n" ); $batchSize = $this->getBatchSize(); $sleep = (int)$this->getOption( 'sleep', 1 ); - $dbw = self::getDB( DB_PRIMARY ); + $dbw = $this->getDB( DB_PRIMARY ); if ( !$dbw->fieldExists( 'linter', 'linter_namespace', __METHOD__ ) ) { $this->output( "Run update.php to add linter_namespace field to the linter table.\n" ); return false; diff --git a/maintenance/migrateTagTemplate.php b/maintenance/migrateTagTemplate.php index 5d127ac1..0743e324 100644 --- a/maintenance/migrateTagTemplate.php +++ b/maintenance/migrateTagTemplate.php @@ -43,7 +43,7 @@ class MigrateTagTemplate extends LoggedUpdateMaintenance { $batchSize = $this->getBatchSize(); $sleep = (int)$this->getOption( 'sleep', 1 ); - $dbw = self::getDB( DB_PRIMARY ); + $dbw = $this->getDB( DB_PRIMARY ); if ( !$dbw->fieldExists( 'linter', 'linter_template', __METHOD__ ) ) { $this->output( "Run update.php to add linter_tag and linter_template fields to the linter table.\n" ); return false;