From: Antoine Musso Date: Wed, 10 Aug 2005 21:12:00 +0000 (+0000) Subject: Fix bug 145: finish 'exclude redirect' implementation X-Git-Tag: 1.6.0~2037 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=b3ab52afc52aac7de195915525c096b34ed875d9;p=lhc%2Fweb%2Fwiklou.git Fix bug 145: finish 'exclude redirect' implementation --- diff --git a/includes/SearchMySQL.php b/includes/SearchMySQL.php index 310a7b93f0..407a1c74ef 100644 --- a/includes/SearchMySQL.php +++ b/includes/SearchMySQL.php @@ -61,9 +61,9 @@ class SearchMySQL extends SearchEngine { */ function queryRedirect() { if( $this->showRedirects ) { - return 'AND cur_is_redirect=0'; - } else { return ''; + } else { + return 'AND page_is_redirect=0'; } } diff --git a/includes/SpecialSearch.php b/includes/SpecialSearch.php index fda21c322c..4981c74819 100644 --- a/includes/SpecialSearch.php +++ b/includes/SpecialSearch.php @@ -69,8 +69,8 @@ class SpecialSearch { } else { $this->namespaces = $this->userNamespaces( $user ); } - - $this->searchRedirects = false; + + $this->searchRedirects = $request->getcheck( 'redirs' ) ? true : false; } /** @@ -164,6 +164,7 @@ class SpecialSearch { $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 );