diff options
Diffstat (limited to 'includes/SpecialSearch.php')
-rw-r--r-- | includes/SpecialSearch.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/SpecialSearch.php b/includes/SpecialSearch.php index 20948b96aed3..fe883874d2b4 100644 --- a/includes/SpecialSearch.php +++ b/includes/SpecialSearch.php @@ -70,7 +70,7 @@ class SpecialSearch { $this->namespaces = $this->userNamespaces( $user ); } - $this->searchRedirects = false; + $this->searchRedirects = $request->getcheck( 'redirs' ) ? true : false; } /** @@ -161,9 +161,10 @@ class SpecialSearch { return; } - $search =& SearchEngine::create(); + $search = SearchEngine::create(); $search->setLimitOffset( $this->limit, $this->offset ); $search->setNamespaces( $this->namespaces ); + $search->showRedirects = $this->searchRedirects; $titleMatches = $search->searchTitle( $term ); $textMatches = $search->searchText( $term ); @@ -223,7 +224,7 @@ class SpecialSearch { function setupPage( $term ) { global $wgOut; $wgOut->setPageTitle( wfMsg( 'searchresults' ) ); - $wgOut->setSubtitle( wfMsg( 'searchquery', $term ) ); + $wgOut->setSubtitle( htmlspecialchars( wfMsg( 'searchquery', $term ) ) ); $wgOut->setArticleRelated( false ); $wgOut->setRobotpolicy( 'noindex,nofollow' ); } |