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.
=== API changes in 1.14 ===
list( $paramMap, $mwArray ) = $this->getImageParams( $handler );
# Process the input parameters
- $caption = '';
+ $caption = false;
$params = array( 'frame' => array(), 'handler' => array(),
'horizAlign' => array(), 'vertAlign' => array() );
foreach( $parts as $part ) {
if ( $params['vertAlign'] ) {
$params['frame']['valign'] = key( $params['vertAlign'] );
}
-
- # Strip bad stuff out of the alt text
- $alt = $this->replaceLinkHoldersText( $caption );
+
+ // 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 );
+ }
# make sure there are no placeholders in thumbnail attributes
# that are later expanded to html- so expand them now and