Page MenuHomePhabricator

SpecialSearch-bug11380.php

Authored By
• bzimport
Nov 21 2014, 9:55 PM
Size
779 B
Referenced Files
None
Subscribers
None

SpecialSearch-bug11380.php

Index: includes/SpecialSearch.php
===================================================================
--- includes/SpecialSearch.php (revision 26125)
+++ includes/SpecialSearch.php (working copy)
@@ -75,6 +75,7 @@
function goResult( $term ) {
global $wgOut;
global $wgGoToEdit;
+ global $wgUser;
$this->setupPage( $term );
@@ -86,9 +87,9 @@
return $this->showResults( $term );
}
- # If there's an exact or very near match, jump right there.
+ # If there's an exact or very near match and it's among namespaces user is searching, jump right there.
$t = SearchEngine::getNearMatch( $term );
- if( !is_null( $t ) ) {
+ if( !is_null($t) && $wgUser->mOptions['searchNs'.$t->getNamespace()] ){
$wgOut->redirect( $t->getFullURL() );
return;
}

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3880
Default Alt Text
SpecialSearch-bug11380.php (779 B)

Event Timeline