$rewritten = $search->replacePrefixes( $term );
$titleMatches = $search->searchTitle( $rewritten );
- if ( !( $titleMatches instanceof SearchResultTooMany ) ) {
- $textMatches = $search->searchText( $rewritten );
- }
+ $textMatches = $search->searchText( $rewritten );
$textStatus = null;
if ( $textMatches instanceof Status ) {
Xml::closeElement( 'div' )
);
- // Sometimes the search engine knows there are too many hits
- if ( $titleMatches instanceof SearchResultTooMany ) {
- $out->wrapWikiMsg( "==$1==\n", 'toomanymatches' );
-
- return;
- }
-
$filePrefix = $wgContLang->getFormattedNsText( NS_FILE ) . ':';
if ( trim( $term ) === '' || $filePrefix === trim( $term ) ) {
$out->addHTML( $this->formHeader( $term, 0, 0 ) );
if ( $user->isLoggedIn() &&
!is_null( $request->getVal( 'nsRemember' ) ) &&
- $user->matchEditToken( $request->getVal( 'nsToken' ) )
+ $user->matchEditToken(
+ $request->getVal( 'nsToken' ),
+ 'searchnamespace',
+ $request
+ )
) {
// Reset namespace preferences: namespaces are not searched
// when they're not mentioned in the URL parameters.
$remember = '';
$user = $this->getUser();
if ( $user->isLoggedIn() ) {
- $remember .= Html::hidden( 'nsToken', $user->getEditToken() ) .
+ $remember .= Html::hidden(
+ 'nsToken',
+ $user->getEditToken(
+ 'searchnamespace',
+ $this->getRequest()
+ )
+ ) .
Xml::checkLabel(
wfMessage( 'powersearch-remember' )->text(),
'nsRemember',