Fix sourceforge bug 919061
authorAntoine Musso <hashar@users.mediawiki.org>
Fri, 9 Apr 2004 14:53:41 +0000 (14:53 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Fri, 9 Apr 2004 14:53:41 +0000 (14:53 +0000)
Show number of results instead of limit

includes/QueryPage.php

index 4f2dc0d..68db80e 100644 (file)
@@ -63,13 +63,15 @@ class QueryPage {
                $sql = $this->getSQL( $offset, $limit );
 
                $res = wfQuery( $sql, DB_READ, $fname );
-
+               
+               $num = wfNumRows($res);
+               
                $sk = $wgUser->getSkin( );
 
-               $top = wfShowingResults( $offset, $limit );
+               $top = wfShowingResults( $offset, $num);
                $wgOut->addHTML( "<p>{$top}\n" );
 
-               $sl = wfViewPrevNext( $offset, $limit, $wgLang->specialPage( $sname ) );
+               $sl = wfViewPrevNext( $offset, $limit , $wgLang->specialPage( $sname ) );
                $wgOut->addHTML( "<br />{$sl}</p>\n" );
 
                $s = "<ol start='" . ( $offset + 1 ) . "'>";