+foreach( $wgSpecialPageCacheUpdates as $special => $call ) {
+ if( !is_callable($call) ) {
+ print "Uncallable function $call!\n";
+ continue;
+ }
+ $t1 = explode( ' ', microtime() );
+ call_user_func( $call, $dbw );
+ $t2 = explode( ' ', microtime() );
+ printf( '%-30s ', $special );
+ $elapsed = ($t2[0] - $t1[0]) + ($t2[1] - $t1[1]);
+ $hours = intval( $elapsed / 3600 );
+ $minutes = intval( $elapsed % 3600 / 60 );
+ $seconds = $elapsed - $hours * 3600 - $minutes * 60;
+ if ( $hours ) {
+ print $hours . 'h ';
+ }
+ if ( $minutes ) {
+ print $minutes . 'm ';
+ }
+ printf( "completed in %.2fs\n", $seconds );
+ # Wait for the slave to catch up
+ wfWaitForSlaves( 5 );
+}
+
+foreach( $wgQueryPages as $page ) {