2 define( "REPORTING_INTERVAL", 500 );
4 include_once( "commandLine.inc" );
7 $start = (int)$argv[2];
12 $res = wfQuery("SELECT max(cur_id) as m FROM cur", DB_READ
);
13 $row = wfFetchObject( $res );
16 print("Refreshing link table. Starting from cur_id $start of $end.\n");
18 for ($id = start
; $id <= $end; $id++
) {
19 if ( !($id % REPORTING_INTERVAL
) ) {
23 $wgTitle = Title
::newFromID( $id );
24 if ( $wgTitle == NULL ) {
28 $wgLinkCache = new LinkCache
;
29 $wgArticle = new Article( $wgTitle );
30 $text = $wgArticle->getContent( true );
31 $wgOut->addWikiText( $text );
33 $linksUpdate = new LinksUpdate( $id, $wgTitle );
34 $linksUpdate->doDumbUpdate();