Fixed the export feature to insure no old data structures are exported. Added extra field detection to insure all related fields are exported

This commit is contained in:
2018-03-03 05:19:04 +02:00
parent 1902604328
commit 45e1c33865
4 changed files with 24 additions and 5 deletions

View File

@ -216,6 +216,18 @@ class ComponentbuilderModelJoomla_components extends JModelList
unset($items[$nr]);
continue;
}
// make sure old fields are not exported any more
unset($item->addconfig);
unset($item->addadmin_views);
unset($item->addcustom_admin_views);
unset($item->addsite_views);
unset($item->version_update);
unset($item->sql_tweak);
unset($item->addcustommenus);
unset($item->dashboard_tab);
unset($item->php_dashboard_methods);
unset($item->addfiles);
unset($item->addfolders);
// build information data set
$this->info['name'][$item->id] = $item->name;
$this->info['short_description'][$item->id] = $item->short_description;
@ -608,6 +620,13 @@ class ComponentbuilderModelJoomla_components extends JModelList
// add fields
$this->setData('field', $this->getValues($item->addfields, 'subform', 'field'), 'id');
}
// actions to take if table is admin_fields_conditions
if ('admin_fields_conditions' === $table)
{
// add fields
$this->setData('field', $this->getValues($item->addconditions, 'subform', 'target_field'), 'id');
$this->setData('field', $this->getValues($item->addconditions, 'subform', 'match_field'), 'id');
}
// actions to take if table is field
if ('field' === $table)
{