1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 21:27:25 +02:00

Fix for an error which could occur for prefs being updated to multi-language.

This commit is contained in:
Cameron
2015-06-05 16:27:52 -07:00
parent 756539ef98
commit 17429186ee

View File

@@ -5229,14 +5229,20 @@ 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();
$this->getConfig()->setPref($key.'/'.e_LANGUAGE, $val); 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);
}
} }
else else
{ {