Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -4517,7 +4517,7 @@ |
4518 | 4518 | list( $paramMap, $mwArray ) = $this->getImageParams( $handler ); |
4519 | 4519 | |
4520 | 4520 | # Process the input parameters |
4521 | | - $caption = ''; |
| 4521 | + $caption = false; |
4522 | 4522 | $params = array( 'frame' => array(), 'handler' => array(), |
4523 | 4523 | 'horizAlign' => array(), 'vertAlign' => array() ); |
4524 | 4524 | foreach( $parts as $part ) { |
— | — | @@ -4584,10 +4584,16 @@ |
4585 | 4585 | if ( $params['vertAlign'] ) { |
4586 | 4586 | $params['frame']['valign'] = key( $params['vertAlign'] ); |
4587 | 4587 | } |
| 4588 | + |
| 4589 | + // Process alt text |
| 4590 | + if ($caption === false) { |
| 4591 | + // Put the image name in. |
| 4592 | + $alt = $title->getPrefixedText(); |
| 4593 | + } else { |
| 4594 | + # Strip bad stuff out of the alt text |
| 4595 | + $alt = $this->replaceLinkHoldersText( $caption ); |
| 4596 | + } |
4588 | 4597 | |
4589 | | - # Strip bad stuff out of the alt text |
4590 | | - $alt = $this->replaceLinkHoldersText( $caption ); |
4591 | | - |
4592 | 4598 | # make sure there are no placeholders in thumbnail attributes |
4593 | 4599 | # that are later expanded to html- so expand them now and |
4594 | 4600 | # remove the tags |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -78,6 +78,7 @@ |
79 | 79 | Patch by Max Semenik. |
80 | 80 | * (bug 15055) Talk page notifications no longer attempt to send mail when |
81 | 81 | user's e-mail address is invalid or unconfirmed |
| 82 | +* (bug 2443) Add image name as alt-text when no caption is provided. |
82 | 83 | |
83 | 84 | === API changes in 1.14 === |
84 | 85 | |