From: Aaron Schulz Date: Tue, 24 Sep 2019 22:42:00 +0000 (-0700) Subject: Avoid uses of wfWikiId() in maintenance/ X-Git-Tag: 1.34.0-rc.0~102^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/%40%20%27info_date_publication_anterieure%27%20=%3E%20%27Previously%20published%20on:%27%2C%20%27info_date_referencement%27%20=%3E%20%27THIS%20SITE%20REFERENCED%20ON:%27%2C%20%27info_derniere_etape%27%20=%3E%20%27Done%21%27%2C-%27info_derniers_articles_publies%27%20=%3E%20%27Your%20most%20recently%20published%20articles%27%2C-%27info_desactiver_messagerie_personnelle%27%20=%3E%20%27You%20can%20enable%20or%20disable%20your%20personal%20messaging%20on%20this%20site.%27%2C%20%27info_descriptif%27%20=%3E%20%27Description:%27%2C%20%27info_desinstaller_plugin%27%20=%3E%20%27%20deactivates%20the%20plugin%20and%20deletes%20the%20data%27%2C%20%27info_discussion_cours%27%20=%3E%20%27Current%20discussions%27%2C%40%40%20-332%2C7%20%20284%2C6%20%40%40%20Do%20not%20submit%20this%20import%20request.%3Cp%3EFor%20more%20information%2C%20please%20see%20%3Ca%20href=?a=commitdiff_plain;h=110df55da94c238a1258a1b5486ff0a1c26a4b38;p=lhc%2Fweb%2Fwiklou.git Avoid uses of wfWikiId() in maintenance/ Change-Id: I81904c0ba7120d7da2454929ffec5c1c0892be02 --- diff --git a/maintenance/cleanupTable.inc b/maintenance/cleanupTable.inc index b78e691e8f..a7a6465727 100644 --- a/maintenance/cleanupTable.inc +++ b/maintenance/cleanupTable.inc @@ -87,7 +87,7 @@ class TableCleanup extends Maintenance { $this->output( sprintf( "%s %s: %6.2f%% done on %s; ETA %s [%d/%d] %.2f/sec <%.2f%% updated>\n", - wfWikiID(), + WikiMap::getCurrentWikiDbDomain()->getId(), wfTimestamp( TS_DB, intval( $now ) ), $portion * 100.0, $this->table, diff --git a/maintenance/userDupes.inc b/maintenance/userDupes.inc index 5f7f9d5e43..cbe5d27dc0 100644 --- a/maintenance/userDupes.inc +++ b/maintenance/userDupes.inc @@ -110,8 +110,9 @@ class UserDupes { * @return bool */ private function checkDupes( $doDelete = false ) { + $dbDomain = WikiMap::getCurrentWikiDbDomain()->getId(); if ( $this->hasUniqueIndex() ) { - echo wfWikiID() . " already has a unique index on its user table.\n"; + echo "$dbDomain already has a unique index on its user table.\n"; return true; } @@ -122,7 +123,7 @@ class UserDupes { $dupes = $this->getDupes(); $count = count( $dupes ); - $this->out( "Found $count accounts with duplicate records on " . wfWikiID() . ".\n" ); + $this->out( "Found $count accounts with duplicate records on $dbDomain.\n" ); $this->trimmed = 0; $this->reassigned = 0; $this->failed = 0; @@ -145,11 +146,13 @@ class UserDupes { if ( $this->trimmed > 0 ) { if ( $doDelete ) { - $this->out( "$this->trimmed duplicate user records were deleted from " - . wfWikiID() . ".\n" ); + $this->out( + "$this->trimmed duplicate user records were deleted from $dbDomain.\n" ); } else { - $this->out( "$this->trimmed duplicate user accounts were found on " - . wfWikiID() . " which can be removed safely.\n" ); + $this->out( + "$this->trimmed duplicate user accounts were found on $dbDomain " . + "which can be removed safely.\n" + ); } }