From: Victor Vasiliev Date: Fri, 1 May 2009 21:22:25 +0000 (+0000) Subject: * (bug 15008) Redirect images are now subject to Bad image list rules X-Git-Tag: 1.31.0-rc.0~41912 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=05211a190b90b17357830646ad0e1894e137a76f;p=lhc%2Fweb%2Fwiklou.git * (bug 15008) Redirect images are now subject to Bad image list rules --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c9ffcfae67..06a226875c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -108,6 +108,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 18207) Strange spacing before [[irc:...]] links * Removed float from the user login form in RTL interface - caused display problems in FF2 +* (bug 15008) Redirect images are now subject to Bad image list rules == API changes in 1.16 == diff --git a/includes/ImageFunctions.php b/includes/ImageFunctions.php index 73d935a786..5f01ab6ef8 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 ) ) ) {