1
0
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:
Cameron
2014-05-28 22:37:33 -07:00
parent b69f770317
commit 266fc14e06
2 changed files with 21 additions and 8 deletions

View File

@@ -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;
*/
}
/**

View File

@@ -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;
*/
}
/**