<?php
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+/** */
define( "REPORTING_INTERVAL", 50 );
define( "PAUSE_INTERVAL", 50 );
$text = $wgArticle->getContent( true );
$wgLinkCache = new LinkCache;
$wgLinkCache->forUpdate( true );
+
+ global $wgLinkHolders;
+ $wgLinkHolders = array(
+ 'namespaces' => array(),
+ 'dbkeys' => array(),
+ 'queries' => array(),
+ 'texts' => array(),
+ 'titles' => array()
+ );
+
# Parse the text and replace links with placeholders
$wgOut->addWikiText( $text );
# Look up the links in the DB and add them to the link cache
- $wgOut->replaceLinkHolders( RLH_FOR_UPDATE );
+ $wgOut->transformBuffer( RLH_FOR_UPDATE );
+ $wgOut->clearHTML();
if ( $wgEnablePersistentLC ) {
$wgLinkCache->saveToLinkscc( $id, $dbw->strencode( $wgTitle->getPrefixedDBkey() ) );