From 104534d26f36b5c1718328aa5e1ca28c2504617b Mon Sep 17 00:00:00 2001 From: SteveD Date: Tue, 19 Feb 2013 21:26:45 +0000 Subject: [PATCH] Notify prefs were only half-moved to new method. Needs more testing --- e107_admin/notify.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/e107_admin/notify.php b/e107_admin/notify.php index 3f8d16dd2..6431e5beb 100644 --- a/e107_admin/notify.php +++ b/e107_admin/notify.php @@ -84,8 +84,9 @@ class notify_config $pref = e107::getPref(); $sql = e107::getDb(); - $this -> notify_prefs = $sysprefs -> get('notify_prefs'); - $this -> notify_prefs = $eArrayStorage -> ReadArray($this -> notify_prefs); +// $this -> notify_prefs = $sysprefs -> get('notify_prefs'); +// $this -> notify_prefs = $eArrayStorage -> ReadArray($this -> notify_prefs); + $this->notify_prefs = e107::getConfig('notify')->getPref(); $recalibrate = FALSE; // load every e_notify.php file. @@ -260,7 +261,7 @@ class notify_config function update() { - global $sql, $pref, $tp, $eArrayStorage, $admin_log; + global $sql, $pref, $eArrayStorage; $this->changeList = array(); foreach ($_POST['event'] as $key => $value) { @@ -278,11 +279,15 @@ class notify_config $pref['notify'] = FALSE; } save_prefs(); + /* $s_prefs = $tp -> toDB($this -> notify_prefs); $s_prefs = $eArrayStorage -> WriteArray($s_prefs); 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; } else