From 37446caa5c362d998be6e1343995a5a7548a98a6 Mon Sep 17 00:00:00 2001
From: rvelices
diff --git a/plugins/event_tracer/main.inc.php b/plugins/event_tracer/main.inc.php
index c2676bd27..633ca697d 100644
--- a/plugins/event_tracer/main.inc.php
+++ b/plugins/event_tracer/main.inc.php
@@ -1,6 +1,6 @@
me_working=0;
}
+ function get_config_file_dir()
+ {
+ global $conf;
+ return $conf['local_data_dir'].'/plugins/';
+ }
+
+ function get_config_file_name()
+ {
+ return basename(dirname(__FILE__)).'.dat';
+ }
+
function load_config()
{
- $x = @file_get_contents( dirname(__FILE__).'/data.dat' );
+ $x = @file_get_contents( $this->get_config_file_dir().$this->get_config_file_name() );
if ($x!==false)
{
$c = unserialize($x);
@@ -38,7 +49,9 @@ class EventTracer
function save_config()
{
- $file = fopen( dirname(__FILE__).'/data.dat', 'w' );
+ $dir = $this->get_config_file_dir();
+ @mkdir($dir);
+ $file = fopen( $dir.$this->get_config_file_name(), 'w' );
fwrite($file, serialize($this->my_config) );
fclose( $file );
}
@@ -97,4 +110,4 @@ 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('trigger_action', array(&$obj, 'on_trigger_action') );
set_plugin_data($plugin['id'], $obj);
-?>
\ No newline at end of file
+?>
diff --git a/plugins/event_tracer/maintain.inc.php b/plugins/event_tracer/maintain.inc.php
new file mode 100644
index 000000000..f7d0131c5
--- /dev/null
+++ b/plugins/event_tracer/maintain.inc.php
@@ -0,0 +1,9 @@
+
diff --git a/plugins/event_tracer/tracer_admin.php b/plugins/event_tracer/tracer_admin.php
index 5b405ba5a..b17f2a301 100644
--- a/plugins/event_tracer/tracer_admin.php
+++ b/plugins/event_tracer/tracer_admin.php
@@ -21,9 +21,9 @@ if ( isset($_POST['eventTracer_filters']) )
global $page;
array_push($page['infos'], 'event tracer options saved');
}
-$template->assign_var('EVENT_TRACER_FILTERS', implode("\n", $me->my_config['filters'] ) );
-$template->assign_var('EVENT_TRACER_SHOW_ARGS', $me->my_config['show_args'] ? 'checked="checked"' : '' );
-$template->assign_var('U_LIST_EVENTS', get_admin_plugin_menu_link(dirname(__FILE__).'/event_list.php'));
+$template->assign('EVENT_TRACER_FILTERS', implode("\n", $me->my_config['filters'] ) );
+$template->assign('EVENT_TRACER_SHOW_ARGS', $me->my_config['show_args'] ? 'checked="checked"' : '' );
+$template->assign('U_LIST_EVENTS', get_admin_plugin_menu_link(dirname(__FILE__).'/event_list.php'));
//$template->assign_var('EVENT_TRACER_F_ACTION', $my_url);
diff --git a/plugins/event_tracer/tracer_admin.tpl b/plugins/event_tracer/tracer_admin.tpl
index 2d859563e..4830a8b85 100644
--- a/plugins/event_tracer/tracer_admin.tpl
+++ b/plugins/event_tracer/tracer_admin.tpl
@@ -1,4 +1,4 @@
-
+{* $Id$ *}
-
-
+{foreach from=$events item=event}
Type
- Name
- File
+ Type
+ Name
+ File
-
-
+{/foreach}
{event.TYPE}
- {event.NAME}
- {event.FILE}
+ {$event.TYPE}
+ {$event.NAME}
+ {$event.FILE}
Event Tracer