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:
Llewellyn van der Merwe 2018-03-03 05:19:04 +02:00
parent 1902604328
commit 45e1c33865
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
4 changed files with 24 additions and 5 deletions

View File

@ -126,11 +126,11 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
+ *First Build*: 30th April, 2015
+ *Last Build*: 2nd March, 2018
+ *Last Build*: 3rd March, 2018
+ *Version*: 2.6.17
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **183511**
+ *Line count*: **183530**
+ *Field count*: **1645**
+ *File count*: **1169**
+ *Folder count*: **189**

View File

@ -126,11 +126,11 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
+ *First Build*: 30th April, 2015
+ *Last Build*: 2nd March, 2018
+ *Last Build*: 3rd March, 2018
+ *Version*: 2.6.17
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **183511**
+ *Line count*: **183530**
+ *Field count*: **1645**
+ *File count*: **1169**
+ *Folder count*: **189**

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)
{

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>2nd March, 2018</creationDate>
<creationDate>3rd March, 2018</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://joomlacomponentbuilder.com</authorUrl>