mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 05:37:32 +02:00
Fix for an error which could occur for prefs being updated to multi-language.
This commit is contained in:
@@ -5229,15 +5229,21 @@ class e_admin_ui extends e_admin_controller_ui
|
|||||||
{
|
{
|
||||||
$data = $this->getPosted();
|
$data = $this->getPosted();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach($data as $key=>$val)
|
foreach($data as $key=>$val)
|
||||||
{
|
{
|
||||||
if(!empty($this->prefs[$key]['multilan']))
|
if(!empty($this->prefs[$key]['multilan']))
|
||||||
{
|
{
|
||||||
$this->getConfig()->clearPrefCache();
|
|
||||||
|
if(is_string($this->getConfig()->get($key))) // most likely upgraded to multilan=>true, so reset to an array structure.
|
||||||
|
{
|
||||||
|
$this->getConfig()->setPostedData($key, array(e_LANGUAGE => $val), false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$this->getConfig()->setPref($key.'/'.e_LANGUAGE, $val);
|
$this->getConfig()->setPref($key.'/'.e_LANGUAGE, $val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->getConfig()->setPostedData($key, $val, false);
|
$this->getConfig()->setPostedData($key, $val, false);
|
||||||
|
Reference in New Issue
Block a user