dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
232e347
)
Merge "Fix exception when searching for stuff beginning with "Media:""
author
Nikerabbit
<niklas.laxstrom@gmail.com>
Fri, 23 Nov 2012 10:22:09 +0000
(10:22 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Fri, 23 Nov 2012 10:22:09 +0000
(10:22 +0000)
includes/search/SearchEngine.php
patch
|
blob
|
history
diff --git
a/includes/search/SearchEngine.php
b/includes/search/SearchEngine.php
index
ec542a6
..
fa7b872
100644
(file)
--- a/
includes/search/SearchEngine.php
+++ b/
includes/search/SearchEngine.php
@@
-187,6
+187,11
@@
class SearchEngine {
return null;
}
+ # Try files if searching in the Media: namespace
+ if ( $title->getNamespace() == NS_MEDIA ) {
+ $title = Title::makeTitle( NS_FILE, $title->getText() );
+ }
+
if ( $title->isSpecialPage() || $title->isExternal() || $title->exists() ) {
return $title;
}