r2095 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r2094‎ | r2095 | r2096 >
Date:10:12, 28 November 2003
Author:e23
Status:old
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/includes/SpecialMovepage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialMovepage.php
@@ -380,6 +380,14 @@
381381 VALUES ({$common},'{$now}',{$this->newid},1)";
382382 wfQuery( $sql, DB_WRITE, $fname );
383383
 384+ global $wgEnablePersistentLC;
 385+ if ( $wgEnablePersistentLC ) {
 386+ // Purge related entries in links cache on new page, to heal broken links
 387+ $ptitle = wfStrencode( $this->nft );
 388+ wfQuery("DELETE linkscc FROM linkscc,brokenlinks ".
 389+ "WHERE lcc_pageid=bl_from AND bl_to='{$ptitle}'", DB_WRITE);
 390+ }
 391+
384392 $sql = "UPDATE links SET l_from='{$this->nft}' WHERE l_from='{$this->oft}'";
385393 wfQuery( $sql, DB_WRITE, $fname );
386394

Status & tagging log