Index: trunk/phase3/includes/CategoryPage.php |
— | — | @@ -347,7 +347,8 @@ |
348 | 348 | array( 'page', 'categorylinks', 'category' ), |
349 | 349 | array( 'page_id', 'page_title', 'page_namespace', 'page_len', |
350 | 350 | 'page_is_redirect', 'cl_sortkey', 'cat_id', 'cat_title', |
351 | | - 'cat_subcats', 'cat_pages', 'cat_files', 'cl_sortkey_prefix' ), |
| 351 | + 'cat_subcats', 'cat_pages', 'cat_files', |
| 352 | + 'cl_sortkey_prefix', 'cl_collation' ), |
352 | 353 | array_merge( array( 'cl_to' => $this->title->getDBkey() ), $extraConds ), |
353 | 354 | __METHOD__, |
354 | 355 | array( |
— | — | @@ -364,7 +365,14 @@ |
365 | 366 | $count = 0; |
366 | 367 | foreach ( $res as $row ) { |
367 | 368 | $title = Title::newFromRow( $row ); |
368 | | - $humanSortkey = $title->getCategorySortkey( $row->cl_sortkey_prefix ); |
| 369 | + if ( !$row->cl_collation ) { |
| 370 | + // Hack to make sure that while updating from 1.16 schema |
| 371 | + // and db is inconsistent, that the sky doesn't fall. |
| 372 | + // See r83544. Could perhaps be removed in a couple versions (?) |
| 373 | + $humanSortkey = $row->cl_sortkey; |
| 374 | + } else { |
| 375 | + $humanSortkey = $title->getCategorySortkey( $row->cl_sortkey_prefix ); |
| 376 | + } |
369 | 377 | |
370 | 378 | if ( ++$count > $this->limit ) { |
371 | 379 | # We've reached the one extra which shows that there |