From 0cad4f56739f364582b659c8ed9d46fd20a653e0 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 5 Jun 2004 04:52:33 +0000 Subject: [PATCH] Purge linkscc properly on page move --- includes/Title.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index fdf255476d..636dd5c023 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -983,7 +983,11 @@ class Title { wfQuery( $sql, DB_WRITE, $fname ); $sql = "INSERT INTO links (l_from,l_to) VALUES ({$newid},{$oldid})"; wfQuery( $sql, DB_WRITE, $fname ); - + + # Clear linkscc + LinkCache::linksccClearLinksTo( $oldid ); + LinkCache::linksccClearLinksTo( $newid ); + # Purge squid if ( $wgUseSquid ) { $urls = array_merge( $nt->getSquidURLs(), $this->getSquidURLs() ); @@ -1050,14 +1054,16 @@ class Title { ), $fname ); - # Miscellaneous updates - + # Record in RC RecentChange::notifyMove( $now, $this, $nt, $wgUser, $comment ); + + # Purge squid and linkscc as per article creation Article::onArticleCreate( $nt ); # Any text links to the old title must be reassigned to the redirect $sql = "UPDATE links SET l_to={$newid} WHERE l_to={$oldid}"; wfQuery( $sql, DB_WRITE, $fname ); + LinkCache::linksccClearLinksTo( $oldid ); # Record the just-created redirect's linking to the page $sql = "INSERT INTO links (l_from,l_to) VALUES ({$newid},{$oldid})"; -- 2.20.1