jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385790 )

Change subject: Fix CheckModelVersions maintenance script
......................................................................


Fix CheckModelVersions maintenance script

$wgOresWikiId can be null, using the proper method to get wiki id

Change-Id: Ic4a49b176da6c6551ddaf79215ad62e5af1032e3
---
M maintenance/CheckModelVersions.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  jenkins-bot: Verified
  Halfak: Looks good to me, approved



diff --git a/maintenance/CheckModelVersions.php 
b/maintenance/CheckModelVersions.php
index f9b9c04..c5f365d 100644
--- a/maintenance/CheckModelVersions.php
+++ b/maintenance/CheckModelVersions.php
@@ -61,16 +61,16 @@
         * @throws \RuntimeException
         */
        protected function getModels() {
-               global $wgOresWikiId;
+               $wikiId = Api::getWikiID();
                $timestamp = \wfTimestampNow();
                $api = new Api();
                // Bypass the varnish cache
                $modelData = $api->request( [ $timestamp => true ] );
-               if ( !isset( $modelData[$wgOresWikiId] ) || empty( 
$modelData[$wgOresWikiId]['models'] ) ) {
+               if ( !isset( $modelData[$wikiId] ) || empty( 
$modelData[$wikiId]['models'] ) ) {
                        throw new \RuntimeException( 'Bad response from ORES 
when requesting models: '
                                . json_encode( $modelData ) );
                }
-               return $modelData[$wgOresWikiId]['models'];
+               return $modelData[$wikiId]['models'];
        }
 
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/385790
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4a49b176da6c6551ddaf79215ad62e5af1032e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <ladsgr...@gmail.com>
Gerrit-Reviewer: Halfak <ahalfa...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to