forked from joomla/Component-Builder
Fixed the import of JCB packages, that had an issue of not storing multiple list selection values correctly during import.
This commit is contained in:
parent
45c255485f
commit
f19b0335ed
@ -1451,7 +1451,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
|||||||
// convert back to json
|
// convert back to json
|
||||||
if ($isJsonTarget)
|
if ($isJsonTarget)
|
||||||
{
|
{
|
||||||
$item[$target] = json_encode($item[$target]);
|
$item[$target] = json_encode($item[$target], JSON_FORCE_OBJECT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif (ComponentbuilderHelper::checkObject($item) && isset($item->{$target}))
|
elseif (ComponentbuilderHelper::checkObject($item) && isset($item->{$target}))
|
||||||
@ -1511,7 +1511,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
|||||||
// convert back to json
|
// convert back to json
|
||||||
if ($isJsonTarget)
|
if ($isJsonTarget)
|
||||||
{
|
{
|
||||||
$item->{$target} = json_encode($item->{$target});
|
$item->{$target} = json_encode($item->{$target}, JSON_FORCE_OBJECT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// return as json if received as json
|
// return as json if received as json
|
||||||
@ -2110,7 +2110,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
|||||||
if (isset($components) && ComponentbuilderHelper::checkArray($components))
|
if (isset($components) && ComponentbuilderHelper::checkArray($components))
|
||||||
{
|
{
|
||||||
// load it back
|
// load it back
|
||||||
$item->components = json_encode(array_values($components));
|
$item->components = json_encode(array_values($components), JSON_FORCE_OBJECT);
|
||||||
}
|
}
|
||||||
// merge the translations where needed
|
// merge the translations where needed
|
||||||
if (isset($item->translation) && isset($item->localTranslation)
|
if (isset($item->translation) && isset($item->localTranslation)
|
||||||
|
Loading…
Reference in New Issue
Block a user