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

Change subject: Further split $wgMFDisplayWikibaseDescriptions
......................................................................


Further split $wgMFDisplayWikibaseDescriptions

Add "nearby" and "watchlist" flags, which have the same behaviour as the
"search" flag added in I1e99714 but are specific to the Nearby- and
WatchListGateway gateway classes respectively.

Bug: T138788
Change-Id: I5ded6ae288ce9bcaa654ac85971ae0cc9541ece3
---
M README.md
M extension.json
M resources/mobile.nearby/NearbyGateway.js
M resources/mobile.watchlist/WatchListGateway.js
M tests/browser/LocalSettings.php
5 files changed, 11 insertions(+), 3 deletions(-)

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



diff --git a/README.md b/README.md
index da6ced7..5bf0aae 100644
--- a/README.md
+++ b/README.md
@@ -546,7 +546,9 @@
 
 ```
 $wgMFDisplayWikibaseDescriptions = [
-  'search' => false,
+  'search' => true,
+  'nearby' => true,
+  'watchlist' => false,
   'tagline' => true,
 ];
 ```
@@ -556,6 +558,8 @@
 ```
 [
   'search' => false,
+  'nearby' => false,
+  'watchlist' => false,
   'tagline' => false,
 ]
 ```
diff --git a/extension.json b/extension.json
index 6bcd002..9bbefd5 100644
--- a/extension.json
+++ b/extension.json
@@ -2023,6 +2023,8 @@
                "MFDisplayWikibaseDescriptionsAsTaglines": false,
                "MFDisplayWikibaseDescriptions": {
                        "search": false,
+                       "nearby": false,
+                       "watchlist": false,
                        "tagline": false
                },
                "MFRSSFeedLink": false,
diff --git a/resources/mobile.nearby/NearbyGateway.js 
b/resources/mobile.nearby/NearbyGateway.js
index 6d6a56a..18a2efa 100644
--- a/resources/mobile.nearby/NearbyGateway.js
+++ b/resources/mobile.nearby/NearbyGateway.js
@@ -133,7 +133,7 @@
                        }, params, mw.config.get( 'wgMFSearchAPIParams' ) );
 
                        // Are Wikibase descriptions enabled?
-                       if ( mw.config.get( 'wgMFDisplayWikibaseDescriptions', 
{} ).search ) {
+                       if ( mw.config.get( 'wgMFDisplayWikibaseDescriptions', 
{} ).nearby ) {
                                if ( $.inArray( 'pageterms', params.prop ) === 
-1 ) {
                                        requestParams.prop.push( 'pageterms' );
                                }
diff --git a/resources/mobile.watchlist/WatchListGateway.js 
b/resources/mobile.watchlist/WatchListGateway.js
index 7a801c0..6416443 100644
--- a/resources/mobile.watchlist/WatchListGateway.js
+++ b/resources/mobile.watchlist/WatchListGateway.js
@@ -45,7 +45,7 @@
                                }, this.continueParams, mw.config.get( 
'wgMFSearchAPIParams' ) );
 
                        // Are Wikibase descriptions enabled?
-                       if ( mw.config.get( 'wgMFDisplayWikibaseDescriptions', 
{} ).search ) {
+                       if ( mw.config.get( 'wgMFDisplayWikibaseDescriptions', 
{} ).watchlist ) {
                                if ( $.inArray( 'pageterms', params.prop ) === 
-1 ) {
                                        params.prop.push( 'pageterms' );
                                }
diff --git a/tests/browser/LocalSettings.php b/tests/browser/LocalSettings.php
index 522f88d..26f9757 100644
--- a/tests/browser/LocalSettings.php
+++ b/tests/browser/LocalSettings.php
@@ -29,5 +29,7 @@
 $wgMFUseWikibase = true;
 $wgMFDisplayWikibaseDescriptions = [
        'search' => true,
+       'nearby' => true,
+       'watchlist' => true,
        'tagline' => true,
 ];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ded6ae288ce9bcaa654ac85971ae0cc9541ece3
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Phuedx <g...@samsmith.io>
Gerrit-Reviewer: Jdlrobson <jrob...@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