mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +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()
|
function db_update_menu()
|
||||||
{
|
{
|
||||||
$sql = e107::getDb();
|
// $sql = e107::getDb();
|
||||||
$tp = e107::getParser();
|
// $tp = e107::getParser();
|
||||||
// Get the preferences so we've got a reference for changes
|
// Get the preferences so we've got a reference for changes
|
||||||
$list_pref = $this->parent->getListPrefs();
|
// $list_pref = $this->parent->getListPrefs();
|
||||||
$temp = array();
|
// $temp = array();
|
||||||
while(list($key, $value) = each($_POST))
|
// while(list($key, $value) = each($_POST))
|
||||||
{
|
// {
|
||||||
if($value != LIST_ADMIN_2){ $temp[$tp->toDB($key)] = $tp->toDB($value); }
|
// 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'))
|
if ($this->e107->admin_log->logArrayDiffs($temp, $list_pref, 'LISTNEW_01'))
|
||||||
{
|
{
|
||||||
$tmp = $this->e107->arrayStorage->WriteArray($list_pref);
|
$tmp = $this->e107->arrayStorage->WriteArray($list_pref);
|
||||||
@@ -62,6 +70,7 @@ class list_admin
|
|||||||
$message = LIST_ADMIN_17;
|
$message = LIST_ADMIN_17;
|
||||||
}
|
}
|
||||||
return $message;
|
return $message;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -100,6 +100,9 @@ class listclass
|
|||||||
*/
|
*/
|
||||||
function getListPrefs()
|
function getListPrefs()
|
||||||
{
|
{
|
||||||
|
return e107::pref('list_new'); //TODO Convert from old format to new.
|
||||||
|
|
||||||
|
/*
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
//check preferences from database
|
//check preferences from database
|
||||||
$num_rows = $sql->gen("SELECT * FROM #core WHERE e107_name='list' ");
|
$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']);
|
$this->list_pref = $this->e107->arrayStorage->ReadArray($row['e107_value']);
|
||||||
return $this->list_pref;
|
return $this->list_pref;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user