From: Mr. E23 Date: Fri, 28 Nov 2003 10:12:27 +0000 (+0000) Subject: Fixed so that move to a new page causes linkscc to clear cache for pages that link... X-Git-Tag: 1.1.0~61 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=5179254ac601918198b753e80737bae6d0420ba8;p=lhc%2Fweb%2Fwiklou.git Fixed so that move to a new page causes linkscc to clear cache for pages that link to the new page, making sure repaired broken links are shown correctly. --- diff --git a/includes/SpecialMovepage.php b/includes/SpecialMovepage.php index 5c9593cf6f..48877cb40c 100644 --- a/includes/SpecialMovepage.php +++ b/includes/SpecialMovepage.php @@ -380,6 +380,14 @@ class MovePageForm { VALUES ({$common},'{$now}',{$this->newid},1)"; wfQuery( $sql, DB_WRITE, $fname ); + global $wgEnablePersistentLC; + if ( $wgEnablePersistentLC ) { + // Purge related entries in links cache on new page, to heal broken links + $ptitle = wfStrencode( $this->nft ); + wfQuery("DELETE linkscc FROM linkscc,brokenlinks ". + "WHERE lcc_pageid=bl_from AND bl_to='{$ptitle}'", DB_WRITE); + } + $sql = "UPDATE links SET l_from='{$this->nft}' WHERE l_from='{$this->oft}'"; wfQuery( $sql, DB_WRITE, $fname );