mirror of
https://github.com/e107inc/e107.git
synced 2025-08-11 17:14:42 +02:00
Updated e_notify.php to v2.x spec.
This commit is contained in:
@@ -39,6 +39,17 @@ class e107_event
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function debug()
|
||||
{
|
||||
|
||||
print_a($this->functions);
|
||||
print_a($this->includes);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Trigger event
|
||||
* TODO - admin log for failed callback attempts?
|
||||
@@ -109,6 +120,11 @@ class e107_event
|
||||
return (isset($ret) ? $ret : false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function triggerAdminEvent($type, $parms=array())
|
||||
{
|
||||
global $pref;
|
||||
@@ -164,6 +180,7 @@ class e107_event
|
||||
{
|
||||
$text = '';
|
||||
$e_event_list = e107::getPref('e_event_list');
|
||||
|
||||
if(is_array($e_event_list))
|
||||
{
|
||||
foreach($e_event_list as $hook)
|
||||
|
@@ -33,7 +33,27 @@ class notify
|
||||
{
|
||||
if ($status['class'] != 255)
|
||||
{
|
||||
$e_event->register($id, 'notify_'.$id);
|
||||
if($status['include']) // Plugin
|
||||
{
|
||||
$include = e_PLUGIN.$status['include']."/e_notify.php";
|
||||
|
||||
if($status['legacy'] != 1)
|
||||
{
|
||||
$class = $status['include']."_notify";
|
||||
$method = $id;
|
||||
$e_event->register($id, array($class, $method), $include);
|
||||
}
|
||||
else
|
||||
{
|
||||
$e_event->register($id, 'notify_'.$id, $include);
|
||||
}
|
||||
}
|
||||
else // core
|
||||
{
|
||||
$e_event->register($id, 'notify_'.$id);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -253,7 +273,7 @@ function notify_fileupload($data)
|
||||
}
|
||||
|
||||
|
||||
if (isset($nt->notify_prefs['plugins']))
|
||||
if (isset($nt->notify_prefs['plugins']) && e_PAGE != 'notify.php')
|
||||
{
|
||||
foreach ($nt->notify_prefs['plugins'] as $plugin_id => $plugin_settings)
|
||||
{
|
||||
|
Reference in New Issue
Block a user