From 81e5038bb27b7bb0c820ceb84a8ee2d44901cfea Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 14 Apr 2018 02:01:34 +0200 Subject: [PATCH] Fixed gh-264 another glitch due to the update of the field area, that caused the language tag selection to break --- README.md | 8 ++++---- admin/README.txt | 8 ++++---- admin/models/fields/lang.php | 19 ++++++++++++++++++- admin/models/forms/language_translation.xml | 1 + componentbuilder.xml | 6 +++--- componentbuilder_update_server.xml | 4 ++-- script.php | 2 +- 7 files changed, 33 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index e4988fdc0..b84e913f0 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.4) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.5) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -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*: 13th April, 2018 -+ *Version*: 2.7.4 ++ *Last Build*: 14th April, 2018 ++ *Version*: 2.7.5 + *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*: **182294** ++ *Line count*: **182312** + *Field count*: **1012** + *File count*: **1199** + *Folder count*: **193** diff --git a/admin/README.txt b/admin/README.txt index e4988fdc0..b84e913f0 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.4) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.5) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -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*: 13th April, 2018 -+ *Version*: 2.7.4 ++ *Last Build*: 14th April, 2018 ++ *Version*: 2.7.5 + *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*: **182294** ++ *Line count*: **182312** + *Field count*: **1012** + *File count*: **1199** + *Folder count*: **193** diff --git a/admin/models/fields/lang.php b/admin/models/fields/lang.php index acf4d578c..b44765c54 100644 --- a/admin/models/fields/lang.php +++ b/admin/models/fields/lang.php @@ -49,6 +49,23 @@ class JFormFieldLang extends JFormFieldList */ public function getOptions() { - return null; + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.langtag','a.name'),array('langtag','language_name'))); + $query->from($db->quoteName('#__componentbuilder_language', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.langtag 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', trim($item->langtag), $item->language_name . ' (' .$item->langtag.')'); + } + } + return $options; } } diff --git a/admin/models/forms/language_translation.xml b/admin/models/forms/language_translation.xml index 8bee46a4d..49080cd7a 100644 --- a/admin/models/forms/language_translation.xml +++ b/admin/models/forms/language_translation.xml @@ -141,6 +141,7 @@ label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_LANGUAGE_LABEL" class="list_class" multiple="false" + default="0" required="false" button="false" /> diff --git a/componentbuilder.xml b/componentbuilder.xml index ace0a971c..c4c2fad97 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 13th April, 2018 + 14th April, 2018 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://joomlacomponentbuilder.com Copyright (C) 2015. All Rights Reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - 2.7.4 + 2.7.5 Component Builder (v.2.7.4) +

Component Builder (v.2.7.5)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index 5bfd5e0ef..004a44475 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -327,10 +327,10 @@ Builds Complex Joomla Components com_componentbuilder component - 2.7.4 + 2.7.5 http://joomlacomponentbuilder.com - https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.4/JCB_v2.7.4.zip + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.5/JCB_v2.7.5.zip stable diff --git a/script.php b/script.php index 027987538..e69da93da 100644 --- a/script.php +++ b/script.php @@ -4878,7 +4878,7 @@ class com_componentbuilderInstallerScript echo ' -

Upgrade to Version 2.7.4 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 2.7.5 Was Successful! Let us know if anything is not working as expected.

'; } }