Reedy has uploaded a new change for review.
https://gerrit.wikimedia.org/r/51627
Change subject: Fixup memcached support for new WMF memcached config
......................................................................
Fixup memcached support for new WMF memcached config
Change-Id: I51b612e767f6fd29b33304ea90a2040f473d62bf
---
M EventLogging.hooks.php
1 file changed, 9 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventLogging
refs/changes/27/51627/1
diff --git a/EventLogging.hooks.php b/EventLogging.hooks.php
index 9565a85..398576f 100644
--- a/EventLogging.hooks.php
+++ b/EventLogging.hooks.php
@@ -17,7 +17,14 @@
* configuration variable (if any).
*/
public static function onSetup() {
- global $wgMemCachedServers;
+ global $wgMainCacheType;
+ $servers = array();
+ if ( $wgMainCacheType === CACHE_MEMCACHED ) {
+ global wgMemCachedServers;
+ $servers = $wgMemCachedServers;
+ } elseif( isset( $wgObjectCaches[$wgMainCacheType] ) ) {
+ $servers = $wgObjectCaches[$wgMainCacheType]['servers'];
+ }
foreach ( array(
'wgEventLoggingBaseUri',
@@ -30,7 +37,7 @@
}
}
- if ( !count( $wgMemCachedServers ) ) {
+ if ( !count( $servers ) ) {
wfDebugLog( 'EventLogging', 'EventLogging requires
memcached, '
. 'and no memcached servers are defined.' );
}
--
To view, visit https://gerrit.wikimedia.org/r/51627
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I51b612e767f6fd29b33304ea90a2040f473d62bf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits