From f8d6607392c283610128b0e9eb92af1814c9caa6 Mon Sep 17 00:00:00 2001 From: aB0t Date: Mon, 13 May 2024 12:23:57 +0200 Subject: [PATCH] Release of v3.2.2-alpha1 Fix auto build from SQL in Joomla 4 and 5. --- CHANGELOG.md | 4 ++ README.md | 10 ++-- admin/README.txt | 10 ++-- admin/sql/updates/mysql/3.2.1.sql | 1 + componentbuilder.xml | 6 +-- componentbuilder_update_server.xml | 18 +++++++ .../Extrusion/Helper/Builder.php | 52 +++++++++++++++++++ .../Extrusion/Helper/Mapping.php | 10 ++++ script.php | 2 +- 9 files changed, 99 insertions(+), 14 deletions(-) create mode 100644 admin/sql/updates/mysql/3.2.1.sql diff --git a/CHANGELOG.md b/CHANGELOG.md index eb8ebb48d..85ee69e60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# v3.2.2-alpha1 + +- Fix auto build from SQL in Joomla 4 and 5. + # v3.2.1 - Add power path override option on component level. diff --git a/README.md b/README.md index eabbc51de..5f926c924 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 save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.1) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.2-alpha1) 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) @@ -144,13 +144,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 10th May, 2024 -+ *Version*: 3.2.1 ++ *Last Build*: 13th May, 2024 ++ *Version*: 3.2.2-alpha1 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **761616** ++ *Line count*: **761701** + *Field count*: **2097** -+ *File count*: **5292** ++ *File count*: **5293** + *Folder count*: **471** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index eabbc51de..5f926c924 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 save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.1) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.2-alpha1) 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) @@ -144,13 +144,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 10th May, 2024 -+ *Version*: 3.2.1 ++ *Last Build*: 13th May, 2024 ++ *Version*: 3.2.2-alpha1 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **761616** ++ *Line count*: **761701** + *Field count*: **2097** -+ *File count*: **5292** ++ *File count*: **5293** + *Folder count*: **471** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). diff --git a/admin/sql/updates/mysql/3.2.1.sql b/admin/sql/updates/mysql/3.2.1.sql new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/admin/sql/updates/mysql/3.2.1.sql @@ -0,0 +1 @@ + diff --git a/componentbuilder.xml b/componentbuilder.xml index 57ecf035e..19ef9e965 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 10th May, 2024 + 13th May, 2024 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io Copyright (C) 2015 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 3.2.1 + 3.2.2-alpha1 Component Builder (v.3.2.1) +

Component Builder (v.3.2.2-alpha1)

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 41146c144..666b9dfd1 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -142,4 +142,22 @@ https://dev.vdm.io + + Component Builder + Builds Complex Joomla Components + pkg_component_builder + package + site + 3.2.2-alpha1 + https://dev.vdm.io + + https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.2-alpha1.zip + + + alpha + + Llewellyn van der Merwe + https://dev.vdm.io + + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Builder.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Builder.php index ac4953fb6..ba5087940 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Builder.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Builder.php @@ -109,6 +109,49 @@ class Builder extends Mapping $object->created = $this->today; $object->created_by = $this->user->id; $object->published = 1; + // empty values for sql sake + $object->addlinked_views = ''; + $object->addtables = ''; + $object->addtabs = ''; + $object->ajax_input = ''; + $object->css_view = ''; + $object->css_views = ''; + $object->custom_button = ''; + $object->html_import_view = ''; + $object->javascript_view_file = ''; + $object->javascript_view_footer = ''; + $object->javascript_views_file = ''; + $object->javascript_views_footer = ''; + $object->php_after_cancel = ''; + $object->php_after_delete = ''; + $object->php_after_publish = ''; + $object->php_ajaxmethod = ''; + $object->php_allowadd = ''; + $object->php_allowedit = ''; + $object->php_batchcopy = ''; + $object->php_batchmove = ''; + $object->php_before_cancel = ''; + $object->php_before_delete = ''; + $object->php_before_publish = ''; + $object->php_before_save = ''; + $object->php_controller = ''; + $object->php_controller_list = ''; + $object->php_document = ''; + $object->php_getform = ''; + $object->php_getitem = ''; + $object->php_getitems = ''; + $object->php_getitems_after_all = ''; + $object->php_getlistquery = ''; + $object->php_import = ''; + $object->php_import_display = ''; + $object->php_import_ext = ''; + $object->php_import_headers = ''; + $object->php_import_save = ''; + $object->php_import_setdata = ''; + $object->php_model = ''; + $object->php_model_list = ''; + $object->php_postsavehook = ''; + $object->php_save = ''; // add to data base if ($this->db->insertObject('#__componentbuilder_admin_view', $object)) { @@ -202,6 +245,15 @@ class Builder extends Mapping $object->published = 1; $object->store = 0; $object->xml = $this->setFieldXML($field, $fieldType); + // empty values for sql sake + $object->css_view = ''; + $object->css_views = ''; + $object->initiator_on_get_model = ''; + $object->initiator_on_save_model = ''; + $object->on_get_model_field = ''; + $object->on_save_model_field = ''; + $object->javascript_view_footer = ''; + $object->javascript_views_footer = ''; // add to data base if ($this->db->insertObject('#__componentbuilder_field', $object)) { diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Mapping.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Mapping.php index 4757634a2..c23e83163 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Mapping.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Mapping.php @@ -246,6 +246,16 @@ class Mapping // get table name $tableName = GetHelper::between($sql, "'#__", "'"); } + elseif (strpos($sql, "CREATE TABLE `") !== false) + { + // get table name + $tableName = GetHelper::between($sql, "CREATE TABLE `", "`"); + } + elseif (strpos($sql, "CREATE TABLE IF NOT EXISTS `") !== false) + { + // get table name + $tableName = GetHelper::between($sql, "CREATE TABLE IF NOT EXISTS `", "`"); + } // if it still was not found if (!isset($tableName) || !StringHelper::check($tableName)) diff --git a/script.php b/script.php index e0c721d87..f0353aa27 100644 --- a/script.php +++ b/script.php @@ -9810,7 +9810,7 @@ class Com_ComponentbuilderInstallerScript echo '

-

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

'; +

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

'; // Set db if not set already. if (!isset($db))