1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 17:44:37 +02:00

triggerHook needed plugInstalled

This commit is contained in:
lisa
2009-01-22 23:14:48 +00:00
parent 24c70a6b31
commit c3520eca3b

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_handlers/event_class.php,v $ | $Source: /cvs_backup/e107_0.8/e107_handlers/event_class.php,v $
| $Revision: 1.5 $ | $Revision: 1.6 $
| $Date: 2008-12-29 20:41:10 $ | $Date: 2009-01-22 23:14:48 $
| $Author: lisa_ $ | $Author: lisa_ $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -120,32 +120,35 @@ class e107_event
{ {
foreach($pref['e_event_list'] as $hook) foreach($pref['e_event_list'] as $hook)
{ {
if(is_readable(e_PLUGIN.$hook."/e_event.php")) if(plugInstalled($hook))
{ {
require_once(e_PLUGIN.$hook."/e_event.php"); if(is_readable(e_PLUGIN.$hook."/e_event.php"))
$name = "e_event_{$hook}";
if(class_exists($name))
{ {
$class = new $name(); require_once(e_PLUGIN.$hook."/e_event.php");
$name = "e_event_{$hook}";
switch($data['method']) if(class_exists($name))
{ {
//returns array('caption'=>'', 'text'=>''); $class = new $name();
case 'form':
if(method_exists($class, "event_{$data['method']}")) switch($data['method'])
{ {
$text[] = $class->event_form($data); //returns array('caption'=>'', 'text'=>'');
} case 'form':
break; if(method_exists($class, "event_{$data['method']}"))
//returns string message {
case 'create': $text[] = $class->event_form($data);
case 'update': }
case 'delete': break;
if(method_exists($class, "event_{$data['method']}")) //returns string message
{ case 'create':
$text .= call_user_func(array($class, "event_{$data['method']}"), $data); case 'update':
} case 'delete':
break; if(method_exists($class, "event_{$data['method']}"))
{
$text .= call_user_func(array($class, "event_{$data['method']}"), $data);
}
break;
}
} }
} }
} }