(Bug 16677) Media: view URLs should HTTP-redirect to canonical File: namespace
This commit is contained in:
parent
7526a42586
commit
d64229f145
1 changed files with 4 additions and 0 deletions
|
|
@ -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() ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue