From: Vitaliy Filippov Date: Tue, 20 Nov 2012 17:43:55 +0000 (+0400) Subject: (bug 37209) Title no longer relies on entries already being in LinkCache X-Git-Tag: 1.31.0-rc.0~21063 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=a161c5eea47b07e4212a4fde6d6c3f8ba130d47c;p=lhc%2Fweb%2Fwiklou.git (bug 37209) Title no longer relies on entries already being in LinkCache This fixes "LinkCache doesn't currently know about this title" error in some cases, for example, in the case when LinkCache is flushed. Change-Id: I2fc3966ee5d462ba050a6c54cfda1a0dfd972635 --- diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index f19a1b08e0..e8a143288f 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -140,6 +140,7 @@ production. * (bug 41733) Hide "New user message" (.usermessage) element from printable view. * (bug 39062) Special:Contributions will display changes that don't have a parent id instead of just an empty bullet item. +* (bug 37209) "LinkCache doesn't currently know about this title" error fixed. * wfMerge() now works if $wgDiff3 contains spaces === API changes in 1.21 === diff --git a/includes/Title.php b/includes/Title.php index 48791f02dc..60e3a1abbf 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2986,6 +2986,7 @@ class Title { return $this->mLatestID = 0; } $linkCache = LinkCache::singleton(); + $linkCache->addLinkObj( $this ); $cached = $linkCache->getGoodLinkFieldObj( $this, 'revision' ); if ( $cached === null ) { # check the assumption that the cache actually knows about this title # XXX: this does apparently happen, see https://bugzilla.wikimedia.org/show_bug.cgi?id=37209