Aude has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/246115

Change subject: Show displaytext as title in Special:Nearby [WIP]
......................................................................

Show displaytext as title in Special:Nearby [WIP]

proposed solution... to have an api prop that gives
displaytext, which is normally Title::getPrefixedText as
done now, but can be displaytitle or extensions can
customize it (e.g. Wikibase).

I'm not totally sure if displaytitle is the right thing
always though or needs controlling for size / color styles?

Bug: T115014
Change-Id: I52a37d3f4b870f2ab188f93856ac5ce1c0f7a569
---
M resources/mobile.nearby/NearbyGateway.js
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/15/246115/1

diff --git a/resources/mobile.nearby/NearbyGateway.js 
b/resources/mobile.nearby/NearbyGateway.js
index 926c28f..f449f64 100644
--- a/resources/mobile.nearby/NearbyGateway.js
+++ b/resources/mobile.nearby/NearbyGateway.js
@@ -125,8 +125,7 @@
                        requestParams = {
                                action: 'query',
                                colimit: 'max',
-                               prop: 'pageprops|pageimages|coordinates',
-                               ppprop: 'displaytitle',
+                               prop: 'pageimages|coordinates|displaytext',
                                pithumbsize: mw.config.get( 
'wgMFThumbnailSizes' ).small,
                                pilimit: limit,
                                generator: 'geosearch',
@@ -170,7 +169,7 @@
                                        var coords, lngLat, p;
                                        // FIXME: API returns pageid rather 
than id, should we rename Page option ?
                                        page.id = page.pageid;
-                                       page.displayTitle = page.pageprops && 
page.pageprops.displaytitle || '';
+                                       page.displayTitle = page.displaytext || 
'';
                                        p = new Page( page );
                                        p.anchor = 'item_' + i;
                                        if ( page.coordinates && loc ) { // 
FIXME: protect against bug 47133 (remove when resolved)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52a37d3f4b870f2ab188f93856ac5ce1c0f7a569
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Aude <aude.w...@gmail.com>

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

Reply via email to