From e37dfcb1dce4e12611899ccab8e1c45c53a2eb02 Mon Sep 17 00:00:00 2001 From: mcfly Date: Wed, 3 Dec 2008 00:48:19 +0000 Subject: [PATCH] Need to ensure plugin is installed --- e107_handlers/event_class.php | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/e107_handlers/event_class.php b/e107_handlers/event_class.php index cd29579bc..52efb6ea4 100644 --- a/e107_handlers/event_class.php +++ b/e107_handlers/event_class.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/event_class.php,v $ -| $Revision: 1.2 $ -| $Date: 2008-12-03 00:43:00 $ +| $Revision: 1.3 $ +| $Date: 2008-12-03 00:48:19 $ | $Author: mcfly_e107 $ +----------------------------------------------------------------------------+ */ @@ -72,18 +72,21 @@ class e107_event { foreach($pref['e_admin_events_list'] as $plugin) { - $func = 'plugin_'.$plugin.'_admin_events'; - if(!function_exists($func)) + if(plugInstalled($plugin)) { - $fname = e_PLUGIN.$plugin.'/e_admin_events.php'; - if(is_readable($fname)) + $func = 'plugin_'.$plugin.'_admin_events'; + if(!function_exists($func)) { - include_once($fname); + $fname = e_PLUGIN.$plugin.'/e_admin_events.php'; + if(is_readable($fname)) + { + include_once($fname); + } + } + if(function_exists($func)) + { + call_user_func($func, $type, $parms); } - } - if(function_exists($func)) - { - call_user_func($func, $type, $parms); } } }