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:
7526a42
)
(Bug 16677) Media: view URLs should HTTP-redirect to canonical File: namespace
author
Aaron Schulz
<aaron@users.mediawiki.org>
Tue, 23 Dec 2008 21:05:33 +0000
(21:05 +0000)
committer
Aaron Schulz
<aaron@users.mediawiki.org>
Tue, 23 Dec 2008 21:05:33 +0000
(21:05 +0000)
includes/Wiki.php
patch
|
blob
|
history
diff --git
a/includes/Wiki.php
b/includes/Wiki.php
index
c5f745d
..
2e00cde
100644
(file)
--- a/
includes/Wiki.php
+++ b/
includes/Wiki.php
@@
-218,6
+218,10
@@
class MediaWiki {
} else if( NS_SPECIAL == $title->getNamespace() ) {
/* actions that need to be made when we have a special pages */
SpecialPage::executePath( $title );
+ } else if( NS_MEDIA == $title->getNamespace() ) {
+ global $wgOut;
+ $fileTitle = Title::makeTitle( NS_FILE, $title->getDBKey() );
+ $wgOut->redirect( $fileTitle->getFullUrl() );
} else {
/* Try low-level file cache hit */
if( $title->getNamespace() != NS_MEDIAWIKI && HTMLFileCache::useFileCache() ) {