Remove LinkSearchPage::doQuery override
authorumherirrender <umherirrender_de.wp@web.de>
Fri, 26 Sep 2014 17:31:51 +0000 (19:31 +0200)
committerReedy <reedy@wikimedia.org>
Sat, 15 Nov 2014 21:56:31 +0000 (21:56 +0000)
It is not called and not working, because it missed return statements.

The validation check is done in getQueryInfo and the message is added in
execute, when needed.

Change-Id: I9acbd2f09a922d5a7d66e8ce55e8d24ae65ab560

includes/specials/SpecialLinkSearch.php

index 2d6213a..05c89c2 100644 (file)
@@ -285,24 +285,6 @@ class LinkSearchPage extends QueryPage {
                return $this->msg( 'linksearch-line' )->rawParams( $urlLink, $pageLink )->escaped();
        }
 
-       /**
-        * Override to check query validity.
-        *
-        * @param mixed $offset Numerical offset or false for no offset
-        * @param mixed $limit Numerical limit or false for no limit
-        */
-       function doQuery( $offset = false, $limit = false ) {
-               list( $this->mMungedQuery, ) = LinkSearchPage::mungeQuery( $this->mQuery, $this->mProt );
-               if ( $this->mMungedQuery === false ) {
-                       $this->getOutput()->addWikiMsg( 'linksearch-error' );
-               } else {
-                       // For debugging
-                       // Generates invalid xhtml with patterns that contain --
-                       //$this->getOutput()->addHTML( "\n<!-- " . htmlspecialchars( $this->mMungedQuery ) . " -->\n" );
-                       parent::doQuery( $offset, $limit );
-               }
-       }
-
        /**
         * Override to squash the ORDER BY.
         * We do a truncated index search, so the optimizer won't trust