From: Alexandre Emsenhuber Date: Sat, 9 Mar 2013 20:00:14 +0000 (+0100) Subject: Remove the page from the LinkCache before adding it again in WikiPage::loadFromRow() X-Git-Tag: 1.31.0-rc.0~20407 X-Git-Url: http://git.cyclocoop.org/%24dirpuce/puce%24spip_lang_rtl.gif?a=commitdiff_plain;h=db4e7efd9286bbf306baef6d157c4179954772f2;p=lhc%2Fweb%2Fwiklou.git Remove the page from the LinkCache before adding it again in WikiPage::loadFromRow() This makes sure the LinkCache doesn't list a page both as good and bad link at the same time, e.g. when a page gets created or deleted in the request. Change-Id: I6774132ba8e4d28deed1908150c02fbaa42111a5 --- diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 2da314f10f..da90811773 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -377,6 +377,7 @@ class WikiPage implements Page, IDBAccessObject { */ public function loadFromRow( $data, $from ) { $lc = LinkCache::singleton(); + $lc->clearLink( $this->mTitle ); if ( $data ) { $lc->addGoodLinkObjFromRow( $this->mTitle, $data );