summaryrefslogtreecommitdiff
path: root/includes/ImageFunctions.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-07-28 11:52:48 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-07-28 11:52:48 +0200
commit222b01f5169f1c7e69762e0e8904c24f78f71882 (patch)
tree8e932e12546bb991357ec48eb1638d1770be7a35 /includes/ImageFunctions.php
parent00ab76a6b686e98a914afc1975812d2b1aaa7016 (diff)
update to MediaWiki 1.16.0
Diffstat (limited to 'includes/ImageFunctions.php')
-rw-r--r--includes/ImageFunctions.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/ImageFunctions.php b/includes/ImageFunctions.php
index 73d935a7..5f01ab6e 100644
--- a/includes/ImageFunctions.php
+++ b/includes/ImageFunctions.php
@@ -123,6 +123,12 @@ function wfIsBadImage( $name, $contextTitle = false ) {
static $badImages = false;
wfProfileIn( __METHOD__ );
+ # Handle redirects
+ $redirectTitle = RepoGroup::singleton()->checkRedirect( Title::makeTitle( NS_FILE, $name ) );
+ if( $redirectTitle ) {
+ $name = $redirectTitle->getDbKey();
+ }
+
# Run the extension hook
$bad = false;
if( !wfRunHooks( 'BadImage', array( $name, &$bad ) ) ) {