Index: trunk/extensions/SemanticMediaWiki/RELEASE-NOTES |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | * Fixed display of properties of type URL (bug 30912). |
16 | 16 | * Fixed hide query functionality on Special:Ask (bug 30768). |
17 | 17 | * Fixed display of internal SMW helper constants in certain queries (bug 30969). |
18 | | -* Fixed some issue with the category result format (including bug 30761). |
| 18 | +* Fixed some issues with the category result format (including bug 30761). |
19 | 19 | |
20 | 20 | == SMW 1.6.1 == |
21 | 21 | |
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php |
— | — | @@ -72,9 +72,13 @@ |
73 | 73 | $nextrow = $res->getNext(); // look ahead |
74 | 74 | |
75 | 75 | $content = $row[0]->getContent(); |
76 | | - $sortkey = $res->getStore()->getWikiPageSortKey( $content[0] ); |
77 | | - $cur_first_char = $wgContLang->firstChar( $sortkey == '' ? $content[0]->getDBkey() : $sortkey ); |
78 | 76 | |
| 77 | + $cur_first_char = $wgContLang->firstChar( |
| 78 | + $content[0]->getDIType() == SMWDataItem::TYPE_WIKIPAGE ? |
| 79 | + $res->getStore()->getWikiPageSortKey( $content[0] ) |
| 80 | + : $content[0]->getSortKey() |
| 81 | + ); |
| 82 | + |
79 | 83 | if ( $rowindex % $rows_per_column == 0 ) { |
80 | 84 | $result .= "\n <div style=\"float: left; width: $column_width%;\">\n"; |
81 | 85 | if ( $cur_first_char == $prev_first_char ) |