diff --git a/README.md b/README.md
index 5de4d0b2d..0fd30e820 100644
--- a/README.md
+++ b/README.md
@@ -114,7 +114,7 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.5.9
+ *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*: **159576**
++ *Line count*: **159658**
+ *File count*: **1000**
+ *Folder count*: **165**
diff --git a/admin/README.txt b/admin/README.txt
index 5de4d0b2d..0fd30e820 100644
--- a/admin/README.txt
+++ b/admin/README.txt
@@ -114,7 +114,7 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.5.9
+ *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*: **159576**
++ *Line count*: **159658**
+ *File count*: **1000**
+ *Folder count*: **165**
diff --git a/admin/assets/css/joomla_component.css b/admin/assets/css/joomla_component.css
index 4e88d5196..531a2838f 100644
--- a/admin/assets/css/joomla_component.css
+++ b/admin/assets/css/joomla_component.css
@@ -9,7 +9,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/assets/css/joomla_components.css b/admin/assets/css/joomla_components.css
index 01e935876..287d73ade 100644
--- a/admin/assets/css/joomla_components.css
+++ b/admin/assets/css/joomla_components.css
@@ -9,7 +9,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/controllers/joomla_component.php b/admin/controllers/joomla_component.php
index 97fa6a803..c5337a24a 100644
--- a/admin/controllers/joomla_component.php
+++ b/admin/controllers/joomla_component.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php
index d00316793..dad31cd6a 100644
--- a/admin/controllers/joomla_components.php
+++ b/admin/controllers/joomla_components.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini
index 982fbf771..77c991e25 100644
--- a/admin/language/en-GB/en-GB.com_componentbuilder.ini
+++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini
@@ -860,10 +860,7 @@ COM_COMPONENTBUILDER_BACKUP="Backup"
COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="Backup failed, please try again. If the error continue, please contact your system administrator."
COM_COMPONENTBUILDER_BACKUP_LOCAL_DATA_FIRST="Backup Local Data First"
COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY="Backup was done successfully"
-COM_COMPONENTBUILDER_BADMIN_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BADMIN_VIEWB_SO_THE_IDS_WAS_REMOVED="Admin view in %s has id mismatch of selected admin view. So the id:%s was removed!"
COM_COMPONENTBUILDER_BASIC_METHOD="Basic Method"
-COM_COMPONENTBUILDER_BCONFIG_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BFIELDB_SO_THE_IDS_WAS_REMOVED="Config in %s has id mismatch of selected field. So the id:%s was removed!"
-COM_COMPONENTBUILDER_BCUSTOM_ADMIN_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BCUSTOM_ADMIN_VIEWB_SO_THE_IDS_WAS_REMOVED="Custom admin view in %s has id mismatch of selected custom admin view. So the id:%s was removed!"
COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVE_TO_CORRECT_LOCATION="Custom files not move to correct location!"
COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE="Be cautious! Do not continue unless you trust the origin of this package!"
COM_COMPONENTBUILDER_BFIELD_TYPEB_IDS_MISMATCH_IN_BSB="Field type id:%s mismatch in %s."
@@ -876,7 +873,6 @@ COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS="%s could not be imported
COM_COMPONENTBUILDER_BSB_EMCOMPONENT_DETAILSEM="%s component details"
COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED="%s has been imported!"
COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED="%s has been updated!"
-COM_COMPONENTBUILDER_BSITE_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BSITE_VIEWB_SO_THE_IDS_WAS_REMOVED="Site view in %s has id mismatch of selected site view. So the id:%s was removed!"
COM_COMPONENTBUILDER_BUTTON_TO_CREATE_S_WILL_SHOW_ONCE_S_IS_SAVED_FOR_THE_FIRST_TIME="Button to create %s will show once %s is saved for the first time."
COM_COMPONENTBUILDER_CHAIN="Chain"
COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there."
diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js
index 0865b2b3e..a9db9d2a3 100644
--- a/admin/models/forms/joomla_component.js
+++ b/admin/models/forms/joomla_component.js
@@ -9,7 +9,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/models/import_joomla_components.php b/admin/models/import_joomla_components.php
index 13c99b7c9..8c12f3f03 100644
--- a/admin/models/import_joomla_components.php
+++ b/admin/models/import_joomla_components.php
@@ -642,80 +642,22 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$this->user = JFactory::getUser();
// set some defaults
$this->today = JFactory::getDate()->toSql();
- // we first store the fieldtype
- if (!$this->saveSmartItems('fieldtype'))
+ // the array of tables to store
+ $tables = array(
+ 'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view',
+ 'template', 'layout', 'joomla_component', 'language', 'language_translation', 'custom_code',
+ 'admin_fields', 'admin_fields_conditions', 'component_admin_views', 'component_site_views',
+ 'component_custom_admin_views', 'component_updates', 'component_mysql_tweaks',
+ 'component_custom_admin_menus', 'component_config', 'component_dashboard', 'component_files_folders'
+ );
+ // smart table loop
+ foreach ($tables as $table)
{
- return false;
- }
- // we then store the field
- if (!$this->saveSmartItems('field'))
- {
- return false;
- }
- // we then store the admin_view
- if (!$this->saveSmartItems('admin_view'))
- {
- return false;
- }
- // we then store the snippet
- if (!$this->saveSmartItems('snippet'))
- {
- return false;
- }
- // we then store the dynamic_get
- if (!$this->saveSmartItems('dynamic_get'))
- {
- return false;
- }
- // we then store the custom_admin_view
- if (!$this->saveSmartItems('custom_admin_view'))
- {
- return false;
- }
- // we then store the site_view
- if (!$this->saveSmartItems('site_view'))
- {
- return false;
- }
- // we then store the template
- if (!$this->saveSmartItems('template'))
- {
- return false;
- }
- // we then store the layout
- if (!$this->saveSmartItems('layout'))
- {
- return false;
- }
- // we then store the components
- if (!$this->saveSmartItems('joomla_component'))
- {
- return false;
- }
- // we then store the languages
- if (!$this->saveSmartItems('language'))
- {
- return false;
- }
- // we then store the language translations
- if (!$this->saveSmartItems('language_translation'))
- {
- return false;
- }
- // we then store the custom_code
- if (!$this->saveSmartItems('custom_code'))
- {
- return false;
- }
- // we then store the admin_fields
- if (!$this->saveSmartItems('admin_fields'))
- {
- return false;
- }
- // we then store the admin_fields_conditions
- if (!$this->saveSmartItems('admin_fields_conditions'))
- {
- return false;
+ // save the table to database
+ if (!$this->saveSmartItems($table))
+ {
+ return false;
+ }
}
// do a after all run on all items that need it
$this->updateAfter();
@@ -1391,6 +1333,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break;
case 'admin_view':
+ // set the getters anchors
+ $getter = array('admin_view' => $item->id);
// we must clear the demo content (since it was not moved as far as we know) TODO
if ($item->add_sql == 1 && $item->source == 1)
{
@@ -1402,17 +1346,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// update the addfields (old dataset)
if (isset($item->addfields) && ComponentbuilderHelper::checkJson($item->addfields))
{
- // set the anchors getters
- $getter = array('admin_view' => $item->id);
// move the old data
$this->setDivergedDataMover($item->addfields, 'admin_fields', 'addfields', $getter);
- // remove from this dataset
- unset($item->addfields);
- }
- elseif (isset($item->addfields))
- {
- unset($item->addfields);
}
+ // remove from this dataset
+ unset($item->addfields);
// update the addlinked_views
if (isset($item->addlinked_views) && ComponentbuilderHelper::checkJson($item->addlinked_views))
{
@@ -1425,17 +1363,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// update the addconditions (old dataset)
if (isset($item->addconditions) && ComponentbuilderHelper::checkJson($item->addconditions))
{
- // set the getters anchors
- $getter = array('admin_view' => $item->id);
// move the old data
$this->setDivergedDataMover($item->addconditions, 'admin_fields_conditions', 'addconditions', $getter);
- // remove from this dataset
- unset($item->addconditions);
- }
- elseif (isset($item->addconditions))
- {
- unset($item->addconditions);
}
+ // remove from this dataset
+ unset($item->addconditions);
// repeatable fields to update
$updaterR = array(
// repeatablefield => checker
@@ -1450,106 +1382,246 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break;
case 'joomla_component':
+ // set the anchors getters
+ $getter = array('joomla_component' => $item->id);
// update the addconfig
if (isset($item->addconfig) && ComponentbuilderHelper::checkJson($item->addconfig))
{
- $addconfig = json_decode($item->addconfig, true);
- foreach ($addconfig['field'] as $nr => $id)
- {
- if (!is_numeric($id))
- {
- continue;
- }
- // update the addconfig
- if (isset($this->newID['field'][(int) $id]))
- {
- $addconfig['field'][$nr] = $this->newID['field'][(int) $id];
- }
- else
- {
- $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BCONFIG_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BFIELDB_SO_THE_IDS_WAS_REMOVED', '('.ComponentbuilderHelper::safeString($type, 'w').':'.$item->id.')', $id), 'warning');
- $addconfig['field'][$nr] = '';
- }
- }
- // load it back
- $item->addconfig = json_encode($addconfig);
+ // move the old data
+ $this->setDivergedDataMover($item->addconfig, 'component_config', 'addconfig', $getter);
}
+ // remove from this dataset
+ unset($item->addconfig);
// update the addadmin_views
if (isset($item->addadmin_views) && ComponentbuilderHelper::checkJson($item->addadmin_views))
{
- $addadmin_views = json_decode($item->addadmin_views, true);
- foreach ($addadmin_views['adminview'] as $nr => $id)
- {
- if (!is_numeric($id))
- {
- continue;
- }
- // update the addadmin_views
- if (isset($this->newID['admin_view'][(int) $id]))
- {
- $addadmin_views['adminview'][$nr] = $this->newID['admin_view'][(int) $id];
- }
- else
- {
- $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BADMIN_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BADMIN_VIEWB_SO_THE_IDS_WAS_REMOVED', '('.ComponentbuilderHelper::safeString($type, 'w').':'.$item->id.')', $id), 'warning');
- $addadmin_views['adminview'][$nr] = '';
- }
- }
- // load it back
- $item->addadmin_views = json_encode($addadmin_views);
- }
- else
- {
- unset($item->addadmin_views);
+ // move the old data
+ $this->setDivergedDataMover($item->addadmin_views, 'component_admin_views', 'addadmin_views', $getter);
}
+ // remove from this dataset
+ unset($item->addadmin_views);
// update the addcustom_admin_views
if (isset($item->addcustom_admin_views) && ComponentbuilderHelper::checkJson($item->addcustom_admin_views))
{
- $addcustom_admin_views = json_decode($item->addcustom_admin_views, true);
- foreach ($addcustom_admin_views['customadminview'] as $nr => $id)
- {
- if (!is_numeric($id))
- {
- continue;
- }
- // update the addcustom_admin_views
- if (isset($this->newID['custom_admin_view'][(int) $id]))
- {
- $addcustom_admin_views['customadminview'][$nr] = $this->newID['custom_admin_view'][(int) $id];
- }
- else
- {
- $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BCUSTOM_ADMIN_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BCUSTOM_ADMIN_VIEWB_SO_THE_IDS_WAS_REMOVED', '('.ComponentbuilderHelper::safeString($type, 'w').':'.$item->id.')', $id), 'warning');
- $addcustom_admin_views['customadminview'][$nr] = '';
- }
- }
- // load it back
- $item->addcustom_admin_views = json_encode($addcustom_admin_views);
+ // move the old data
+ $this->setDivergedDataMover($item->addcustom_admin_views, 'component_custom_admin_views', 'addcustom_admin_views', $getter);
}
+ // remove from this dataset
+ unset($item->addcustom_admin_views);
// update the addsite_views
if (isset($item->addsite_views) && ComponentbuilderHelper::checkJson($item->addsite_views))
{
- $addsite_views = json_decode($item->addsite_views, true);
- foreach ($addsite_views['siteview'] as $nr => $id)
- {
- if (!is_numeric($id))
- {
- continue;
- }
- // update the addsite_views
- if (isset($this->newID['site_view'][(int) $id]))
- {
- $addsite_views['siteview'][$nr] = $this->newID['site_view'][(int) $id];
- }
- else
- {
- $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSITE_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BSITE_VIEWB_SO_THE_IDS_WAS_REMOVED', '('.ComponentbuilderHelper::safeString($type, 'w').':'.$item->id.')', $id), 'warning');
- $addsite_views['siteview'][$nr] = '';
- }
- }
- // load it back
- $item->addsite_views = json_encode($addsite_views);
+ // move the old data
+ $this->setDivergedDataMover($item->addsite_views, 'component_site_views', 'addsite_views', $getter);
}
+ // remove from this dataset
+ unset($item->addsite_views);
+ // update the version_update
+ if (isset($item->version_update) && ComponentbuilderHelper::checkJson($item->version_update))
+ {
+ // move the old data
+ $this->setDivergedDataMover($item->version_update, 'component_updates', 'version_update', $getter);
+ }
+ // remove from this dataset
+ unset($item->version_update);
+ // update the sql_tweak
+ if (isset($item->sql_tweak) && ComponentbuilderHelper::checkJson($item->sql_tweak))
+ {
+ // move the old data
+ $this->setDivergedDataMover($item->sql_tweak, 'component_mysql_tweaks', 'sql_tweak', $getter);
+ }
+ // remove from this dataset
+ unset($item->sql_tweak);
+ // update the addcustommenus
+ if (isset($item->addcustommenus) && ComponentbuilderHelper::checkJson($item->addcustommenus))
+ {
+ // move the old data
+ $this->setDivergedDataMover($item->addcustommenus, 'component_custom_admin_menus', 'addcustommenus', $getter);
+ }
+ // remove from this dataset
+ unset($item->addcustommenus);
+ // update the dashboard_tab
+ if (isset($item->dashboard_tab) && ComponentbuilderHelper::checkJson($item->dashboard_tab))
+ {
+ // move the old data
+ $this->setDivergedDataMover($item->dashboard_tab, 'component_dashboard', 'dashboard_tab', $getter);
+ }
+ // remove from this dataset
+ unset($item->dashboard_tab);
+ // update the php_dashboard_methods
+ if (isset($item->php_dashboard_methods))
+ {
+ // move the old data
+ $this->setDivergedDataMover($item->php_dashboard_methods, 'component_dashboard', 'php_dashboard_methods', $getter);
+ }
+ // remove from this dataset
+ unset($item->php_dashboard_methods);
+ unset($item->add_php_dashboard_methods);
+ // update the addfiles
+ if (isset($item->addfiles) && ComponentbuilderHelper::checkJson($item->addfiles))
+ {
+ // move the old data
+ $this->setDivergedDataMover($item->addfiles, 'component_files_folders', 'addfiles', $getter);
+ }
+ // remove from this dataset
+ unset($item->addfiles);
+ // update the addfolders
+ if (isset($item->addfolders) && ComponentbuilderHelper::checkJson($item->addfolders))
+ {
+ // move the old data
+ $this->setDivergedDataMover($item->addfolders, 'component_files_folders', 'addfolders', $getter);
+ }
+ // remove from this dataset
+ unset($item->addfolders);
+ // repeatable fields to update
+ $updaterR = array(
+ // repeatablefield => checker
+ 'addcontributors' => 'name'
+ );
+ // update the repeatable fields
+ $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
+ break;
+ case 'component_admin_views':
+ // update the joomla_component ID where needed
+ $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type);
+ // repeatable fields to update
+ $updaterR = array(
+ // repeatablefield => checker
+ 'addadmin_views' => 'adminview'
+ );
+ // update the repeatable fields
+ $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
+ // subform fields to target
+ $updaterT = array(
+ // subformfield => array( field => type_value )
+ 'addadmin_views' => array('adminview' => 'admin_view')
+ );
+ // update the subform ids
+ $this->updateSubformsIDs($item, 'component_admin_views', $updaterT);
+ break;
+ case 'component_site_views':
+ // update the joomla_component ID where needed
+ $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type);
+ // repeatable fields to update
+ $updaterR = array(
+ // repeatablefield => checker
+ 'addsite_views' => 'siteview'
+ );
+ // update the repeatable fields
+ $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
+ // subform fields to target
+ $updaterT = array(
+ // subformfield => array( field => type_value )
+ 'addsite_views' => array('siteview' => 'site_view')
+ );
+ // update the subform ids
+ $this->updateSubformsIDs($item, 'component_site_views', $updaterT);
+ break;
+ case 'component_custom_admin_views':
+ // update the joomla_component ID where needed
+ $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type);
+ // repeatable fields to update
+ $updaterR = array(
+ // repeatablefield => checker
+ 'addcustom_admin_views' => 'customadminview'
+ );
+ // update the repeatable fields
+ $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
+ // subform fields to target
+ $updaterT = array(
+ // subformfield => array( field => type_value )
+ 'addcustom_admin_views' => array('customadminview' => 'custom_admin_view')
+ );
+ // update the subform ids
+ $this->updateSubformsIDs($item, 'component_custom_admin_views', $updaterT);
+ break;
+ case 'component_updates':
+ // update the joomla_component ID where needed
+ $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type);
+ // repeatable fields to update
+ $updaterR = array(
+ // repeatablefield => checker
+ 'version_update' => 'version'
+ );
+ // update the repeatable fields
+ $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
+ break;
+ case 'component_mysql_tweaks':
+ // update the joomla_component ID where needed
+ $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type);
+ // repeatable fields to update
+ $updaterR = array(
+ // repeatablefield => checker
+ 'sql_tweak' => 'adminview'
+ );
+ // update the repeatable fields
+ $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
+ // subform fields to target
+ $updaterT = array(
+ // subformfield => array( field => type_value )
+ 'sql_tweak' => array('adminview' => 'admin_view')
+ );
+ // update the subform ids
+ $this->updateSubformsIDs($item, 'component_mysql_tweaks', $updaterT);
+ break;
+ case 'component_custom_admin_menus':
+ // update the joomla_component ID where needed
+ $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type);
+ // repeatable fields to update
+ $updaterR = array(
+ // repeatablefield => checker
+ 'addcustommenus' => 'name'
+ );
+ // update the repeatable fields
+ $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
+ // subform fields to target
+ $updaterT = array(
+ // subformfield => array( field => type_value )
+ 'addcustommenus' => array('before' => 'admin_view')
+ );
+ // update the subform ids
+ $this->updateSubformsIDs($item, 'component_custom_admin_menus', $updaterT);
+ break;
+ case 'component_config':
+ // update the joomla_component ID where needed
+ $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type);
+ // repeatable fields to update
+ $updaterR = array(
+ // repeatablefield => checker
+ 'addconfig' => 'field'
+ );
+ // update the repeatable fields
+ $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
+ // subform fields to target
+ $updaterT = array(
+ // subformfield => array( field => type_value )
+ 'addconfig' => array('field' => 'field')
+ );
+ // update the subform ids
+ $this->updateSubformsIDs($item, 'component_config', $updaterT);
+ break;
+ case 'component_dashboard':
+ // update the joomla_component ID where needed
+ $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type);
+ // repeatable fields to update
+ $updaterR = array(
+ // repeatablefield => checker
+ 'dashboard_tab' => 'name'
+ );
+ // update the repeatable fields
+ $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
+ break;
+ case 'component_files_folders':
+ // update the joomla_component ID where needed
+ $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type);
+ // repeatable fields to update
+ $updaterR = array(
+ // repeatablefield => checker
+ 'addfiles' => 'file',
+ 'addfolders' => 'folder'
+ );
+ // update the repeatable fields
+ $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break;
case 'custom_code':
// update the component ID where needed
@@ -2171,6 +2243,20 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$retryAgain = 2;
}
break;
+ case 'component_admin_views':
+ case 'component_site_views':
+ case 'component_custom_admin_views':
+ case 'component_updates':
+ case 'component_mysql_tweaks':
+ case 'component_custom_admin_menus':
+ case 'component_config':
+ case 'component_dashboard':
+ case 'component_files_folders':
+ // get by admin_view (since there should only be one of each name)
+ $getter = array('joomla_component');
+ $this->specialValue = array();
+ $this->specialValue['joomla_component'] = $this->newID['joomla_component'][(int) $item->joomla_component];
+ break;
case 'language_translation':
// get by English translation since there should just be one
$getter = 'entranslation';
diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php
index 2ad931768..2f73861a9 100644
--- a/admin/models/joomla_component.php
+++ b/admin/models/joomla_component.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php
index c2984a96e..f1b29e975 100644
--- a/admin/models/joomla_components.php
+++ b/admin/models/joomla_components.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/tables/joomla_component.php b/admin/tables/joomla_component.php
index 409168d2d..173c6319d 100644
--- a/admin/tables/joomla_component.php
+++ b/admin/tables/joomla_component.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_component/submitbutton.js b/admin/views/joomla_component/submitbutton.js
index e86d59c14..0cd49e238 100644
--- a/admin/views/joomla_component/submitbutton.js
+++ b/admin/views/joomla_component/submitbutton.js
@@ -9,7 +9,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_component/tmpl/edit.php b/admin/views/joomla_component/tmpl/edit.php
index 595b109b3..2b63bc0ce 100644
--- a/admin/views/joomla_component/tmpl/edit.php
+++ b/admin/views/joomla_component/tmpl/edit.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_component/view.html.php b/admin/views/joomla_component/view.html.php
index 043a63997..6690a9ed9 100644
--- a/admin/views/joomla_component/view.html.php
+++ b/admin/views/joomla_component/view.html.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_components/tmpl/default.php b/admin/views/joomla_components/tmpl/default.php
index 3a2170118..db7a3b08d 100644
--- a/admin/views/joomla_components/tmpl/default.php
+++ b/admin/views/joomla_components/tmpl/default.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_components/tmpl/default_batch_body.php b/admin/views/joomla_components/tmpl/default_batch_body.php
index 2cbf02a4d..4fae75d36 100644
--- a/admin/views/joomla_components/tmpl/default_batch_body.php
+++ b/admin/views/joomla_components/tmpl/default_batch_body.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_components/tmpl/default_batch_footer.php b/admin/views/joomla_components/tmpl/default_batch_footer.php
index 28a532230..07d3589be 100644
--- a/admin/views/joomla_components/tmpl/default_batch_footer.php
+++ b/admin/views/joomla_components/tmpl/default_batch_footer.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_components/tmpl/default_body.php b/admin/views/joomla_components/tmpl/default_body.php
index 73ff496a6..ac88565d1 100644
--- a/admin/views/joomla_components/tmpl/default_body.php
+++ b/admin/views/joomla_components/tmpl/default_body.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_components/tmpl/default_foot.php b/admin/views/joomla_components/tmpl/default_foot.php
index d6c3d1e4c..071debc56 100644
--- a/admin/views/joomla_components/tmpl/default_foot.php
+++ b/admin/views/joomla_components/tmpl/default_foot.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_components/tmpl/default_head.php b/admin/views/joomla_components/tmpl/default_head.php
index 763d33e6d..91e09f97d 100644
--- a/admin/views/joomla_components/tmpl/default_head.php
+++ b/admin/views/joomla_components/tmpl/default_head.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_components/tmpl/default_toolbar.php b/admin/views/joomla_components/tmpl/default_toolbar.php
index 03121c35a..5d3574f2c 100644
--- a/admin/views/joomla_components/tmpl/default_toolbar.php
+++ b/admin/views/joomla_components/tmpl/default_toolbar.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_components/view.html.php b/admin/views/joomla_components/view.html.php
index 9a0a1c409..f60b3dfeb 100644
--- a/admin/views/joomla_components/view.html.php
+++ b/admin/views/joomla_components/view.html.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 508 of this MVC
+ @version @update number 516 of this MVC
@build 29th October, 2017
@created 6th May, 2015
@package Component Builder