* @ingroup Maintenance
*/
-/** */
-define( "REPORTING_INTERVAL", 100 );
-#define( "REPORTING_INTERVAL", 1 );
-
function refreshLinks( $start, $newOnly = false, $maxLag = false, $end = 0, $redirectsOnly = false, $oldRedirectsOnly = false ) {
global $wgUser, $wgParser, $wgUseTidy;
+ $reportingInterval = 100;
$fname = 'refreshLinks';
$dbr = wfGetDB( DB_SLAVE );
$start = intval( $start );
print "Refreshing $num old redirects from $start...\n";
while( $row = $dbr->fetchObject( $res ) ) {
- if ( !( ++$i % REPORTING_INTERVAL ) ) {
+ if ( !( ++$i % $reportingInterval ) ) {
print "$i\n";
wfWaitForSlaves( $maxLag );
}
$i = 0;
while ( $row = $dbr->fetchObject( $res ) ) {
- if ( !( ++$i % REPORTING_INTERVAL ) ) {
+ if ( !( ++$i % $reportingInterval ) ) {
print "$i\n";
wfWaitForSlaves( $maxLag );
}
for ($id = $start; $id <= $end; $id++) {
- if ( !($id % REPORTING_INTERVAL) ) {
+ if ( !($id % $reportingInterval) ) {
print "$id\n";
wfWaitForSlaves( $maxLag );
}