From: Tim Starling Date: Mon, 23 Feb 2004 08:08:38 +0000 (+0000) Subject: minor changes X-Git-Tag: 1.3.0beta1~960 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=1d577369251870b761d08fbc8f1ff6a4d40e366d;p=lhc%2Fweb%2Fwiklou.git minor changes --- 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();