From: Tim Starling Date: Sat, 5 Jun 2004 04:52:33 +0000 (+0000) Subject: Purge linkscc properly on page move X-Git-Tag: 1.5.0alpha1~3030 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=0cad4f56739f364582b659c8ed9d46fd20a653e0;p=lhc%2Fweb%2Fwiklou.git Purge linkscc properly on page move --- 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})";