Localisation updates for core and extension messages from translatewiki.net (2010...
[lhc/web/wiklou.git] / includes / ImageFunctions.php
index 7b55ad5..5f01ab6 100644 (file)
@@ -4,7 +4,7 @@
  * http://www.w3.org/TR/SVG11/coords.html#UnitIdentifiers
  *
  * @param $length String: CSS/SVG length.
- * @param $viewpoerSize: Float optional scale for percentage units...
+ * @param $viewportSize: Float optional scale for percentage units...
  * @return float: length in pixels
  */
 function wfScaleSVGUnit( $length, $viewportSize=512 ) {
@@ -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 ) ) ) {