From: Niklas Laxström Date: Fri, 22 Apr 2011 20:12:29 +0000 (+0000) Subject: Cleanup next/prev links on special:search. Removed unused mPrefix. X-Git-Tag: 1.31.0-rc.0~30626 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=d96682e95db0d28ded8c954f64866a3f981fa49b;p=lhc%2Fweb%2Fwiklou.git Cleanup next/prev links on special:search. Removed unused mPrefix. --- 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; }