From: Bryan Tong Minh Date: Mon, 9 Nov 2009 11:38:52 +0000 (+0000) Subject: Introduce $wiki parameter to wfWaitForSlaves in order to be able to wait for the... X-Git-Tag: 1.31.0-rc.0~38868 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=a7b10d24106d84d8cd527823290c77cde63144a2;p=lhc%2Fweb%2Fwiklou.git Introduce $wiki parameter to wfWaitForSlaves in order to be able to wait for the proper slave. Implemented this in GlobalUsage. Fix GlobalUsage.sql for sqlite. --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 60197eea9f..85bbabb05d 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3187,11 +3187,12 @@ function wfWarn( $msg, $callerOffset = 1, $level = E_USER_NOTICE ) { * to use this outside maintenance scripts in its present form. * * @param $maxLag Integer + * @param $wiki mixed Wiki identifier accepted by wfGetLB * @return null */ -function wfWaitForSlaves( $maxLag ) { +function wfWaitForSlaves( $maxLag, $wiki = false ) { if( $maxLag ) { - $lb = wfGetLB(); + $lb = wfGetLB( $wiki ); list( $host, $lag ) = $lb->getMaxLag(); while( $lag > $maxLag ) { $name = @gethostbyaddr( $host );