r95951 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95950‎ | r95951 | r95952 >
Date:09:23, 1 September 2011
Author:catrope
Status:ok
Tags:
Comment:
In Title::resetArticleID(), clear all entries in the LinkCache instead of just the ones for bad title stuff. resetArticleID() seemed to assume it was only called for titles that come into existance, but that's not correct: it's also called for titles that go out of existence, and titles whose redirect status changes. Noticed this because $nt->getRedirect()'s return value was wrong in my TitleMoveComplete hook.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -2552,7 +2552,7 @@
25532553 */
25542554 public function resetArticleID( $newid ) {
25552555 $linkCache = LinkCache::singleton();
2556 - $linkCache->clearBadLink( $this->getPrefixedDBkey() );
 2556+ $linkCache->clearLink( $this );
25572557
25582558 if ( $newid === false ) {
25592559 $this->mArticleID = -1;

Status & tagging log