diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-03-06 00:25:47 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-03-06 00:25:47 +0000 |
commit | 37446caa5c362d998be6e1343995a5a7548a98a6 (patch) | |
tree | 3e124ec42bb7851756dd25229373172cf0400ccf /plugins/event_tracer/main.inc.php | |
parent | 7e1e705f8ba79c7579a1c433ad6cf3488a4e349b (diff) |
- upgrade goes smarty
- event_tracer goes smarty
- correction in index.tpl
git-svn-id: http://piwigo.org/svn/trunk@2254 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/event_tracer/main.inc.php')
-rw-r--r-- | plugins/event_tracer/main.inc.php | 21 |
1 files changed, 17 insertions, 4 deletions
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 @@ <?php /* Plugin Name: Event tracer -Version: 1.8 +Version: 1.8.a Description: For developers. Shows all calls to trigger_event. Plugin URI: http://www.phpwebgallery.net Author: PhpWebGallery team @@ -18,9 +18,20 @@ class EventTracer $this->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 +?> |