Show range start and end in special page pagination
[lhc/web/wiklou.git] / includes / QueryPage.php
index 654b616..bb6a0c3 100644 (file)
@@ -411,7 +411,7 @@ abstract class QueryPage extends SpecialPage {
        /**
         * Somewhat deprecated, you probably want to be using execute()
         * @param int|bool $offset
-        * @oaram int|bool $limit
+        * @param int|bool $limit
         * @return ResultWrapper
         */
        function doQuery( $offset = false, $limit = false ) {
@@ -543,9 +543,9 @@ abstract class QueryPage extends SpecialPage {
                if ( $this->shownavigation ) {
                        $out->addHTML( $this->getPageHeader() );
                        if ( $this->numRows > 0 ) {
-                               $out->addHTML( $this->msg( 'showingresults' )->numParams(
+                               $out->addHTML( $this->msg( 'showingresultsinrange' )->numParams(
                                        min( $this->numRows, $this->limit ), # do not show the one extra row, if exist
-                                       $this->offset + 1 )->parseAsBlock() );
+                                       $this->offset + 1, (min( $this->numRows, $this->limit ) + $this->offset) )->parseAsBlock() );
                                # Disable the "next" link when we reach the end
                                $paging = $this->getLanguage()->viewPrevNext( $this->getPageTitle( $par ), $this->offset,
                                        $this->limit, $this->linkParameters(), ( $this->numRows <= $this->limit ) );