Created
October 2, 2012 09:33
-
-
Save renan/3817803 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/EventCacheInst.php b/EventCacheInst.php | |
index b0dcee9..6ef92b6 100644 | |
--- a/EventCacheInst.php | |
+++ b/EventCacheInst.php | |
@@ -391,7 +391,13 @@ class EventCacheInst { | |
return $safeKeys[$type.','.$key]; | |
} | |
- $safeKey = $this->_config['app'] . | |
+ // Use the trackEvents as namespace in case more than one application wants to share the same events | |
+ // So each app can still have their own keys, however all the events will be tracked on a global namespace | |
+ $namespace = (in_array($type, array('events', 'event')) && !empty($this->_config['trackEvents']) && is_string($this->_config['trackEvents'])) | |
+ ? $this->_config['trackEvents'] | |
+ : $this->_config['app']; | |
+ | |
+ $safeKey = $namespace . | |
$this->_config['delimiter'] . | |
$type . | |
$this->_config['delimiter'] . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment