From 1d577369251870b761d08fbc8f1ff6a4d40e366d Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 23 Feb 2004 08:08:38 +0000 Subject: [PATCH] minor changes --- maintenance/refreshLinks.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php index 6fdae4cc62..c444ab050a 100644 --- a/maintenance/refreshLinks.php +++ b/maintenance/refreshLinks.php @@ -2,6 +2,8 @@ define( "REPORTING_INTERVAL", 500 ); include_once( "commandLine.inc" ); +error_reporting( E_ALL & (~E_NOTICE) ); + if ($argv[2]) { $start = (int)$argv[2]; @@ -15,20 +17,21 @@ $end = $row->m; print("Refreshing link table. Starting from cur_id $start of $end.\n"); -for ($id = start; $id <= $end; $id++) { +$wgUser->setOption("math", 3); +for ($id = $start; $id <= $end; $id++) { if ( !($id % REPORTING_INTERVAL) ) { - print $id; + print "$id\n"; } $wgTitle = Title::newFromID( $id ); - if ( $wgTitle == NULL ) { + if ( is_null( $wgTitle ) ) { continue; } $wgLinkCache = new LinkCache; $wgArticle = new Article( $wgTitle ); $text = $wgArticle->getContent( true ); - $wgOut->addWikiText( $text ); + @$wgOut->addWikiText( $text ); $linksUpdate = new LinksUpdate( $id, $wgTitle ); $linksUpdate->doDumbUpdate(); -- 2.20.1