From: Niklas Laxström Date: Tue, 2 Aug 2005 20:59:00 +0000 (+0000) Subject: Fix the borked SpecialAllpages X-Git-Tag: 1.6.0~2073 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=3cb228d461b8796c0142125aabd4c797dec72877;p=lhc%2Fweb%2Fwiklou.git Fix the borked SpecialAllpages --- diff --git a/includes/SpecialAllpages.php b/includes/SpecialAllpages.php index 584ed4af09..63b67af462 100644 --- a/includes/SpecialAllpages.php +++ b/includes/SpecialAllpages.php @@ -110,11 +110,15 @@ function showToplevel ( $namespace = NS_MAIN, $including = false ) { for( $i = 0; !$done; ++$i ) { // Fetch the last title of this chunk and the first of the next $chunk = is_null( $lastTitle ) - ? '1=1' + ? '' : 'page_title >= ' . $dbr->addQuotes( $lastTitle ); - $sql = "SELECT page_title $fromwhere AND $chunk $order_str " . - $dbr->limitResult( 2, $this->topLevelMax - 1 ); - $res = $dbr->query( $sql, $fname ); + $res = $dbr->select( + 'page', /* FROM */ + 'page_title', /* WHAT */ + $where + array( $chunk), + $fname, + array ('LIMIT' => 2, 'OFFSET' => $this->maxPerPage - 1, 'ORDER BY' => 'page_title') ); + if ( $s = $dbr->fetchObject( $res ) ) { array_push( $lines, $s->page_title ); } else {