Merge "Remove searchlimit preference"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 8 Jan 2014 18:49:22 +0000 (18:49 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 8 Jan 2014 18:49:22 +0000 (18:49 +0000)
1  2 
includes/specials/SpecialSearch.php

@@@ -120,7 -120,7 +120,7 @@@ class SpecialSearch extends SpecialPag
         */
        public function load() {
                $request = $this->getRequest();
-               list( $this->limit, $this->offset ) = $request->getLimitOffset( 20, 'searchlimit' );
+               list( $this->limit, $this->offset ) = $request->getLimitOffset( 20 );
                $this->mPrefix = $request->getVal( 'prefix', '' );
  
                $user = $this->getUser();
                }
  
                $t = Title::newFromText( $term );
 +              $showSuggestion = $t === null || !$t->isKnown();
 +              $search->setShowSuggestion( $showSuggestion );
  
                // fetch search results
                $rewritten = $search->replacePrefixes( $term );
                }
  
                // did you mean... suggestions
 -              if ( $textMatches && !$textStatus && $textMatches->hasSuggestion() ) {
 +              if ( $showSuggestion && $textMatches && !$textStatus && $textMatches->hasSuggestion() ) {
                        $st = SpecialPage::getTitleFor( 'Search' );
  
                        # mirror Go/Search behavior of original request ..