From 5179254ac601918198b753e80737bae6d0420ba8 Mon Sep 17 00:00:00 2001 From: "Mr. E23" Date: Fri, 28 Nov 2003 10:12:27 +0000 Subject: [PATCH] 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. --- includes/SpecialMovepage.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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 ); -- 2.20.1