dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42227d5
)
Fix exception when searching for stuff beginning with "Media:"
author
Max Semenik
<maxsem.wiki@gmail.com>
Thu, 22 Nov 2012 00:29:49 +0000
(
04:29
+0400)
committer
Max Semenik
<maxsem.wiki@gmail.com>
Thu, 22 Nov 2012 00:29:49 +0000
(
04:29
+0400)
Change-Id: I8b5a419fa369ad91034c3769a4b228290b878e1b
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;
}