From 7fed9d7a1c69643bc802b75e97ba4ed583f41ca7 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Mon, 12 Aug 2019 23:30:31 +0200 Subject: [PATCH] Resolved gh-436 so that the new Joomla plugin builder/feature is fully active, and part of the import and export of JCB packages. --- README.md | 6 +- admin/README.txt | 6 +- admin/compiler/joomla_3/vdm.php | 32 --- admin/controllers/compiler.php | 229 +++++++++++++++--- admin/helpers/compiler.php | 28 ++- admin/helpers/compiler/a_Get.php | 6 +- admin/helpers/compiler/b_Structure.php | 9 +- .../en-GB/en-GB.com_componentbuilder.ini | 11 +- admin/models/ajax.php | 7 +- admin/models/compiler.php | 14 +- admin/models/import_joomla_components.php | 166 ++++++++++++- admin/models/joomla_components.php | 78 +++++- admin/models/joomla_plugins.php | 18 +- admin/views/compiler/tmpl/default.php | 24 +- .../import_joomla_components/view.html.php | 2 +- componentbuilder.xml | 10 +- 16 files changed, 519 insertions(+), 127 deletions(-) delete mode 100644 admin/compiler/joomla_3/vdm.php diff --git a/README.md b/README.md index 4d52cb65b..29745c3e4 100644 --- a/README.md +++ b/README.md @@ -146,13 +146,13 @@ 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*: 8th August, 2019 ++ *Last Build*: 13th August, 2019 + *Version*: 2.9.36 + *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*: **245973** ++ *Line count*: **246440** + *Field count*: **1319** -+ *File count*: **1594** ++ *File count*: **1595** + *Folder count*: **244** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index 4d52cb65b..29745c3e4 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -146,13 +146,13 @@ 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*: 8th August, 2019 ++ *Last Build*: 13th August, 2019 + *Version*: 2.9.36 + *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*: **245973** ++ *Line count*: **246440** + *Field count*: **1319** -+ *File count*: **1594** ++ *File count*: **1595** + *Folder count*: **244** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/compiler/joomla_3/vdm.php b/admin/compiler/joomla_3/vdm.php deleted file mode 100644 index 3c541e902..000000000 --- a/admin/compiler/joomla_3/vdm.php +++ /dev/null @@ -1,32 +0,0 @@ - - @my wife Roline van der Merwe - @copyright Copyright (C) 2015. All Rights Reserved - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Builds Complex Joomla Components - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); -?> -###BOM### - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -###VDM_ENCRYPTION_BODY### diff --git a/admin/controllers/compiler.php b/admin/controllers/compiler.php index d096fe24f..cbdcca5a9 100644 --- a/admin/controllers/compiler.php +++ b/admin/controllers/compiler.php @@ -60,7 +60,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin // include component compiler require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/compiler.php'; $model = $this->getModel('compiler'); - if ($model->builder($version,$componentId,$addBackup,$addRepo,$addPlaceholders,$debugLinenr, $minify)) + if ($model->builder($version, $componentId, $addBackup, $addRepo, $addPlaceholders, $debugLinenr, $minify)) { $cache = JFactory::getCache('mod_menu'); $cache->clean(); @@ -81,10 +81,32 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin { $url = JURI::root() . substr($model->compiler->filepath['component'], $pos + 1); } - // Message of successful build - $message = '

The ('.$model->compiler->componentFolderName.') Was Successfully Compiled!

'; - $message .= '

'; + // check if we have plugins + if (ComponentbuilderHelper::checkArray($model->compiler->filepath['plugins'])) + { + // Message of successful build + $message = '

The Extensions were Successfully Compiled!

'; + $message .= '

You can install any one of the following extensions!

'; + } + else + { + // Message of successful build + $message = '

The (' . $model->compiler->filepath['component-folder'] . ') was Successfully Compiled!

'; + } + $message .= '

'; + // check if we have plugins + if (ComponentbuilderHelper::checkArray($model->compiler->filepath['plugins'])) + { + foreach ($model->compiler->filepath['plugins-folder'] as $plugin_id => $plugin_folder) + { + $message .= '

'; + } + $message .= '

You can install all compiled extensions!

'; + $message .= '

'; + } $message .= '

Total time saved

'; $message .= '