mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
Notify prefs were only half-moved to new method. Needs more testing
This commit is contained in:
@@ -84,8 +84,9 @@ class notify_config
|
|||||||
$pref = e107::getPref();
|
$pref = e107::getPref();
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
|
|
||||||
$this -> notify_prefs = $sysprefs -> get('notify_prefs');
|
// $this -> notify_prefs = $sysprefs -> get('notify_prefs');
|
||||||
$this -> notify_prefs = $eArrayStorage -> ReadArray($this -> notify_prefs);
|
// $this -> notify_prefs = $eArrayStorage -> ReadArray($this -> notify_prefs);
|
||||||
|
$this->notify_prefs = e107::getConfig('notify')->getPref();
|
||||||
|
|
||||||
$recalibrate = FALSE;
|
$recalibrate = FALSE;
|
||||||
// load every e_notify.php file.
|
// load every e_notify.php file.
|
||||||
@@ -260,7 +261,7 @@ class notify_config
|
|||||||
|
|
||||||
function update()
|
function update()
|
||||||
{
|
{
|
||||||
global $sql, $pref, $tp, $eArrayStorage, $admin_log;
|
global $sql, $pref, $eArrayStorage;
|
||||||
$this->changeList = array();
|
$this->changeList = array();
|
||||||
foreach ($_POST['event'] as $key => $value)
|
foreach ($_POST['event'] as $key => $value)
|
||||||
{
|
{
|
||||||
@@ -278,11 +279,15 @@ class notify_config
|
|||||||
$pref['notify'] = FALSE;
|
$pref['notify'] = FALSE;
|
||||||
}
|
}
|
||||||
save_prefs();
|
save_prefs();
|
||||||
|
/*
|
||||||
$s_prefs = $tp -> toDB($this -> notify_prefs);
|
$s_prefs = $tp -> toDB($this -> notify_prefs);
|
||||||
$s_prefs = $eArrayStorage -> WriteArray($s_prefs);
|
$s_prefs = $eArrayStorage -> WriteArray($s_prefs);
|
||||||
if($sql -> db_Update("core", "e107_value='".$s_prefs."' WHERE e107_name='notify_prefs'")!==FALSE)
|
if($sql -> db_Update("core", "e107_value='".$s_prefs."' WHERE e107_name='notify_prefs'")!==FALSE)
|
||||||
|
*/
|
||||||
|
e107::getConfig('notify')->updatePref($this->notify_prefs);
|
||||||
|
if (e107::getConfig('notify')->save(FALSE))
|
||||||
{
|
{
|
||||||
$admin_log->logArrayAll('NOTIFY_01',$this->changeList);
|
e107::getAdminLog()->logArrayAll('NOTIFY_01',$this->changeList);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user