From 236ecd53f424a3735b62018097babd1d4d6602cc Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Thu, 13 Jun 2019 18:45:55 +0200 Subject: [PATCH] Fixed gh-424 so that the global settings of JCB will save even if the components are not selected in the Development Method tab. --- README.md | 4 ++-- admin/README.txt | 4 ++-- admin/config.xml | 2 -- admin/models/fields/component.php | 34 +++++++++++++++---------------- componentbuilder.xml | 2 +- 5 files changed, 22 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index e757a3493..06fedd73c 100644 --- a/README.md +++ b/README.md @@ -146,11 +146,11 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 12th June, 2019 ++ *Last Build*: 13th June, 2019 + *Version*: 2.9.20 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **206854** ++ *Line count*: **206852** + *Field count*: **1140** + *File count*: **1346** + *Folder count*: **209** diff --git a/admin/README.txt b/admin/README.txt index e757a3493..06fedd73c 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -146,11 +146,11 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 12th June, 2019 ++ *Last Build*: 13th June, 2019 + *Version*: 2.9.20 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **206854** ++ *Line count*: **206852** + *Field count*: **1140** + *File count*: **1346** + *Folder count*: **209** diff --git a/admin/config.xml b/admin/config.xml index 7ece41d41..b5e9f989e 100644 --- a/admin/config.xml +++ b/admin/config.xml @@ -711,7 +711,6 @@ class="list_class" multiple="false" default="0" - required="true" button="false" /> @@ -840,7 +839,6 @@ class="text_area" readonly="false" disabled="false" - required="true" filter="STRING" message="COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_MESSAGE" hint="COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_HINT" diff --git a/admin/models/fields/component.php b/admin/models/fields/component.php index 9d42bd301..06c94d826 100644 --- a/admin/models/fields/component.php +++ b/admin/models/fields/component.php @@ -143,23 +143,23 @@ class JFormFieldComponent extends JFormFieldList protected function getOptions() { $db = JFactory::getDBO(); -$query = $db->getQuery(true); -$query->select($db->quoteName(array('a.id','a.system_name'),array('id','component_system_name'))); -$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); -$query->where($db->quoteName('a.published') . ' >= 1'); -$query->order('a.system_name ASC'); -$db->setQuery((string)$query); -$items = $db->loadObjectList(); -$options = array(); -if ($items) -{ - $options[] = JHtml::_('select.option', '', 'Select an option'); - foreach($items as $item) - { - $options[] = JHtml::_('select.option', $item->id, $item->component_system_name); - } -} + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.system_name'),array('id','component_system_name'))); + $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.system_name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select an option'); + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->component_system_name); + } + } -return $options; + return $options; } } diff --git a/componentbuilder.xml b/componentbuilder.xml index 07fb17263..76127e790 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 12th June, 2019 + 13th June, 2019 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com