From: Bertrand Grondin Date: Tue, 18 Mar 2008 12:42:22 +0000 (+0000) Subject: *Fix bug when using Mediawiki updater command line. X-Git-Tag: 1.31.0-rc.0~49025 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=f34672bc877132b56f4d5b3e484a754eb516c62c;p=lhc%2Fweb%2Fwiklou.git *Fix bug when using Mediawiki updater command line. *Prevent redeclaring wfWaitForSlaves () --- diff --git a/maintenance/populateCategory.inc b/maintenance/populateCategory.inc index 905706ed39..497f4b5776 100644 --- a/maintenance/populateCategory.inc +++ b/maintenance/populateCategory.inc @@ -4,6 +4,8 @@ * @author Simetrical */ +require_once "commandLine.inc"; + define( 'REPORTING_INTERVAL', 1000 ); function populateCategory( $begin, $maxlag, $throttle, $force ) { @@ -82,19 +84,3 @@ function populateCategory( $begin, $maxlag, $throttle, $force ) { return false; } } - -function wfWaitForSlaves( $maxLag ) { - global $wgLoadBalancer; - if ( $maxLag ) { - list( $host, $lag ) = $wgLoadBalancer->getMaxLag(); - while ( $lag > $maxLag ) { - $name = @gethostbyaddr( $host ); - if ( $name !== false ) { - $host = $name; - } - print "Waiting for $host (lagged $lag seconds)...\n"; - sleep($maxLag); - list( $host, $lag ) = $wgLoadBalancer->getMaxLag(); - } - } -}