jenkins-bot has submitted this change and it was merged.

Change subject: Clean cruft in 
CNBannerChoiceDataResourceLoaderModule::getChoices()
......................................................................


Clean cruft in CNBannerChoiceDataResourceLoaderModule::getChoices()

Change-Id: Ib1cf7109aeef279b9649349e8d19be61d776fe9e
---
M includes/CNBannerChoiceDataResourceLoaderModule.php
1 file changed, 3 insertions(+), 6 deletions(-)

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



diff --git a/includes/CNBannerChoiceDataResourceLoaderModule.php 
b/includes/CNBannerChoiceDataResourceLoaderModule.php
index a86df39..6cb8a70 100644
--- a/includes/CNBannerChoiceDataResourceLoaderModule.php
+++ b/includes/CNBannerChoiceDataResourceLoaderModule.php
@@ -17,16 +17,13 @@
        const API_REQUEST_TIMEOUT = 20;
 
        protected function getChoices( ResourceLoaderContext $context ) {
-               global $wgNoticeProject,
-                       $wgUser,
-                       $wgCentralNoticeApiUrl,
-                       $wgCentralDBname;
+               global $wgNoticeProject, $wgCentralNoticeApiUrl;
 
                $project = $wgNoticeProject;
                $language = $context->getLanguage();
 
-               // Fetch the data via the DB or the API. Decide which to use 
based
-               // on whether the appropriate global variables are set.
+               // Only fetch the data via the API if $wgCentralNoticeApiUrl is 
set.
+               // Otherwise, use the DB.
                if ( $wgCentralNoticeApiUrl ) {
                        $choices = $this->getFromApi( $project, $language );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1cf7109aeef279b9649349e8d19be61d776fe9e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to