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/DBStats/DBStats.php | |
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/DBStats/DBStats.php')
-rw-r--r-- | plugins/DBStats/DBStats.php | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/plugins/DBStats/DBStats.php b/plugins/DBStats/DBStats.php index 044e01ddc8..05f72ada33 100644 --- a/plugins/DBStats/DBStats.php +++ b/plugins/DBStats/DBStats.php @@ -46,13 +46,9 @@ class Piwik_DBStats extends Piwik_Plugin /** * Gets all scheduled tasks executed by this plugin. - * - * @param Piwik_Event_Notification $notification notification object */ - public function getScheduledTasks($notification) + public function getScheduledTasks(&$tasks) { - $tasks = & $notification->getNotificationObject(); - $cacheDataByArchiveNameReportsTask = new Piwik_ScheduledTask( $this, 'cacheDataByArchiveNameReports', @@ -77,12 +73,8 @@ class Piwik_DBStats extends Piwik_Plugin Piwik_SetOption(self::TIME_OF_LAST_TASK_RUN_OPTION, $now); } - /** - * @param Piwik_Event_Notification $notification notification object - */ - function getCssFiles($notification) + public function getCssFiles(&$cssFiles) { - $cssFiles = & $notification->getNotificationObject(); $cssFiles[] = "plugins/DBStats/stylesheets/dbstatsTable.css"; } |