mirror of
https://github.com/e107inc/e107.git
synced 2025-07-30 11:20:25 +02:00
more notice removal
This commit is contained in:
@@ -9,11 +9,19 @@
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_admin/notify.php,v $
|
||||
* $Revision: 1.12 $
|
||||
* $Date: 2009-11-27 21:42:46 $
|
||||
* $Revision: 1.13 $
|
||||
* $Date: 2009-12-28 22:16:54 $
|
||||
* $Author: e107steved $
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package e107
|
||||
* @subpackage admin
|
||||
* @version $Id: notify.php,v 1.13 2009-12-28 22:16:54 e107steved Exp $;
|
||||
*
|
||||
* 'Notify' admin page - selects action on various events
|
||||
*/
|
||||
|
||||
require_once('../class2.php');
|
||||
if (!getperms('O'))
|
||||
{
|
||||
@@ -70,6 +78,7 @@ class notify_config
|
||||
$this -> notify_prefs = $sysprefs -> get('notify_prefs');
|
||||
$this -> notify_prefs = $eArrayStorage -> ReadArray($this -> notify_prefs);
|
||||
|
||||
$recalibrate = FALSE;
|
||||
// load every e_notify.php file.
|
||||
if($pref['e_notify_list'])
|
||||
{
|
||||
@@ -209,7 +218,7 @@ class notify_config
|
||||
function render_event($id, $description)
|
||||
{
|
||||
global $rs, $tp, $uc;
|
||||
$text .= "
|
||||
$text = "
|
||||
<tr>
|
||||
<td >".$description.": </td>
|
||||
<td class='nowrap'>
|
||||
|
@@ -9,12 +9,20 @@
|
||||
* Forum plugin notify configuration
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/notify_class.php,v $
|
||||
* $Revision: 1.10 $
|
||||
* $Date: 2009-11-27 21:42:46 $
|
||||
* $Revision: 1.11 $
|
||||
* $Date: 2009-12-28 22:16:54 $
|
||||
* $Author: e107steved $
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package e107
|
||||
* @subpackage e107_handlers
|
||||
* @version $Id: notify_class.php,v 1.11 2009-12-28 22:16:54 e107steved Exp $;
|
||||
*
|
||||
* Handler for 'notify' events - sends email notifications to the appropriate user groups
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
class notify
|
||||
@@ -52,8 +60,10 @@ class notify
|
||||
* @param string $subject - subject for email
|
||||
* @param string $message - email message body
|
||||
* @return none
|
||||
*
|
||||
* @todo handle 'everyone except' clauses (email address filter done)
|
||||
* @todo set up pref to not notify originator of event which caused notify (see $blockOriginator)
|
||||
*/
|
||||
// TODO: handle 'everyone except' clauses (email address filter done)
|
||||
function send($id, $subject, $message)
|
||||
{
|
||||
$e107 = e107::getInstance();
|
||||
@@ -66,6 +76,7 @@ class notify
|
||||
{
|
||||
$emailFilter = $this->notify_prefs['event'][$id]['email'];
|
||||
}
|
||||
$blockOriginator = FALSE; // TODO: set this using a pref
|
||||
if (is_numeric($this -> notify_prefs['event'][$id]['class']))
|
||||
{
|
||||
switch ($notifyTarget)
|
||||
@@ -84,6 +95,10 @@ class notify
|
||||
break;
|
||||
}
|
||||
$qry = 'SELECT user_id,user_name,user_email FROM `#user` WHERE '.$qry;
|
||||
if ($blockOriginator)
|
||||
{
|
||||
$qry .= ' AND `user_id` != '.USERID;
|
||||
}
|
||||
if (FALSE !== ($count = $e107->sql->db_Select_gen($qry)))
|
||||
{
|
||||
if ($count <= 5)
|
||||
@@ -155,8 +170,11 @@ class notify
|
||||
}
|
||||
elseif ($notifyTarget == 'email')
|
||||
{ // Single email address - that can always go immediately
|
||||
e107_require_once(e_HANDLER.'mail.php');
|
||||
sendemail($this->notify_prefs['event'][$id]['email'], $subject, $message);
|
||||
if (!$blockOriginator || ($this->notify_prefs['event'][$id]['email'] != USEREMAIL))
|
||||
{
|
||||
e107_require_once(e_HANDLER.'mail.php');
|
||||
sendemail($this->notify_prefs['event'][$id]['email'], $subject, $message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_notify.php,v $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2009-12-20 22:47:28 $
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 2009-12-28 22:16:54 $
|
||||
* $Author: e107steved $
|
||||
*/
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id: e_notify.php,v 1.5 2009-12-20 22:47:28 e107steved Exp $;
|
||||
* @version $Id: e_notify.php,v 1.6 2009-12-28 22:16:54 e107steved Exp $;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
if(defined('ADMIN_PAGE') && ADMIN_PAGE === true)
|
||||
{
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_class.php');
|
||||
$config_category = NT_LAN_EC_1;
|
||||
$config_events = array('ecalnew' => NT_LAN_EC_7, 'ecaledit' => NT_LAN_EC_2);
|
||||
}
|
||||
|
Reference in New Issue
Block a user