From 8e0082a18d45563c1d74134c42b3a61d6f680966 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 23 Feb 2004 07:43:20 +0000 Subject: [PATCH] new link rebuilder, capable of operating in the background --- maintenance/refreshLinks.php | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 maintenance/refreshLinks.php 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(); + +?> -- 2.20.1