Index: trunk/phase3/maintenance/refreshLinks.inc |
— | — | @@ -5,13 +5,10 @@ |
6 | 6 | * @ingroup Maintenance |
7 | 7 | */ |
8 | 8 | |
9 | | -/** */ |
10 | | -define( "REPORTING_INTERVAL", 100 ); |
11 | | -#define( "REPORTING_INTERVAL", 1 ); |
12 | | - |
13 | 9 | function refreshLinks( $start, $newOnly = false, $maxLag = false, $end = 0, $redirectsOnly = false, $oldRedirectsOnly = false ) { |
14 | 10 | global $wgUser, $wgParser, $wgUseTidy; |
15 | 11 | |
| 12 | + $reportingInterval = 100; |
16 | 13 | $fname = 'refreshLinks'; |
17 | 14 | $dbr = wfGetDB( DB_SLAVE ); |
18 | 15 | $start = intval( $start ); |
— | — | @@ -42,7 +39,7 @@ |
43 | 40 | print "Refreshing $num old redirects from $start...\n"; |
44 | 41 | |
45 | 42 | while( $row = $dbr->fetchObject( $res ) ) { |
46 | | - if ( !( ++$i % REPORTING_INTERVAL ) ) { |
| 43 | + if ( !( ++$i % $reportingInterval ) ) { |
47 | 44 | print "$i\n"; |
48 | 45 | wfWaitForSlaves( $maxLag ); |
49 | 46 | } |
— | — | @@ -62,7 +59,7 @@ |
63 | 60 | |
64 | 61 | $i = 0; |
65 | 62 | while ( $row = $dbr->fetchObject( $res ) ) { |
66 | | - if ( !( ++$i % REPORTING_INTERVAL ) ) { |
| 63 | + if ( !( ++$i % $reportingInterval ) ) { |
67 | 64 | print "$i\n"; |
68 | 65 | wfWaitForSlaves( $maxLag ); |
69 | 66 | } |
— | — | @@ -80,7 +77,7 @@ |
81 | 78 | |
82 | 79 | for ($id = $start; $id <= $end; $id++) { |
83 | 80 | |
84 | | - if ( !($id % REPORTING_INTERVAL) ) { |
| 81 | + if ( !($id % $reportingInterval) ) { |
85 | 82 | print "$id\n"; |
86 | 83 | wfWaitForSlaves( $maxLag ); |
87 | 84 | } |