mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 04:32:01 +02:00
Add admin logging to notify
This commit is contained in:
parent
7e45f0076b
commit
5741db2bb8
@ -11,13 +11,14 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_admin/notify.php,v $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2008-04-26 14:34:17 $
|
||||
| $Author: e107coders $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2008-12-07 12:00:07 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
require_once('../class2.php');
|
||||
if (!getperms('O')) {
|
||||
if (!getperms('O'))
|
||||
{
|
||||
header('location:'.e_BASE.'index.php');
|
||||
exit;
|
||||
}
|
||||
@ -42,11 +43,14 @@ if (isset($_POST['update']))
|
||||
}
|
||||
$nc -> config();
|
||||
|
||||
class notify_config {
|
||||
|
||||
class notify_config
|
||||
{
|
||||
var $notify_prefs;
|
||||
var $changeList = array();
|
||||
|
||||
function notify_config() {
|
||||
function notify_config()
|
||||
{
|
||||
global $sysprefs, $eArrayStorage, $tp, $sql,$pref;
|
||||
$this -> notify_prefs = $sysprefs -> get('notify_prefs');
|
||||
$this -> notify_prefs = $eArrayStorage -> ReadArray($this -> notify_prefs);
|
||||
@ -70,14 +74,16 @@ class notify_config {
|
||||
}
|
||||
|
||||
|
||||
if ($recalibrate) {
|
||||
if ($recalibrate)
|
||||
{
|
||||
$s_prefs = $tp -> toDB($this -> notify_prefs);
|
||||
$s_prefs = $eArrayStorage -> WriteArray($s_prefs);
|
||||
$sql -> db_Update("core", "e107_value='".$s_prefs."' WHERE e107_name='notify_prefs'");
|
||||
}
|
||||
}
|
||||
|
||||
function config() {
|
||||
function config()
|
||||
{
|
||||
global $ns, $rs;
|
||||
|
||||
$text = "<div style='text-align: center'>
|
||||
@ -143,7 +149,9 @@ class notify_config {
|
||||
$ns -> tablerender(NT_LAN_1, $text);
|
||||
}
|
||||
|
||||
function render_event($id, $description) {
|
||||
|
||||
function render_event($id, $description)
|
||||
{
|
||||
global $rs, $tp, $uc;
|
||||
$text .= "
|
||||
<tr>
|
||||
@ -169,8 +177,11 @@ class notify_config {
|
||||
return $text;
|
||||
}
|
||||
|
||||
function update() {
|
||||
global $sql, $pref, $tp, $eArrayStorage;
|
||||
|
||||
function update()
|
||||
{
|
||||
global $sql, $pref, $tp, $eArrayStorage, $admin_log;
|
||||
$this->changeList = array();
|
||||
foreach ($_POST['event'] as $key => $value)
|
||||
{
|
||||
if ($this -> update_event($key))
|
||||
@ -191,7 +202,8 @@ class notify_config {
|
||||
$s_prefs = $eArrayStorage -> WriteArray($s_prefs);
|
||||
if($sql -> db_Update("core", "e107_value='".$s_prefs."' WHERE e107_name='notify_prefs'")!==FALSE)
|
||||
{
|
||||
return TRUE;
|
||||
$admin_log->logArrayAll('NOTIFY_01',$this->changeList);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -200,13 +212,30 @@ class notify_config {
|
||||
|
||||
}
|
||||
|
||||
function update_event($id) {
|
||||
|
||||
$this -> notify_prefs['event'][$id]['class'] = $_POST['event'][$id]['class'];
|
||||
$this -> notify_prefs['event'][$id]['email'] = $_POST['event'][$id]['email'];
|
||||
if ($this -> notify_prefs['event'][$id]['class'] != 255) {
|
||||
function update_event($id)
|
||||
{
|
||||
$changed = FALSE;
|
||||
|
||||
if ($this -> notify_prefs['event'][$id]['class'] != $_POST['event'][$id]['class'])
|
||||
{
|
||||
$this -> notify_prefs['event'][$id]['class'] = $_POST['event'][$id]['class'];
|
||||
$changed = TRUE;
|
||||
}
|
||||
if ($this -> notify_prefs['event'][$id]['email'] != $_POST['event'][$id]['email'])
|
||||
{
|
||||
$this -> notify_prefs['event'][$id]['email'] = $_POST['event'][$id]['email'];
|
||||
$changed = TRUE;
|
||||
}
|
||||
if ($changed)
|
||||
{
|
||||
$this->changeList[$id] = $this->notify_prefs['event'][$id]['class'].', '.$this->notify_prefs['event'][$id]['email'];
|
||||
}
|
||||
if ($this -> notify_prefs['event'][$id]['class'] != 255)
|
||||
{
|
||||
return TRUE;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
// e107 Language File.
|
||||
// $Id: lan_log_messages.php,v 1.31 2008-12-07 11:45:08 e107steved Exp $
|
||||
// $Id: lan_log_messages.php,v 1.32 2008-12-07 12:00:13 e107steved Exp $
|
||||
|
||||
/*
|
||||
The definitions in this file are for standard 'explanatory' messages which might be entered
|
||||
@ -298,5 +298,9 @@ define('LAN_AL_SEARCH_04', 'Searchable areas updated');
|
||||
define('LAN_AL_SEARCH_05', 'Search handler settings updated');
|
||||
define('LAN_AL_SEARCH_06', '');
|
||||
|
||||
// Notify
|
||||
//-------
|
||||
define('LAN_AL_NOTIFY_01', 'Notify settings updated');
|
||||
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user