r60065 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60064‎ | r60065 | r60066 >
Date:07:37, 15 December 2009
Author:yaron
Status:deferred
Tags:
Comment:
Fixed getting of header character to use $wgContLang->firstChar(), to work across all languages
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Category.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Category.php
@@ -47,6 +47,7 @@
4848 }
4949
5050 protected function getResultText($res,$outputmode) {
 51+ global $wgContLang;
5152
5253 // <H3> will generate TOC entries otherwise. Probably need another way
5354 // to accomplish this -- user might still want TOC for other page content.
@@ -67,7 +68,7 @@
6869
6970 $content = $row[0]->getContent();
7071 $sortkey = $content[0]->getSortkey();
71 - $cur_first_char = $sortkey{0};
 72+ $cur_first_char = $wgContLang->firstChar($sortkey);
7273 if ($rowindex % $rows_per_column == 0) {
7374 $result .= "\n <div style=\"float: left; width: $column_width%;\">\n";
7475 if ($cur_first_char == $prev_first_char)

Status & tagging log