Index: branches/wmf/1.16wmf4/extensions/CategoryTree/CategoryTreeFunctions.php |
— | — | @@ -419,13 +419,13 @@ |
420 | 420 | $namespaces = $this->getOption('namespaces'); |
421 | 421 | |
422 | 422 | if ( $inverse ) { |
423 | | - $ctJoinCond = ' cl_to = cat.page_title AND cat.page_namespace = ' . NS_CATEGORY; |
| 423 | + $ctJoinCond = ' ON cl_to = cat.page_title AND cat.page_namespace = ' . NS_CATEGORY; |
424 | 424 | $ctWhere = ' cl_from = ' . $title->getArticleId(); |
425 | 425 | $ctJoin = ' RIGHT JOIN '; |
426 | 426 | $nsmatch = ''; |
427 | 427 | } |
428 | 428 | else { |
429 | | - $ctJoinCond = ' cl_from = cat.page_id '; |
| 429 | + $ctJoinCond = ' FORCE INDEX (cl_sortkey) ON cl_from = cat.page_id '; |
430 | 430 | $ctWhere = ' cl_to = ' . $dbr->addQuotes( $title->getDBkey() ); |
431 | 431 | $ctJoin = ' JOIN '; |
432 | 432 | |
— | — | @@ -467,7 +467,7 @@ |
468 | 468 | $transFields |
469 | 469 | $countFields |
470 | 470 | FROM $page as cat |
471 | | - $ctJoin $categorylinks ON $ctJoinCond |
| 471 | + $ctJoin $categorylinks $ctJoinCond |
472 | 472 | $transJoin |
473 | 473 | $countJoin |
474 | 474 | WHERE $ctWhere |