Index: SpecialLog.php =================================================================== RCS file: /cvsroot/wikipedia/phase3/includes/SpecialLog.php,v retrieving revision 1.20 diff -u -r1.20 SpecialLog.php --- SpecialLog.php 3 Apr 2005 15:18:51 -0000 1.20 +++ SpecialLog.php 19 Apr 2005 19:57:28 -0000 @@ -44,6 +44,7 @@ class LogReader { var $db, $joinClauses, $whereClauses; var $type = '', $user = '', $title = null; + var $numResults = 0; /** * @param WebRequest $request For internal use use a FauxRequest object to pass arbitrary parameters. @@ -233,6 +234,7 @@ function showList( &$out ) { global $wgLinkCache; $result = $this->reader->getRows(); + $this->numResults = 0; // Fetch results and form a batch link existence query $batch = new LinkBatch; @@ -247,14 +249,17 @@ $title = Title::newFromText( $paramArray[0] ); $batch->addObj( $title ); } + $this->numResults++; } $batch->execute( $wgLinkCache ); // Rewind result pointer and go through it again, making the HTML - $result->seek( 0 ); $html = "\n\n"; @@ -382,7 +387,7 @@ $html = wfViewPrevNext( $offset, $limit, $wgContLang->specialpage( 'Log' ), $bits, - false); + $this->numResults < $limit); $out->addHTML( '

' . $html . '

' ); } }