r83876 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83875‎ | r83876 | r83877 >
Date:10:03, 14 March 2011
Author:catrope
Status:ok
Tags:
Comment:
Revert r67661 (change Title::makeTitle(NS_SPECIAL, $foo) to SpecialPage::getTitleFor($foo)), caused bug 27671 (search suggestions no longer list canonical names for special pages). Went with makeTitleSafe() instead of makeTitle() just in case weird things make their way into the special page aliases.
Modified paths:
  • /trunk/phase3/includes/PrefixSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/PrefixSearch.php
@@ -107,7 +107,11 @@
108108 foreach( $keys as $pageKey => $page ) {
109109 if( $searchKey === '' || strpos( $pageKey, $searchKey ) === 0 ) {
110110 wfSuppressWarnings();
111 - $srchres[] = SpecialPage::getTitleFor( $page )->getPrefixedText();
 111+ // bug 27671: Don't use SpecialPage::getTitleFor() here because it
 112+ // localizes its input leading to searches for e.g. Special:All
 113+ // returning Spezial:MediaWiki-Systemnachrichten and returning
 114+ // Spezial:Alle_Seiten twice when $wgLanguageCode == 'de'
 115+ $srchres[] = Title::makeTitleSafe( NS_SPECIAL, $page )->getPrefixedText();
112116 wfRestoreWarnings();
113117 }
114118

Follow-up revisions

RevisionCommit summaryAuthorDate
r844201.17wmf1: MFT r76372, r76377, r83586, r83587, r83817, r83876, r83979, r84118,...catrope21:04, 20 March 2011
r85354MFT r82518, r82530, r82538, r82547, r82550, r82565, r82572, r82608, r82696, r...demon18:25, 4 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r67661Replace Title::makeTitle[Safe]( NS_SPECIAL, 'x' ) with SpecialPage::getTitleF...siebrand19:36, 8 June 2010

Status & tagging log