From 7cb78222eaff9a9b4bb8b5c4b5f1092706145a1f Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 4 May 2018 22:27:49 +0200 Subject: [PATCH] Fixed the clone method that gave the error Call to undefined method ComponentbuilderModelImport_joomla_components::updateAfter() --- README.md | 6 ++-- admin/README.txt | 6 ++-- .../en-GB/en-GB.com_componentbuilder.ini | 2 ++ admin/models/fields/lang.php | 11 +++++++ admin/models/joomla_components.php | 2 +- .../import_joomla_components/tmpl/default.php | 31 ++++++++++++------- .../import_joomla_components/view.html.php | 10 ++++-- componentbuilder.xml | 4 +-- componentbuilder_update_server.xml | 4 +-- script.php | 2 +- 10 files changed, 53 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 095d11fb3..5963c1039 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.7) 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.8) 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) @@ -127,10 +127,10 @@ Component Builder is mapped as a component in itself on my local development env + *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *First Build*: 30th April, 2015 + *Last Build*: 4th May, 2018 -+ *Version*: 2.7.7 ++ *Version*: 2.7.8 + *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*: **193747** ++ *Line count*: **193786** + *Field count*: **1034** + *File count*: **1201** + *Folder count*: **193** diff --git a/admin/README.txt b/admin/README.txt index 095d11fb3..5963c1039 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.7) 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.8) 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) @@ -127,10 +127,10 @@ Component Builder is mapped as a component in itself on my local development env + *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *First Build*: 30th April, 2015 + *Last Build*: 4th May, 2018 -+ *Version*: 2.7.7 ++ *Version*: 2.7.8 + *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*: **193747** ++ *Line count*: **193786** + *Field count*: **1034** + *File count*: **1201** + *Folder count*: **193** diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index de51180ae..baedf8d3d 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -4269,6 +4269,7 @@ COM_COMPONENTBUILDER_IWEBSITEI_BSB="Website: %s" COM_COMPONENTBUILDER_JCB_COMMUNITY="JCB Community" COM_COMPONENTBUILDER_JCB_COMMUNITY_PACKAGES="JCB Community Packages" COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS="JCB Community Snippets" +COM_COMPONENTBUILDER_JCB_PACKAGE_IMPORT="JCB Package Import" COM_COMPONENTBUILDER_JCB_PACKAGE_INFO_PATH_DOES_NOT_WORK_WE_ADVICE_YOU_BNOT_TO_CONTINUEB_WITH_THE_IMPORT_OF_THE_SELECTED_PACKAGE="JCB Package info path does not work, we advice you not to continue with the import of the selected package!" COM_COMPONENTBUILDER_JOOMLA_COMPONENT="Joomla Component" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS="Joomla Components" @@ -5487,6 +5488,7 @@ COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access" COM_COMPONENTBUILDER_PUBLISHED="Published" COM_COMPONENTBUILDER_PUBLISHING="Publishing" COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component" +COM_COMPONENTBUILDER_REFRESH="Refresh" COM_COMPONENTBUILDER_RELEASED_THIS="released this" COM_COMPONENTBUILDER_RENAME="Rename" COM_COMPONENTBUILDER_REPORT_AN_ISSUE_BSB="Report an issue: %s" diff --git a/admin/models/fields/lang.php b/admin/models/fields/lang.php index 10b3952f8..dca42acd1 100644 --- a/admin/models/fields/lang.php +++ b/admin/models/fields/lang.php @@ -57,6 +57,8 @@ $query->where($db->quoteName('a.published') . ' >= 1'); $query->order('a.langtag ASC'); $db->setQuery((string)$query); $items = $db->loadObjectList(); +// make sure the English GB is added +$wasAdded = false; $options = array(); if ($items) { @@ -64,8 +66,17 @@ if ($items) foreach($items as $item) { $options[] = JHtml::_('select.option', trim($item->langtag), $item->language_name . ' (' .$item->langtag.')'); + if ('en-GB' === trim($item->langtag)) + { + $wasAdded = true; + } } } +// now add it if not already added +if (!$wasAdded) +{ + $options[] = JHtml::_('select.option', 'en-GB', 'English GB (en-GB)'); +} return $options; } } diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index 0e634d90e..4444dc244 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -875,7 +875,7 @@ class ComponentbuilderModelJoomla_components extends JModelList } } // do an after all run on all items that need it - $model->updateAfter(); + $model->updateAfterAll(); // finally move the old datasets $model->moveDivergedData(); // we had success diff --git a/admin/views/import_joomla_components/tmpl/default.php b/admin/views/import_joomla_components/tmpl/default.php index 3b405c49b..928ca1d9a 100644 --- a/admin/views/import_joomla_components/tmpl/default.php +++ b/admin/views/import_joomla_components/tmpl/default.php @@ -48,19 +48,28 @@ JHtml::_('behavior.keepalive'); form.submit(); }; - Joomla.submitbutton = function() + Joomla.submitbutton = function(task) { - var form = document.getElementById('adminForm'); - // do field validation - if (form.import_package.value == "") - { - alert(""); - } - else - { + if ('refresh' === task){ jQuery('#loading').css('display', 'block'); - form.gettype.value = 'upload'; - form.submit(); + // clear the history + jQuery.jStorage.flush(); + // now start the update + autoJCBpackageInfo(); + jQuery('#loading').hide(); + } else { + var form = document.getElementById('adminForm'); + // do field validation + if (form.import_package.value == "") + { + alert(""); + } + else + { + jQuery('#loading').css('display', 'block'); + form.gettype.value = 'upload'; + form.submit(); + } } }; Joomla.submitbuttonDir = function() diff --git a/admin/views/import_joomla_components/view.html.php b/admin/views/import_joomla_components/view.html.php index b7df76781..3c665791f 100644 --- a/admin/views/import_joomla_components/view.html.php +++ b/admin/views/import_joomla_components/view.html.php @@ -62,15 +62,21 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy $this->state = &$state; // get global action permissions $this->canDo = ComponentbuilderHelper::getActions('import'); + // load the application + $this->app = JFactory::getApplication(); // We don't need toolbar in the modal window. if ($this->getLayout() !== 'modal') { $this->addToolbar(); $this->sidebar = JHtmlSidebar::render(); + // hide the main menu + $this->app->input->set('hidemainmenu', true); + // add title to the page + JToolbarHelper::title(JText::_('COM_COMPONENTBUILDER_JCB_PACKAGE_IMPORT'),'upload'); + // add refesh button. + JToolBarHelper::custom('refresh', 'refresh', '', 'COM_COMPONENTBUILDER_REFRESH', false); } - // load the application - $app = JFactory::getApplication(); // get the session object $session = JFactory::getSession(); // check if it has package diff --git a/componentbuilder.xml b/componentbuilder.xml index 1595ded36..39aee7cc9 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -7,9 +7,9 @@ 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.7 + 2.7.8 Component Builder (v.2.7.7) +

Component Builder (v.2.7.8)

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 14c0ca072..a80b1c94f 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -344,10 +344,10 @@ Builds Complex Joomla Components com_componentbuilder component - 2.7.7 + 2.7.8 http://joomlacomponentbuilder.com - https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.7/JCB_v2.7.7.zip + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.8/JCB_v2.7.8.zip stable diff --git a/script.php b/script.php index 2c10d9efe..ea82ecdc9 100644 --- a/script.php +++ b/script.php @@ -4878,7 +4878,7 @@ class com_componentbuilderInstallerScript echo ' -

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

'; +

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

'; } }