r91785 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91784‎ | r91785 | r91786 >
Date:10:31, 9 July 2011
Author:btongminh
Status:ok
Tags:
Comment:
Follow-up r88054: register the file if a hook changed the target file.
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -3554,6 +3554,12 @@
35553555 if ( $file && !$title->equals( $file->getTitle() ) ) {
35563556 # Update fetched file title
35573557 $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+ }
35583564 }
35593565 return array( $file, $title );
35603566 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r84618Straighten out dependency handling from r84610 (files) and before (templates)aaron18:23, 23 March 2011
r88054(bug 23002) Imagelinks table not updated after imagemove. The actual bug was ...btongminh12:20, 14 May 2011

Status & tagging log