* rmed redundant code
[lhc/web/wiklou.git] / maintenance / refreshLinks.inc
index 1aac42e..d788892 100644 (file)
@@ -1,5 +1,11 @@
 <?php
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
 
+/** */
 define( "REPORTING_INTERVAL", 50 );
 define( "PAUSE_INTERVAL", 50 );
 
@@ -35,12 +41,23 @@ function refreshLinks( $start ) {
                $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->transformBuffer( RLH_FOR_UPDATE );
+               $wgOut->clearHTML();
 
                if ( $wgEnablePersistentLC ) {
                        $wgLinkCache->saveToLinkscc( $id, $dbw->strencode( $wgTitle->getPrefixedDBkey() ) );