diff --git a/e107_plugins/list_new/list_admin_class.php b/e107_plugins/list_new/list_admin_class.php index 743da2d9a..ea7bc977a 100644 --- a/e107_plugins/list_new/list_admin_class.php +++ b/e107_plugins/list_new/list_admin_class.php @@ -42,15 +42,23 @@ class list_admin */ function db_update_menu() { - $sql = e107::getDb(); - $tp = e107::getParser(); + // $sql = e107::getDb(); + // $tp = e107::getParser(); // Get the preferences so we've got a reference for changes - $list_pref = $this->parent->getListPrefs(); - $temp = array(); - while(list($key, $value) = each($_POST)) - { - if($value != LIST_ADMIN_2){ $temp[$tp->toDB($key)] = $tp->toDB($value); } - } + // $list_pref = $this->parent->getListPrefs(); + // $temp = array(); + // while(list($key, $value) = each($_POST)) + // { + // if($value != LIST_ADMIN_2){ $temp[$tp->toDB($key)] = $tp->toDB($value); } + // } + + e107::getPlugConfig('list_new')->setPref($_POST)->save(true); + + // retrieve with e107::pref('list_new'); + + return; + + /* if ($this->e107->admin_log->logArrayDiffs($temp, $list_pref, 'LISTNEW_01')) { $tmp = $this->e107->arrayStorage->WriteArray($list_pref); @@ -62,6 +70,7 @@ class list_admin $message = LIST_ADMIN_17; } return $message; + */ } /** diff --git a/e107_plugins/list_new/list_class.php b/e107_plugins/list_new/list_class.php index 799462f7c..b06e04ab7 100644 --- a/e107_plugins/list_new/list_class.php +++ b/e107_plugins/list_new/list_class.php @@ -100,6 +100,9 @@ class listclass */ function getListPrefs() { + return e107::pref('list_new'); //TODO Convert from old format to new. + + /* $sql = e107::getDb(); //check preferences from database $num_rows = $sql->gen("SELECT * FROM #core WHERE e107_name='list' "); @@ -118,6 +121,7 @@ class listclass $this->list_pref = $this->e107->arrayStorage->ReadArray($row['e107_value']); return $this->list_pref; + */ } /**