mirror of
https://github.com/e107inc/e107.git
synced 2025-08-10 16:46:50 +02:00
Notifications cleanup
This commit is contained in:
@@ -2,12 +2,10 @@
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2012 e107 Inc (e107.org)
|
||||
* Copyright (C) 2008-2015 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
|
||||
@@ -17,6 +15,73 @@ class e107_event
|
||||
{
|
||||
var $functions = array();
|
||||
var $includes = array();
|
||||
|
||||
protected $coreEvents = array( // used by e_notify admin area.
|
||||
|
||||
'session' => array(
|
||||
|
||||
'user_signup_submitted' => NU_LAN_2,
|
||||
'user_signup_activated' => NU_LAN_3,
|
||||
'login' => NU_LAN_4,
|
||||
'logout' => NU_LAN_5,
|
||||
'user_xup_login' => 'User social login',
|
||||
'user_xup_signup' => 'User social signup',
|
||||
'user_ban_flood' => NS_LAN_2,
|
||||
'user_ban_failed_login' => 'IP banned for multiple failed login attempts'
|
||||
|
||||
),
|
||||
|
||||
'administrators' => array(
|
||||
'admin_password_update' => "Administrator updates their password",
|
||||
'admin_user_created' => 'Administrator creates a new user',
|
||||
'admin_user_activated' => "Administrator activates a new user"
|
||||
|
||||
),
|
||||
|
||||
'news' => array(
|
||||
|
||||
'admin_news_created' => NN_LAN_3,
|
||||
'admin_news_updated' => NN_LAN_4,
|
||||
'admin_news_deleted' => NN_LAN_5,
|
||||
'user_news_submit' => NN_LAN_2,
|
||||
),
|
||||
|
||||
'mail' => array(
|
||||
|
||||
'maildone' => NM_LAN_2,
|
||||
),
|
||||
|
||||
'file' => array(
|
||||
|
||||
// 'fileupload' => NF_LAN_2,
|
||||
'user_file_upload' => NF_LAN_2,
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
protected $oldCoreEvents = array(
|
||||
|
||||
'usersup' => 'user_signup_submitted',
|
||||
'userveri' => 'user_signup_activated',
|
||||
'flood' => 'user_ban_flood',
|
||||
'subnews' => 'user_news_submit',
|
||||
'fileupload' => 'user_file_upload',
|
||||
'newspost' => 'admin_news_created',
|
||||
'newsupd' => 'admin_news_updated',
|
||||
'newsdel' => 'admin_news_deleted'
|
||||
);
|
||||
|
||||
|
||||
function coreList()
|
||||
{
|
||||
return $this->coreEvents;
|
||||
}
|
||||
|
||||
function oldCoreList()
|
||||
{
|
||||
return $this->oldCoreEvents;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register event
|
||||
@@ -43,8 +108,9 @@ class e107_event
|
||||
|
||||
function debug()
|
||||
{
|
||||
|
||||
echo "<h3>Event Functions</h3>";
|
||||
print_a($this->functions);
|
||||
echo "<h3>Event Includes</h3>";
|
||||
print_a($this->includes);
|
||||
|
||||
}
|
||||
@@ -111,8 +177,10 @@ class e107_event
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
e107::getLog()->add('Event Trigger failed',array('name'=>$eventname,'location'=>$location,'function'=>$evt_func),E_LOG_WARNING,'EVENT_01');
|
||||
else
|
||||
{
|
||||
e107::getLog()->add('Event Trigger failed',array('name'=>$eventname,'location'=>$location,'function'=>$evt_func), E_LOG_WARNING,'EVENT_01');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user