diff options
author | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-07-06 03:44:45 +0400 |
---|---|---|
committer | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-07-06 03:44:45 +0400 |
commit | ddd7aac6f2d1e3b1660f38045cab4214a26f2325 (patch) | |
tree | 8e49b4362a6a88505d1b790d64a546a719056188 /plugins/Overlay | |
parent | 3a3517e48823a4d7dc521e5a754c51ddbcf5d210 (diff) |
Implemented custom event dispatching system for Piwik (replaced event dispatcher lib in libs/Event).
Notes:
- New dispatcher can execute callbacks before or after other callbacks.
- It is also possible to dispatch events only to a specific set of plugins instead of all plugins.
- Moved Piwik::unprefixClass to Piwik_Common::unprefixClass
- Added visibility to some event handlers that were missing it.
- Allowed two unit tests to fail w/ better diagnostic messages.
Diffstat (limited to 'plugins/Overlay')
-rw-r--r-- | plugins/Overlay/API.php | 3 | ||||
-rw-r--r-- | plugins/Overlay/Overlay.php | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/plugins/Overlay/API.php b/plugins/Overlay/API.php index 413406fe43..9c06d11177 100644 --- a/plugins/Overlay/API.php +++ b/plugins/Overlay/API.php @@ -106,7 +106,8 @@ class Piwik_Overlay_API private function authenticate($idSite) { $notification = null; - Piwik_PostEvent('FrontController.initAuthenticationObject', $notification, $allowCookieAuthentication = true); + Piwik_PostEvent('FrontController.initAuthenticationObject', + array(&$notification, $allowCookieAuthentication = true)); $auth = Zend_Registry::get('auth'); $success = Zend_Registry::get('access')->reloadAccess($auth); diff --git a/plugins/Overlay/Overlay.php b/plugins/Overlay/Overlay.php index abf8faaf96..e317b748e6 100644 --- a/plugins/Overlay/Overlay.php +++ b/plugins/Overlay/Overlay.php @@ -28,11 +28,9 @@ class Piwik_Overlay extends Piwik_Plugin ); } - public function getJsFiles($notification) + public function getJsFiles(&$jsFiles) { - $jsFiles = & $notification->getNotificationObject(); $jsFiles[] = 'plugins/Overlay/javascripts/rowaction.js'; $jsFiles[] = 'plugins/Overlay/javascripts/Overlay_Helper.js'; } - } |