r62183 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62182‎ | r62183 | r62184 >
Date:16:15, 9 February 2010
Author:freakolowsky
Status:ok
Tags:
Comment:
replaced hardcoded LIMIT with limitResult function call
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php
@@ -474,9 +474,9 @@
475475 $nsmatch
476476 "./*AND cat.page_is_redirect = 0*/"
477477 $transWhere
478 - ORDER BY cl_sortkey
479 - LIMIT " . (int)$wgCategoryTreeMaxChildren;
480 -
 478+ ORDER BY cl_sortkey";
 479+ $sql = $dbr->limitResult($sql, (int)$wgCategoryTreeMaxChildren);
 480+
481481 $res = $dbr->query( $sql, __METHOD__ );
482482
483483 #collect categories separately from other pages
@@ -533,8 +533,8 @@
534534 $transJoin
535535 WHERE cl_from = " . $title->getArticleID() . "
536536 $transWhere
537 - ORDER BY cl_to
538 - LIMIT " . (int)$wgCategoryTreeMaxChildren;
 537+ ORDER BY cl_to";
 538+ $sql = $dbr->limitResult($sql, (int)$wgCategoryTreeMaxChildren);
539539
540540 $res = $dbr->query( $sql, __METHOD__ );
541541

Status & tagging log