From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- includes/db/LoadMonitor.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'includes/db/LoadMonitor.php') diff --git a/includes/db/LoadMonitor.php b/includes/db/LoadMonitor.php index 146ac61e..ad7b3b2f 100644 --- a/includes/db/LoadMonitor.php +++ b/includes/db/LoadMonitor.php @@ -37,7 +37,7 @@ interface LoadMonitor { /** * Perform pre-connection load ratio adjustment. * @param $loads array - * @param $group String: the selected query group + * @param string $group the selected query group * @param $wiki String */ function scaleLoads( &$loads, $group = false, $wiki = false ); @@ -159,7 +159,7 @@ class LoadMonitor_MySQL implements LoadMonitor { $times = array(); foreach ( $serverIndexes as $i ) { - if ($i == 0) { # Master + if ( $i == 0 ) { # Master $times[$i] = 0; } elseif ( false !== ( $conn = $this->parent->getAnyOpenConnection( $i ) ) ) { $times[$i] = $conn->getLag(); @@ -173,7 +173,7 @@ class LoadMonitor_MySQL implements LoadMonitor { $wgMemc->set( $memcKey, $times, $expiry ); # But don't give the timestamp to the caller - unset($times['timestamp']); + unset( $times['timestamp'] ); $lagTimes = $times; wfProfileOut( __METHOD__ ); @@ -189,7 +189,7 @@ class LoadMonitor_MySQL implements LoadMonitor { if ( !$threshold ) { return 0; } - $status = $conn->getMysqlStatus("Thread%"); + $status = $conn->getMysqlStatus( "Thread%" ); if ( $status['Threads_running'] > $threshold ) { $server = $conn->getProperty( 'mServer' ); wfLogDBError( "LB backoff from $server - Threads_running = {$status['Threads_running']}\n" ); @@ -199,4 +199,3 @@ class LoadMonitor_MySQL implements LoadMonitor { } } } - -- cgit v1.2.3-54-g00ecf