aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/event_tracer
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2009-02-13 13:01:03 +0000
committerrvelices <rv-github@modusoptimus.com>2009-02-13 13:01:03 +0000
commit601134c57e736e4639d0c105c7948279d9563813 (patch)
tree7bfc44db1c9e336596c5b7324d9a491c8afa5c87 /plugins/event_tracer
parentd4914a344708d4020f7cee561e41503896da5260 (diff)
- moved check upgrade feed code to admin/include/functions_upgrade.php
- refactored some code (shorter and somehow faster - but nothing revolutionary) - decrease lost space in permalinks.tpl and hard coded column width (was illisible) git-svn-id: http://piwigo.org/svn/trunk@3136 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--plugins/event_tracer/main.inc.php27
1 files changed, 6 insertions, 21 deletions
diff --git a/plugins/event_tracer/main.inc.php b/plugins/event_tracer/main.inc.php
index 05058ac07..af45bfd6c 100644
--- a/plugins/event_tracer/main.inc.php
+++ b/plugins/event_tracer/main.inc.php
@@ -80,22 +80,6 @@ class EventTracer
fclose( $file );
}
- function on_pre_trigger_event($event_info)
- {
- @$this->trigger_counts[$event_info['event']]++;
- $this->dump('pre_trigger_event', $event_info);
- }
- function on_post_trigger_event($event_info)
- {
- $this->dump('post_trigger_event', $event_info);
- }
-
- function on_trigger_action($event_info)
- {
- @$this->trigger_counts[$event_info['event']]++;
- $this->dump('trigger_action', $event_info);
- }
-
function on_page_tail()
{
if (1 || @$this->my_config['show_registered'])
@@ -129,8 +113,11 @@ class EventTracer
}
}
- function dump($event, $event_info)
+ function on_trigger($event_info)
{
+ if ($event_info['type']!='post_event')
+ @$this->trigger_counts[$event_info['event']]++;
+
foreach( $this->my_config['filters'] as $filter)
{
if ( preg_match( '/'.$filter.'/', $event_info['event'] ) )
@@ -143,7 +130,7 @@ class EventTracer
}
else
$s = '';
- pwg_debug($event.' "'.$event_info['event'].'" '.($this->trigger_counts[$event_info['event']]).' calls '.($s) );
+ pwg_debug($event_info['type'].' "'.$event_info['event'].'" '.($this->trigger_counts[$event_info['event']]).' calls '.($s) );
break;
}
}
@@ -165,9 +152,7 @@ $obj = new EventTracer();
$obj->load_config();
add_event_handler('get_admin_plugin_menu_links', array(&$obj, 'plugin_admin_menu') );
-add_event_handler('pre_trigger_event', array(&$obj, 'on_pre_trigger_event') );
-add_event_handler('post_trigger_event', array(&$obj, 'on_post_trigger_event') );
add_event_handler('loc_begin_page_tail', array(&$obj, 'on_page_tail') );
-add_event_handler('trigger_action', array(&$obj, 'on_trigger_action') );
+add_event_handler('trigger', array(&$obj, 'on_trigger') );
set_plugin_data($plugin['id'], $obj);
?>