*/
function queryRedirect() {
if( $this->showRedirects ) {
- return 'AND cur_is_redirect=0';
- } else {
return '';
+ } else {
+ return 'AND page_is_redirect=0';
}
}
} else {
$this->namespaces = $this->userNamespaces( $user );
}
-
- $this->searchRedirects = false;
+
+ $this->searchRedirects = $request->getcheck( 'redirs' ) ? true : false;
}
/**
$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 );