diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a036bcd7379..3e8f038ab76 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -82,7 +82,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN Patch by Max Semenik. * (bug 15055) Talk page notifications no longer attempt to send mail when user's e-mail address is invalid or unconfirmed -* (bug 2443) Add image name as alt-text when no caption is provided. * (bug 12370) Add throttle on password attempts. Defaults to max 5 attempts in 5 minutes. * (bug 15016) 'Templates used on this page' list in view source should be wrapped in a div with class "templatesUsed" diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 06480402968..7a2f5f7134b 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -4517,7 +4517,7 @@ class Parser list( $paramMap, $mwArray ) = $this->getImageParams( $handler ); # Process the input parameters - $caption = false; + $caption = ''; $params = array( 'frame' => array(), 'handler' => array(), 'horizAlign' => array(), 'vertAlign' => array() ); foreach( $parts as $part ) { @@ -4584,15 +4584,9 @@ class Parser if ( $params['vertAlign'] ) { $params['frame']['valign'] = key( $params['vertAlign'] ); } - - // Process alt text - if ($caption === false) { - // Put the image name in. - $alt = $title->getPrefixedText(); - } else { - # Strip bad stuff out of the alt text - $alt = $this->replaceLinkHoldersText( $caption ); - } + + # Strip bad stuff out of the alt text + $alt = $this->replaceLinkHoldersText( $caption ); # make sure there are no placeholders in thumbnail attributes # that are later expanded to html- so expand them now and