From 222b01f5169f1c7e69762e0e8904c24f78f71882 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 28 Jul 2010 11:52:48 +0200 Subject: update to MediaWiki 1.16.0 --- includes/ImageFunctions.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'includes/ImageFunctions.php') 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 ) ) ) { -- cgit v1.2.2