mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Issue #606 - List new prefs. Quick fix. Conversion from old to new still needed.
This commit is contained in:
@@ -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;
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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;
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user