From: Roan Kattouw Date: Thu, 1 Sep 2011 09:23:20 +0000 (+0000) Subject: In Title::resetArticleID(), clear all entries in the LinkCache instead of just the... X-Git-Tag: 1.31.0-rc.0~27982 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/rappels.php?a=commitdiff_plain;h=81fcd98a08c33ba7f8ff371c7dbaac6f37fdaf5e;p=lhc%2Fweb%2Fwiklou.git 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. --- diff --git a/includes/Title.php b/includes/Title.php index 56713cdf5d..023b3d88fe 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2552,7 +2552,7 @@ class Title { */ public function resetArticleID( $newid ) { $linkCache = LinkCache::singleton(); - $linkCache->clearBadLink( $this->getPrefixedDBkey() ); + $linkCache->clearLink( $this ); if ( $newid === false ) { $this->mArticleID = -1;