Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -3554,6 +3554,12 @@ |
3555 | 3555 | if ( $file && !$title->equals( $file->getTitle() ) ) { |
3556 | 3556 | # Update fetched file title |
3557 | 3557 | $title = $file->getTitle(); |
| 3558 | + if ( is_null( $file->getRedirectedTitle() ) ) { |
| 3559 | + # This file was not a redirect, but the title does not match. |
| 3560 | + # Register under the new name because otherwise the link will |
| 3561 | + # get lost. |
| 3562 | + $this->mOutput->addImage( $title->getDBkey(), $time, $sha1 ); |
| 3563 | + } |
3558 | 3564 | } |
3559 | 3565 | return array( $file, $title ); |
3560 | 3566 | } |