From 3cb228d461b8796c0142125aabd4c797dec72877 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Tue, 2 Aug 2005 20:59:00 +0000 Subject: [PATCH] Fix the borked SpecialAllpages --- includes/SpecialAllpages.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 { -- 2.20.1