Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php |
— | — | @@ -474,9 +474,9 @@ |
475 | 475 | $nsmatch |
476 | 476 | "./*AND cat.page_is_redirect = 0*/" |
477 | 477 | $transWhere |
478 | | - ORDER BY cl_sortkey |
479 | | - LIMIT " . (int)$wgCategoryTreeMaxChildren; |
480 | | - |
| 478 | + ORDER BY cl_sortkey"; |
| 479 | + $sql = $dbr->limitResult($sql, (int)$wgCategoryTreeMaxChildren); |
| 480 | + |
481 | 481 | $res = $dbr->query( $sql, __METHOD__ ); |
482 | 482 | |
483 | 483 | #collect categories separately from other pages |
— | — | @@ -533,8 +533,8 @@ |
534 | 534 | $transJoin |
535 | 535 | WHERE cl_from = " . $title->getArticleID() . " |
536 | 536 | $transWhere |
537 | | - ORDER BY cl_to |
538 | | - LIMIT " . (int)$wgCategoryTreeMaxChildren; |
| 537 | + ORDER BY cl_to"; |
| 538 | + $sql = $dbr->limitResult($sql, (int)$wgCategoryTreeMaxChildren); |
539 | 539 | |
540 | 540 | $res = $dbr->query( $sql, __METHOD__ ); |
541 | 541 | |