Refactored the compiler list view body builder, in preparation of the relation fields. Added more options to the relation admin fields. gh-287

This commit is contained in:
2018-05-24 15:56:56 +02:00
parent 84b683182a
commit fef3460772
56 changed files with 1004 additions and 908 deletions

View File

@ -87,26 +87,6 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin
$addrelations = new Registry;
$addrelations->loadString($item->addrelations);
$item->addrelations = $addrelations->toArray();
}
// check what type of conditions array we have here (should be subform... but just incase)
// This could happen due to huge data sets
if (isset($item->addconditions) && isset($item->addconditions['target_field']))
{
$bucket = array();
foreach($item->addconditions as $option => $values)
{
foreach($values as $nr => $value)
{
$bucket['addconditions'.$nr][$option] = $value;
}
}
$item->addconditions = $bucket;
// update the fields
$conditionsUpdate = new stdClass();
$conditionsUpdate->id = (int) $item->id;
$conditionsUpdate->addconditions = json_encode($bucket);
$this->_db->updateObject('#__componentbuilder_admin_fields_conditions', $conditionsUpdate, 'id');
}
if (!empty($item->id))