r46020 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46019‎ | r46020 | r46021 >
Date:14:31, 22 January 2009
Author:philip
Status:resolved (Comments)
Tags:
Comment:
Enable LanguageConverter on Category Pages.
Modified paths:
  • /trunk/phase3/includes/CategoryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/CategoryPage.php
@@ -192,9 +192,10 @@
193193 */
194194 function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) {
195195 global $wgContLang;
 196+ $titletext = $wgContLang->convert($title);
196197 $this->articles[] = $isRedirect
197 - ? '<span class="redirect-in-category">' . $this->getSkin()->makeKnownLinkObj( $title ) . '</span>'
198 - : $this->getSkin()->makeSizeLinkObj( $pageLength, $title );
 198+ ? '<span class="redirect-in-category">' . $this->getSkin()->makeKnownLinkObj( $title, $titletext ) . '</span>'
 199+ : $this->getSkin()->makeSizeLinkObj( $pageLength, $title, $titletext );
199200 $this->articles_start_char[] = $wgContLang->convert( $wgContLang->firstChar( $sortkey ) );
200201 }
201202

Follow-up revisions

RevisionCommit summaryAuthorDate
r46489* (bug 17207) Fix regression breaking category page display on PHP 5.1...brion21:32, 28 January 2009
r53780Follow up on r46020 and r46489. Improve the $wgContLang->convert() calling pr...philip15:54, 26 July 2009

Comments

#Comment by Wmrwiki (talk | contribs)   17:44, 22 January 2009

test

#Comment by Brion VIBBER (talk | contribs)   21:33, 28 January 2009

This caused regression bug 17207, breaking category page display on PHP 5.1.

The call to $wgContLang->convert() mistakenly passed the title *object* instead of the text. In PHP 5.2, this was silently converted to a string, but in older versions this would interpolate as something useless like "Object id #110".

Fixed in r46489

Status & tagging log