From: Tim Starling Date: Mon, 23 Feb 2004 07:43:20 +0000 (+0000) Subject: new link rebuilder, capable of operating in the background X-Git-Tag: 1.3.0beta1~963 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=8e0082a18d45563c1d74134c42b3a61d6f680966;p=lhc%2Fweb%2Fwiklou.git new link rebuilder, capable of operating in the background --- diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php new file mode 100644 index 0000000000..6fdae4cc62 --- /dev/null +++ b/maintenance/refreshLinks.php @@ -0,0 +1,40 @@ +m; + +print("Refreshing link table. Starting from cur_id $start of $end.\n"); + +for ($id = start; $id <= $end; $id++) { + if ( !($id % REPORTING_INTERVAL) ) { + print $id; + } + + $wgTitle = Title::newFromID( $id ); + if ( $wgTitle == NULL ) { + continue; + } + + $wgLinkCache = new LinkCache; + $wgArticle = new Article( $wgTitle ); + $text = $wgArticle->getContent( true ); + $wgOut->addWikiText( $text ); + + $linksUpdate = new LinksUpdate( $id, $wgTitle ); + $linksUpdate->doDumbUpdate(); +} + + +exit(); + +?>