From: Andrew Garrett Date: Sun, 30 Nov 2008 09:44:00 +0000 (+0000) Subject: Allow DB to be used during LocalSettings.php et al by changing plain get of global... X-Git-Tag: 1.31.0-rc.0~44161 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=36dab182b8db532432b25c1aa7bea4be6b90f152;p=lhc%2Fweb%2Fwiklou.git Allow DB to be used during LocalSettings.php et al by changing plain get of global $wgMemc to wfGetMainCache(), which will load memcached if necessary. --- diff --git a/includes/db/LoadMonitor.php b/includes/db/LoadMonitor.php index 8e16f1a1a7..929ab2b9e1 100644 --- a/includes/db/LoadMonitor.php +++ b/includes/db/LoadMonitor.php @@ -64,6 +64,9 @@ class LoadMonitor_MySQL implements LoadMonitor { $requestRate = 10; global $wgMemc; + if ( empty( $wgMemc ) ) + $wgMemc = wfGetMainCache(); + $masterName = $this->parent->getServerName( 0 ); $memcKey = wfMemcKey( 'lag_times', $masterName ); $times = $wgMemc->get( $memcKey );