Remove return value from QueryPage::execute
authorumherirrender <umherirrender_de.wp@web.de>
Sun, 20 Jul 2014 20:31:58 +0000 (22:31 +0200)
committerIAlex <codereview@emsenhuber.ch>
Sun, 27 Jul 2014 15:48:19 +0000 (15:48 +0000)
The parent SpecialPage::execute also has no return and not all return
statements in QueryPage::execute actual return a value

Change-Id: If7a38ca5ed1107b6a5a740acae54295534950696

includes/specialpage/QueryPage.php

index 3a83d2b..b8fc05e 100644 (file)
@@ -470,7 +470,6 @@ abstract class QueryPage extends SpecialPage {
         * This is the actual workhorse. It does everything needed to make a
         * real, honest-to-gosh query page.
         * @param string $par
-        * @return int
         */
        function execute( $par ) {
                global $wgQueryCacheLimit, $wgDisableQueryPageUpdate;
@@ -488,7 +487,7 @@ abstract class QueryPage extends SpecialPage {
 
                if ( $this->isCached() && !$this->isCacheable() ) {
                        $out->addWikiMsg( 'querypage-disabled' );
-                       return 0;
+                       return;
                }
 
                $out->setSyndicated( $this->isSyndicated() );
@@ -578,8 +577,6 @@ abstract class QueryPage extends SpecialPage {
                }
 
                $out->addHTML( Xml::closeElement( 'div' ) );
-
-               return min( $this->numRows, $this->limit ); # do not return the one extra row, if exist
        }
 
        /**