Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: [RFC] Also show {{DISPLAYTITLE}} in search results
......................................................................

[RFC] Also show {{DISPLAYTITLE}} in search results

Did I missed that in I37fa6b6? You can look at this two ways:
Either you think the search results need to show the same labels as
the MediaWiki's core search results. Or you think the labels shown
in mobile should all show the {{DISPLAYTITLE}}. Personally I think
the later does make more sense.

Change-Id: If1a974842a672161c67e9ea6721315b37a85e009
---
M resources/mobile.search.api/SearchGateway.js
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/resources/mobile.search.api/SearchGateway.js 
b/resources/mobile.search.api/SearchGateway.js
index c88f4f7..b6e1190 100644
--- a/resources/mobile.search.api/SearchGateway.js
+++ b/resources/mobile.search.api/SearchGateway.js
@@ -31,7 +31,8 @@
                                gpssearch: query,
                                gpsnamespace: this.searchNamespace,
                                gpslimit: 15,
-                               prop: 'pageimages',
+                               prop: 'pageprops|pageimages',
+                               ppprop: 'displaytitle',
                                piprop: 'thumbnail',
                                pithumbsize: mw.config.get( 
'wgMFThumbnailSizes' ).tiny,
                                pilimit: 15,
@@ -145,7 +146,8 @@
                                                                        id: 
page.pageid,
                                                                        
heading: self._highlightSearchTerm( page.title, query ),
                                                                        title: 
page.title,
-                                                                       
displayTitle: mwTitle.getNameText(),
+                                                                       
displayTitle: page.pageprops && page.pageprops.displaytitle
+                                                                               
|| mwTitle.getNameText(),
                                                                        url: 
mwTitle.getUrl()
                                                                } );
                                                        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1a974842a672161c67e9ea6721315b37a85e009
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>

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

Reply via email to