r2089 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r2088‎ | r2089 | r2090 >
Date:08:03, 28 November 2003
Author:e23
Status:old
Tags:
Comment:
Purging relevant linkscc entries on page undelete.
Modified paths:
  • /trunk/phase3/includes/SpecialUndelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUndelete.php
@@ -158,7 +158,14 @@
159159
160160 $u = new LinksUpdate( $newid, $to->getPrefixedDBkey() );
161161 array_push( $wgDeferredUpdateList, $u );
162 -
 162+
 163+ global $wgEnablePersistentLC;
 164+ if ( $wgEnablePersistentLC ) {
 165+ // Purge related entries in links cache on undelete, to heal broken links
 166+ $ptitle = wfStrencode( $to->getPrefixedDBkey() );
 167+ wfQuery("DELETE linkscc FROM linkscc,brokenlinks ".
 168+ "WHERE lcc_pageid=bl_from AND bl_to='{$ptitle}'", DB_WRITE);
 169+ }
163170 #TODO: SearchUpdate, etc.
164171 }
165172

Status & tagging log