From: Tim Starling Date: Sun, 29 May 2005 10:17:44 +0000 (+0000) Subject: forward-ported the changes made in 1.40.2.1 X-Git-Tag: 1.5.0alpha2~41 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=a495c45fdd218593bcaf47f1614a280047b19d76;p=lhc%2Fweb%2Fwiklou.git forward-ported the changes made in 1.40.2.1 --- diff --git a/includes/LinkCache.php b/includes/LinkCache.php index 9d86a24a2b..66545eaeb5 100644 --- a/includes/LinkCache.php +++ b/includes/LinkCache.php @@ -45,6 +45,7 @@ class LinkCache { $this->mCategoryLinks = array(); $this->mOldGoodLinks = array(); $this->mOldBadLinks = array(); + $this->mOldPageLinks = array(); } /** @@ -226,9 +227,6 @@ class LinkCache { $this->addBadLinkObj( $title ); } } - $this->mOldPageLinks = $this->mPageLinks; - $this->mOldBadLinks = $this->mBadLinks; - $this->mOldGoodLinks = $this->mGoodLinks; $this->mPreFilled = true; if ( $wgEnablePersistentLC ) { @@ -323,13 +321,17 @@ class LinkCache { } /** - * Clears cache but leaves old preFill copies alone + * Clears cache */ function clear() { $this->mPageLinks = array(); $this->mGoodLinks = array(); $this->mBadLinks = array(); $this->mImageLinks = array(); + $this->mCategoryLinks = array(); + $this->mOldGoodLinks = array(); + $this->mOldBadLinks = array(); + $this->mOldPageLinks = array(); } /** @@ -420,6 +422,15 @@ class LinkCache { $dbw->delete( 'linkscc', array( 'lcc_pageid' => $pid ) ); } } + + /** + * Swaps old and current link registers + */ + function swapRegisters() { + swap( $this->mGoodLinks, $this->mOldGoodLinks ); + swap( $this->mBadLinks, $this->mOldBadLinks ); + swap( $this->mImageLinks, $this->mOldImageLinks ); + } } /**