Index: trunk/phase3/includes/SpecialMovepage.php |
— | — | @@ -380,6 +380,14 @@ |
381 | 381 | VALUES ({$common},'{$now}',{$this->newid},1)"; |
382 | 382 | wfQuery( $sql, DB_WRITE, $fname ); |
383 | 383 | |
| 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 | + |
384 | 392 | $sql = "UPDATE links SET l_from='{$this->nft}' WHERE l_from='{$this->oft}'"; |
385 | 393 | wfQuery( $sql, DB_WRITE, $fname ); |
386 | 394 | |