From d96682e95db0d28ded8c954f64866a3f981fa49b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Fri, 22 Apr 2011 20:12:29 +0000 Subject: [PATCH] Cleanup next/prev links on special:search. Removed unused mPrefix. --- includes/specials/SpecialSearch.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 25ceda63e8..7fe8e0e4b5 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -81,7 +81,6 @@ class SpecialSearch extends SpecialPage { */ public function load( &$request, &$user ) { list( $this->limit, $this->offset ) = $request->getLimitOffset( 20, 'searchlimit' ); - $this->mPrefix = $request->getVal('prefix', ''); # Extract manually requested namespaces @@ -177,7 +176,6 @@ class SpecialSearch extends SpecialPage { $search->setNamespaces( $this->namespaces ); $search->showRedirects = $this->searchRedirects; // BC $search->setFeatureData( 'list-redirects', $this->searchRedirects ); - $search->prefix = $this->mPrefix; $term = $search->transformSearchTerm($term); wfRunHooks( 'SpecialSearchSetupEngine', array( $this, $this->profile, $search ) ); @@ -430,12 +428,13 @@ class SpecialSearch extends SpecialPage { */ protected function powerSearchOptions() { $opt = array(); - foreach( $this->namespaces as $n ) { - $opt['ns' . $n] = 1; - } $opt['redirs'] = $this->searchRedirects ? 1 : 0; - if( $this->profile ) { + if( $this->profile !== 'advanced' ) { $opt['profile'] = $this->profile; + } else { + foreach( $this->namespaces as $n ) { + $opt['ns' . $n] = 1; + } } return $opt; } -- 2.20.1