*/
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 ..