diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..3c81a1580 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,12 @@ +# v3.1.19 + +- We fixed #972 so that custom code (in the header) will be added after the power namespaces +- We added a message to show when a server move failed +- We fixed the BaseConfig to not use '_' as separator +- We fixed the footable loading issue +- We removed the need for passing placeholders by reference +- We added the option to generate a CHANGELOG +- We fixed the server class to load new client if server details changed. +- We fixed the readme placeholder issue #978. +- We fixed the empty server url issue #978. +- Fixed Package import to now use the phplibsec version 3 \ No newline at end of file diff --git a/README.md b/README.md index c545ebfb5..50b01a839 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.1.17) 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.1.19) 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) @@ -99,18 +99,22 @@ To install these packages [watch this tutorial](https://vdm.bz/how-to-install-jc Where can you get support and help? ==================== -+ [The JCB Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE) -+ [German Basic Introduction](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7) -+ [Hello World Tutorial](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) -+ [The JCB! Wiki](https://git.vdm.dev/joomla/Component-Builder/wiki) -+ [Forum](https://vdm.bz/jcb-forum) -+ [Report a Security Issue](https://www.joomlacomponentbuilder.com/report-security-issues) -+ [Community Complaint](https://www.joomlacomponentbuilder.com/community-complaint) -+ [Open Issue On Gitea](https://git.vdm.dev/joomla/Component-Builder/issues) ^^ - -Since [JCB](https://www.joomlacomponentbuilder.com) has [become a community](https://git.vdm.dev/joomla/Component-Builder/src/branch/master/.github/SUPPORT.md) project [VDM.io](https://www.vdm.io/) is **no longer solely responsible** for support. - -We have started a [**JCB forum**](https://vdm.bz/jcb-forum) where you can post questions, about how things work, or if you need some kind of help in relation to your development of your components. +- [Package](https://git.vdm.dev/joomla/pkg-component-builder). +- [Download](https://git.vdm.dev/joomla/pkg-component-builder/archive/master.zip). +- [Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE). +- [German](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7). +- [Hello World](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45). +- [Discussions](https://github.com/vdm-io/Joomla-Component-Builder/discussions). +- [Wiki](https://git.vdm.dev/joomla/Component-Builder/wiki). +- [Issues](https://git.vdm.dev/joomla/Component-Builder/issues). +- [Issues Stream](https://t.me/jcb_issues). ^^ +- [Updates](https://t.me/jcb_updates). +- [User Group](https://t.me/jcb_group). +- [Announcement](https://t.me/Joomla_component_builder). +- [Beta](https://git.vdm.dev/joomla-beta/pkg-component-builder). +- [Nightly Build](https://git.vdm.dev/joomla-beta/pkg-component-builder/archive/master.zip). +- [Community Complaint](https://www.joomlacomponentbuilder.com/community-complaint). +- [Security](https://www.vdm.io/report-security-issues). ^^ Then if you run into any issues, related to the [JCB](https://git.vdm.dev/joomla/Component-Builder/issues) code, like bugs, **start by searching** the (*open & closed*) issues over on [Gitea](https://git.vdm.dev/joomla/Component-Builder/issues), and if the issue has not been mentioned before, **then only** open a new issue, following the [community guidelines](https://git.vdm.dev/joomla/Component-Builder/src/branch/master/.github/CONTRIBUTING.md). @@ -140,14 +144,14 @@ 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*: 12th February, 2023 -+ *Version*: 3.1.17 ++ *Last Build*: 27th February, 2023 ++ *Version*: 3.1.19 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **364590** -+ *Field count*: **2009** -+ *File count*: **2325** -+ *Folder count*: **409** ++ *Line count*: **366135** ++ *Field count*: **2021** ++ *File count*: **2339** ++ *Folder count*: **411** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/README.txt b/admin/README.txt index c545ebfb5..50b01a839 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.1.17) 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.1.19) 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) @@ -99,18 +99,22 @@ To install these packages [watch this tutorial](https://vdm.bz/how-to-install-jc Where can you get support and help? ==================== -+ [The JCB Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE) -+ [German Basic Introduction](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7) -+ [Hello World Tutorial](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) -+ [The JCB! Wiki](https://git.vdm.dev/joomla/Component-Builder/wiki) -+ [Forum](https://vdm.bz/jcb-forum) -+ [Report a Security Issue](https://www.joomlacomponentbuilder.com/report-security-issues) -+ [Community Complaint](https://www.joomlacomponentbuilder.com/community-complaint) -+ [Open Issue On Gitea](https://git.vdm.dev/joomla/Component-Builder/issues) ^^ - -Since [JCB](https://www.joomlacomponentbuilder.com) has [become a community](https://git.vdm.dev/joomla/Component-Builder/src/branch/master/.github/SUPPORT.md) project [VDM.io](https://www.vdm.io/) is **no longer solely responsible** for support. - -We have started a [**JCB forum**](https://vdm.bz/jcb-forum) where you can post questions, about how things work, or if you need some kind of help in relation to your development of your components. +- [Package](https://git.vdm.dev/joomla/pkg-component-builder). +- [Download](https://git.vdm.dev/joomla/pkg-component-builder/archive/master.zip). +- [Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE). +- [German](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7). +- [Hello World](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45). +- [Discussions](https://github.com/vdm-io/Joomla-Component-Builder/discussions). +- [Wiki](https://git.vdm.dev/joomla/Component-Builder/wiki). +- [Issues](https://git.vdm.dev/joomla/Component-Builder/issues). +- [Issues Stream](https://t.me/jcb_issues). ^^ +- [Updates](https://t.me/jcb_updates). +- [User Group](https://t.me/jcb_group). +- [Announcement](https://t.me/Joomla_component_builder). +- [Beta](https://git.vdm.dev/joomla-beta/pkg-component-builder). +- [Nightly Build](https://git.vdm.dev/joomla-beta/pkg-component-builder/archive/master.zip). +- [Community Complaint](https://www.joomlacomponentbuilder.com/community-complaint). +- [Security](https://www.vdm.io/report-security-issues). ^^ Then if you run into any issues, related to the [JCB](https://git.vdm.dev/joomla/Component-Builder/issues) code, like bugs, **start by searching** the (*open & closed*) issues over on [Gitea](https://git.vdm.dev/joomla/Component-Builder/issues), and if the issue has not been mentioned before, **then only** open a new issue, following the [community guidelines](https://git.vdm.dev/joomla/Component-Builder/src/branch/master/.github/CONTRIBUTING.md). @@ -140,14 +144,14 @@ 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*: 12th February, 2023 -+ *Version*: 3.1.17 ++ *Last Build*: 27th February, 2023 ++ *Version*: 3.1.19 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **364590** -+ *Field count*: **2009** -+ *File count*: **2325** -+ *Folder count*: **409** ++ *Line count*: **366135** ++ *Field count*: **2021** ++ *File count*: **2339** ++ *Folder count*: **411** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/compiler/joomla_3/BaseController_import.php b/admin/compiler/joomla_3/BaseController_import.php index 9a13dbd18..504c266f2 100644 --- a/admin/compiler/joomla_3/BaseController_import.php +++ b/admin/compiler/joomla_3/BaseController_import.php @@ -17,8 +17,7 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); -use Joomla\CMS\MVC\Controller\BaseController; -use Joomla\Utilities\ArrayHelper; +###IMPORT_CONTROLLER_HEADER### /** * ###Component### Import Base Controller diff --git a/admin/compiler/joomla_3/BaseController_import_custom.php b/admin/compiler/joomla_3/BaseController_import_custom.php index a4474ba5e..dbe424603 100644 --- a/admin/compiler/joomla_3/BaseController_import_custom.php +++ b/admin/compiler/joomla_3/BaseController_import_custom.php @@ -17,8 +17,7 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); -use Joomla\CMS\MVC\Controller\BaseController; -use Joomla\Utilities\ArrayHelper; +###IMPORT_CUSTOM_CONTROLLER_HEADER### /** * ###Component### ###View### Base Controller diff --git a/admin/compiler/joomla_3/BaseDatabaseModel_import.php b/admin/compiler/joomla_3/BaseDatabaseModel_import.php index 7d7b21a68..f7501c7ec 100644 --- a/admin/compiler/joomla_3/BaseDatabaseModel_import.php +++ b/admin/compiler/joomla_3/BaseDatabaseModel_import.php @@ -17,13 +17,9 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); -use Joomla\CMS\MVC\Model\BaseDatabaseModel; -use Joomla\CMS\Filesystem\File; -use Joomla\CMS\Filesystem\Folder; -use Joomla\Utilities\ArrayHelper; -use PhpOffice\PhpSpreadsheet\IOFactory; +###IMPORT_MODEL_HEADER### -/** +/*** * ###Component### Import Base Database Model */ class ###Component###ModelImport extends BaseDatabaseModel diff --git a/admin/compiler/joomla_3/BaseDatabaseModel_import_custom.php b/admin/compiler/joomla_3/BaseDatabaseModel_import_custom.php index 43d0c526f..19be712eb 100644 --- a/admin/compiler/joomla_3/BaseDatabaseModel_import_custom.php +++ b/admin/compiler/joomla_3/BaseDatabaseModel_import_custom.php @@ -17,11 +17,7 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); -use Joomla\CMS\MVC\Model\BaseDatabaseModel; -use Joomla\CMS\Filesystem\File; -use Joomla\CMS\Filesystem\Folder; -use Joomla\Utilities\ArrayHelper; -use PhpOffice\PhpSpreadsheet\IOFactory; +###IMPORT_CUSTOM_MODEL_HEADER### /** * ###Component### ###View### Base Database Model diff --git a/admin/compiler/joomla_3/CHANGELOG.md b/admin/compiler/joomla_3/CHANGELOG.md new file mode 100644 index 000000000..def8704dd --- /dev/null +++ b/admin/compiler/joomla_3/CHANGELOG.md @@ -0,0 +1 @@ +###CHANGELOG### \ No newline at end of file diff --git a/admin/compiler/joomla_3/settings.json b/admin/compiler/joomla_3/settings.json index a49ebc81f..0b412ee2a 100644 --- a/admin/compiler/joomla_3/settings.json +++ b/admin/compiler/joomla_3/settings.json @@ -207,6 +207,12 @@ "rename": false, "type": "file" }, + "CHANGELOG.md": { + "naam": "CHANGELOG.md", + "path": "c0mp0n3nt/", + "rename": false, + "type": "file" + }, "headercheck.php": { "naam": "headercheck.php", "path": "c0mp0n3nt/site/helpers", diff --git a/admin/compiler/joomla_3/settings_componentbuilder.json b/admin/compiler/joomla_3/settings_componentbuilder.json index d543db459..79cbabbfa 100644 --- a/admin/compiler/joomla_3/settings_componentbuilder.json +++ b/admin/compiler/joomla_3/settings_componentbuilder.json @@ -207,6 +207,12 @@ "rename": false, "type": "file" }, + "CHANGELOG.md": { + "naam": "CHANGELOG.md", + "path": "c0mp0n3nt/", + "rename": false, + "type": "file" + }, "headercheck.php": { "naam": "headercheck.php", "path": "c0mp0n3nt/site/helpers", diff --git a/admin/controllers/import_joomla_components.php b/admin/controllers/import_joomla_components.php index 5f16168ab..e3fb93ce6 100644 --- a/admin/controllers/import_joomla_components.php +++ b/admin/controllers/import_joomla_components.php @@ -14,6 +14,7 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\MVC\Controller\BaseController; use Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory; /** * Componentbuilder Import_joomla_components Base Controller diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php index d61a78569..16359de3c 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -14,6 +14,10 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory; +use VDM\Joomla\Utilities\ArrayHelper as JCBArrayHelper; +use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Language\Text; /** * Joomla_components Admin Controller @@ -198,12 +202,12 @@ class ComponentbuilderControllerJoomla_components extends AdminController $session->set('backto_VDM_IMPORT', 'joomla_components'); $session->set('dataType_VDM_IMPORTINTO', 'smart_package'); // Redirect to import view. - $message = JText::_('COM_COMPONENTBUILDER_YOU_CAN_NOW_SELECT_THE_COMPONENT_BZIPB_PACKAGE_YOU_WOULD_LIKE_TO_IMPORTBR_SMALLPLEASE_NOTE_THAT_SMART_COMPONENT_IMPORT_ONLY_WORKS_WITH_THE_FOLLOWING_FORMAT_BZIPBSMALL'); + $message = Text::_('COM_COMPONENTBUILDER_YOU_CAN_NOW_SELECT_THE_COMPONENT_BZIPB_PACKAGE_YOU_WOULD_LIKE_TO_IMPORTBR_SMALLPLEASE_NOTE_THAT_SMART_COMPONENT_IMPORT_ONLY_WORKS_WITH_THE_FOLLOWING_FORMAT_BZIPBSMALL'); $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import_joomla_components&target=smartPackage', false), $message); return; } // Redirect to the list screen with error. - $message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_IMPORT_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP'); + $message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_IMPORT_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP'); $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error'); return; } @@ -211,7 +215,7 @@ class ComponentbuilderControllerJoomla_components extends AdminController public function smartExport() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + JSession::checkToken() or die(Text::_('JINVALID_TOKEN')); // Get the model $model = $this->getModel('Joomla_components'); // check if export is allowed for this user. @@ -224,10 +228,10 @@ class ComponentbuilderControllerJoomla_components extends AdminController // Sanitize the input JArrayHelper::toInteger($pks); // check if there is any selections - if (!ComponentbuilderHelper::checkArray($pks)) + if (!JCBArrayHelper::check($pks)) { // Redirect to the list screen with error. - $message = JText::_('COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN'); + $message = Text::_('COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN'); $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error'); return; } @@ -237,43 +241,44 @@ class ComponentbuilderControllerJoomla_components extends AdminController if ($model->getSmartExport($pks)) { // set the key string - if (componentbuilderHelper::checkString($model->key) && strlen($model->key) == 32) + if (StringHelper::check($model->key) && strlen($model->key) == 32) { - $keyNotice = '

' . JText::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE', $model->key) . '

'; - $keyNotice .= '

' . JText::_('COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY') . ''; + $keyNotice = '

' . Text::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE', $model->key) . '

'; + $keyNotice .= '

' . Text::_('COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_TWO_HUNDRED_AND_FIFTY_SIX_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY') . '

'; + // set the package owner info - if (componentbuilderHelper::getPackageOwnerValue('owner', $model->info) || componentbuilderHelper::getPackageOwnerValue('company', $model->info)) + if (PackageFactory::_('Display.Details')->hasOwner($model->info)) { - $ownerDetails = componentbuilderHelper::getPackageOwnerDetailsDisplay($model->info, true); + $ownerDetails = PackageFactory::_('Display.Details')->owner($model->info, true); } else { - $ownerDetails = '

' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET') . '

'; - $ownerDetails .= '

' . JText::_('COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_BJCB_GLOBAL_OPTIONSB_GO_TO_THE_BCOMPANYB_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE') . '

'; - $ownerDetails .= '

' . JText::_('COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS') . '

'; - $ownerDetails .= '

' . JText::_('COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB') . '

'; + $ownerDetails = '

' . Text::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET') . '

'; + $ownerDetails .= '

' . Text::_('COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_BJCB_GLOBAL_OPTIONSB_GO_TO_THE_BCOMPANYB_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE') . '

'; + $ownerDetails .= '

' . Text::_('COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS') . '

'; + $ownerDetails .= '

' . Text::_('COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB') . '

'; } } else { - $keyNotice = '

' . JText::_('COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY') . '

'; - $ownerDetails = '

' . JText::_('COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_BSETTINGSB_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_BEXPORT_KEYB') . '

'; + $keyNotice = '

' . Text::_('COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY') . '

'; + $ownerDetails = '

' . Text::_('COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_BSETTINGSB_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_BEXPORT_KEYB') . '

'; } // Redirect to the list screen with success. $message = array(); - $message[] = '

' . JText::_('COM_COMPONENTBUILDER_EXPORT_COMPLETED') . '

'; + $message[] = '

' . Text::_('COM_COMPONENTBUILDER_EXPORT_COMPLETED') . '

'; $message[] = '

' . JText::sprintf('COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE_BR_S_S', $model->zipPath, $keyNotice, $ownerDetails) . '

'; $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), implode('', $message), 'Success'); return; } else { - if (componentbuilderHelper::checkString($model->packagePath)) + if (StringHelper::check($model->packagePath)) { // clear all if not successful ComponentbuilderHelper::removeFolder($model->packagePath); } - if (componentbuilderHelper::checkString($model->zipPath)) + if (StringHelper::check($model->zipPath)) { // clear all if not successful JFile::delete($model->zipPath); @@ -281,7 +286,7 @@ class ComponentbuilderControllerJoomla_components extends AdminController } } // Redirect to the list screen with error. - $message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED_PLEASE_TRY_AGAIN_LATTER'); + $message = Text::_('COM_COMPONENTBUILDER_EXPORT_FAILED_PLEASE_TRY_AGAIN_LATTER'); $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error'); return; } @@ -318,8 +323,8 @@ class ComponentbuilderControllerJoomla_components extends AdminController { $textNotice = array(); $keyNotice = '

' . JText::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE', $model->key) . '

'; + $keyNotice .= '

' . JText::_('COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_TWO_HUNDRED_AND_FIFTY_SIX_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY') . '

'; $textNotice[] = JText::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_S', $model->key); - $keyNotice .= JText::_('COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY_UNLESS_THEY_HAVE_THIS_KEY_ABOVE_SO_DO_KEEP_IT_SAFE') . '
'; // set the package owner info if ((isset($model->info['getKeyFrom']['company']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['company'])) || (isset($model->info['getKeyFrom']['owner']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['owner']))) { @@ -449,7 +454,7 @@ class ComponentbuilderControllerJoomla_components extends AdminController public function cloner() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + JSession::checkToken() or die(Text::_('JINVALID_TOKEN')); // Get the model $model = $this->getModel('Joomla_components'); // check if export is allowed for this user. @@ -462,10 +467,10 @@ class ComponentbuilderControllerJoomla_components extends AdminController // Sanitize the input JArrayHelper::toInteger($pks); // check if there is any selections - if (!ComponentbuilderHelper::checkArray($pks)) + if (!JCBArrayHelper::check($pks)) { // Redirect to the list screen with error. - $message = JText::_('COM_COMPONENTBUILDER_NO_COMPONENT_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_OF_ONE_COMPONENT_AND_TRY_AGAIN'); + $message = Text::_('COM_COMPONENTBUILDER_NO_COMPONENT_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_OF_ONE_COMPONENT_AND_TRY_AGAIN'); $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error'); return; } @@ -473,7 +478,7 @@ class ComponentbuilderControllerJoomla_components extends AdminController elseif (count( (array) $pks) !== 1) { // Redirect to the list screen with error. - $message = JText::_('COM_COMPONENTBUILDER_ONLY_ONE_COMPONENT_CAN_BE_CLONED_AT_A_TIME_PLEASE_SELECT_ONE_AND_TRY_AGAIN'); + $message = Text::_('COM_COMPONENTBUILDER_ONLY_ONE_COMPONENT_CAN_BE_CLONED_AT_A_TIME_PLEASE_SELECT_ONE_AND_TRY_AGAIN'); $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error'); return; } @@ -483,17 +488,17 @@ class ComponentbuilderControllerJoomla_components extends AdminController if ($model->cloner($pks)) { // clone was successful - $message = JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_WITH_ALL_LINKED_ADMIN_VIEWS_FIELDS_LINKED_TO_ADMIN_VIEWS_CUSTOM_ADMIN_VIEWS_SITE_VIEWS_TEMPLATES_AND_LAYOUTS_WERE_CLONED_SUCCESSFUL'); + $message = Text::_('COM_COMPONENTBUILDER_THE_COMPONENT_WITH_ALL_LINKED_ADMIN_VIEWS_FIELDS_LINKED_TO_ADMIN_VIEWS_CUSTOM_ADMIN_VIEWS_SITE_VIEWS_TEMPLATES_AND_LAYOUTS_WERE_CLONED_SUCCESSFUL'); $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message); return; } // Redirect to the list screen with error. - $message = JText::_('COM_COMPONENTBUILDER_CLONE_FAILED'); + $message = Text::_('COM_COMPONENTBUILDER_CLONE_FAILED'); $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error'); return; } // Redirect to the list screen with error. - $message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_CLONE_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP'); + $message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_CLONE_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP'); $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error'); return; } @@ -502,5 +507,6 @@ class ComponentbuilderControllerJoomla_components extends AdminController { // admin area does not have API user, only front-end (so we fallback on login user) return JFactory::getUser(); - } + } + } diff --git a/admin/helpers/compiler.php b/admin/helpers/compiler.php index ba182e7f0..c0af9a1b9 100644 --- a/admin/helpers/compiler.php +++ b/admin/helpers/compiler.php @@ -707,12 +707,20 @@ class Compiler extends Infusion && ($update_server = CFactory::_('Component')->get('update_server')) !== null) { // move to server - CFactory::_('Server')->legacyMove( + if (!CFactory::_('Server')->legacyMove( $update_server_xml_path, $this->updateServerFileName . '.xml', (int) $update_server, CFactory::_('Component')->get('update_server_protocol') - ); + )) + { + $this->app->enqueueMessage( + JText::sprintf( + 'Upload of component (%s) update server XML failed.', + CFactory::_('Component')->get('system_name') + ), 'Error' + ); + } // remove the local file File::delete($update_server_xml_path); } @@ -738,12 +746,20 @@ class Compiler extends Infusion )) { // move to server - CFactory::_('Server')->legacyMove( + if (!CFactory::_('Server')->legacyMove( $module->update_server_xml_path, $module->update_server_xml_file_name, (int) $module->update_server, $module->update_server_protocol - ); + )) + { + $this->app->enqueueMessage( + JText::sprintf( + 'Upload of module (%s) update server XML failed.', + $module->name + ), 'Error' + ); + } // remove the local file File::delete($module->update_server_xml_path); } @@ -771,12 +787,20 @@ class Compiler extends Infusion )) { // move to server - CFactory::_('Server')->legacyMove( + if (!CFactory::_('Server')->legacyMove( $plugin->update_server_xml_path, $plugin->update_server_xml_file_name, (int) $plugin->update_server, $plugin->update_server_protocol - ); + )) + { + $this->app->enqueueMessage( + JText::sprintf( + 'Upload of plugin (%s) update server XML failed.', + $plugin->name + ), 'Error' + ); + } // remove the local file File::delete($plugin->update_server_xml_path); } @@ -844,6 +868,13 @@ class Compiler extends Infusion { // do a final run to update the readme file $two = 0; + // counter data if not set already + if (!CFactory::_('Content')->exist('LINE_COUNT') + || CFactory::_('Content')->get('LINE_COUNT') != CFactory::_('Utilities.Counter')->line) + { + CFactory::_('Utilities.Counter')->set(); + } + // search for the readme foreach (CFactory::_('Utilities.Files')->get('static') as $static) { if (('README.md' === $static['name'] @@ -864,12 +895,6 @@ class Compiler extends Infusion private function setReadMe($path) { - // set readme data if not set already - if (!CFactory::_('Content')->exist('LINE_COUNT') - || CFactory::_('Content')->get('LINE_COUNT') != CFactory::_('Utilities.Counter')->line) - { - CFactory::_('Utilities.Counter')->set(); - } // get the file $string = FileHelper::getContent($path); // update the file @@ -1063,12 +1088,20 @@ class Compiler extends Infusion &$component_sales_name, &$this->componentData) ); // move to server - CFactory::_('Server')->legacyMove( + if (!CFactory::_('Server')->legacyMove( $this->filepath['component'], $component_sales_name . '.zip', (int) CFactory::_('Component')->get('sales_server'), CFactory::_('Component')->get('sales_server_protocol') - ); + )) + { + $this->app->enqueueMessage( + JText::sprintf( + 'Upload of component (%s) zip file failed.', + CFactory::_('Component')->get('system_name') + ), 'Error' + ); + } } } // Trigger Event: jcb_ce_onAfterZipComponent @@ -1158,12 +1191,20 @@ class Compiler extends Infusion &$module) ); // move to server - CFactory::_('Server')->legacyMove( + if (!CFactory::_('Server')->legacyMove( $this->filepath['modules'][$module->id], $module->zip_name . '.zip', (int) $module->sales_server, $module->sales_server_protocol - ); + )) + { + $this->app->enqueueMessage( + JText::sprintf( + 'Upload of module (%s) zip file failed.', + $module->name + ), 'Error' + ); + } } } // Trigger Event: jcb_ce_onAfterZipModule @@ -1252,12 +1293,20 @@ class Compiler extends Infusion &$plugin) ); // move to server - CFactory::_('Server')->legacyMove( + if (!CFactory::_('Server')->legacyMove( $this->filepath['plugins'][$plugin->id], $plugin->zip_name . '.zip', (int) $plugin->sales_server, $plugin->sales_server_protocol - ); + )) + { + $this->app->enqueueMessage( + JText::sprintf( + 'Upload of plugin (%s) zip file failed.', + $plugin->name + ), 'Error' + ); + } } } // Trigger Event: jcb_ce_onAfterZipPlugin diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index f31e63688..a7a9a4d88 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -1064,7 +1064,8 @@ class Interpretation extends Fields $addActive = true; if (CFactory::_('Component')->isArray('version_update')) { - foreach (CFactory::_('Component')->get('version_update') as $nr => &$update) + $updates = CFactory::_('Component')->get('version_update'); + foreach ($updates as $nr => &$update) { $this->setUpdateXMLSQL($update, $updateXML, $addDynamicSQL); @@ -1074,6 +1075,7 @@ class Interpretation extends Fields $addActive = false; } } + CFactory::_('Component')->set('version_update', $updates); } // add the dynamic sql if not already added if ($addDynamicSQL @@ -1094,7 +1096,7 @@ class Interpretation extends Fields $this->setDynamicUpdateXMLSQL($updateXML, $addActive); } // add the update server file - if (CFactory::_('Component')->get('add_update_server', 3) != 3) + if (CFactory::_('Component')->get('update_server_target', 3) != 3) { $updateXML[] = ''; // UPDATE_SERVER_XML @@ -15450,6 +15452,18 @@ class Interpretation extends Fields CFactory::_('Content')->set_('import_' . $nameListCode, 'VIEWS', 'IMPORT_' . CFactory::_('Placeholder')->get_h('VIEWS')); CFactory::_('Content')->set_('import_' . $nameListCode, 'Views', 'Import_' . CFactory::_('Placeholder')->get_h('views')); CFactory::_('Content')->set_('import_' . $nameListCode, 'views', 'import_' . CFactory::_('Placeholder')->get_h('views')); + + // IMPORT_CUSTOM_CONTROLLER_HEADER <<>> add the header details for the controller + CFactory::_('Content')->set_('import_' . $nameListCode, 'IMPORT_CUSTOM_CONTROLLER_HEADER', $this->setFileHeader( + 'import.custom.controller', + $nameListCode + )); + + // IMPORT_CUSTOM_MODEL_HEADER <<>> add the header details for the model + CFactory::_('Content')->set_('import_' . $nameListCode, 'IMPORT_CUSTOM_MODEL_HEADER', $this->setFileHeader( + 'import.custom.model', + $nameListCode + )); } public function setListQuery(&$nameSingleCode, &$nameListCode) @@ -22183,9 +22197,19 @@ class Interpretation extends Fields $headers[] = 'use Joomla\Utilities\ArrayHelper;'; break; case 'custom.admin.view.controller': + case 'import.custom.controller': + case 'import.controller': $headers[] = 'use Joomla\CMS\MVC\Controller\BaseController;'; $headers[] = 'use Joomla\Utilities\ArrayHelper;'; break; + case 'import.custom.model': + case 'import.model': + $headers[] = 'use Joomla\CMS\MVC\Model\BaseDatabaseModel;'; + $headers[] = 'use Joomla\CMS\Filesystem\File;'; + $headers[] = 'use Joomla\CMS\Filesystem\Folder;'; + $headers[] = 'use Joomla\Utilities\ArrayHelper;'; + $headers[] = 'use PhpOffice\PhpSpreadsheet\IOFactory;'; + break; case 'admin.views.controller': case 'custom.admin.views.controller': case 'dashboard.controller': diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 7f9321938..d5c8ebcb4 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -625,8 +625,7 @@ class Infusion extends Interpretation if (isset($view['port']) && $view['port'] || 1 == $view['settings']->add_custom_import) { - $this->eximportView[$nameListCode] - = true; + $this->eximportView[$nameListCode] = true; if (1 == $view['settings']->add_custom_import) { // this view has custom import scripting @@ -1382,6 +1381,14 @@ class Infusion extends Interpretation CFactory::_('Content')->set_('import', 'IMPORT_SAVE_METHOD', PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update_( ComponentbuilderHelper::getDynamicScripts('save') )); + // IMPORT_CONTROLLER_HEADER <<>> add the header details for the controller + CFactory::_('Content')->set_('import', 'IMPORT_CONTROLLER_HEADER', $this->setFileHeader( + 'import.controller', 'import' + )); + // IMPORT_MODEL_HEADER <<>> add the header details for the model + CFactory::_('Content')->set_('import', 'IMPORT_MODEL_HEADER', $this->setFileHeader( + 'import.model', 'import' + )); } // ensure that the ajax model and controller is set if needed @@ -1798,6 +1805,12 @@ class Infusion extends Interpretation CFactory::_('Content')->set('README', CFactory::_('Component')->get('readme')); } + // CHANGELOG + if (($changelog = CFactory::_('Component')->get('changelog')) !== null) + { + CFactory::_('Content')->set('CHANGELOG', $changelog); + } + // Infuse POWERS CFactory::_('Power.Infusion')->set(); diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index e2ebf971a..2725aa47a 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -5634,7 +5634,7 @@ COM_COMPONENTBUILDER_HTHREES_NAMESPACE_ERROR_SHTHREEPYOU_MUST_ATLEAST_HAVE_TWO_S COM_COMPONENTBUILDER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BCOMPONENTBUILDERB_WILL_NOT_FUNCTION_CORRECTLYP="

Curl Not Found!

Please setup curl on your system, or componentbuilder will not function correctly!

" COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BKEY_ERRORB_OR_BROKEN_PACKAGE="

Data is corrupt!

This could be due to key error, or broken package!" COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BROKEN_PACKAGE="

Data is corrupt!

This could be due to broken package!" -COM_COMPONENTBUILDER_HTWOWE_COULD_NOT_OPEN_THE_ENCRYPT_DATAHTWO_THIS_COULD_BE_DUE_TO_THE_FOFENCRYPTION_THAT_IS_NO_LONGER_SUPPORTED_IN_JOOMLABR_PLEASE_EXPORT_YOUR_PACKAGES_WITH_JCB_VTHREEZEROELEVENPRO_OR_VTWOONETWOSEVENTEENPUBLIC_OR_HIGHER_TO_BE_ABLE_TO_IMPORT_IT_INTO_THIS_VERSION_OF_JCB="

We could not open the encrypt data!

This could be due to the FOFEncryption that is no longer supported in Joomla.
Please export your packages with JCB v3.0.11(pro) or v2.12.17(public) or higher to be able to import it into this version of JCB." +COM_COMPONENTBUILDER_HTWOWE_COULD_NOT_OPEN_THE_ENCRYPT_DATAHTWO_THIS_COULD_BE_DUE_TO_THE_FOFENCRYPTION_THAT_IS_NO_LONGER_SUPPORTED_IN_JOOMLABR_PLEASE_EXPORT_YOUR_PACKAGES_WITH_JCB_VTHREEONEONENINE_OR_HIGHER_TO_BE_ABLE_TO_IMPORT_IT_INTO_THIS_VERSION_OF_JCB="

We could not open the encrypt data!

This could be due to the FOFEncryption that is no longer supported in Joomla.
Please export your packages with JCB v3.1.19 or higher to be able to import it into this version of JCB." COM_COMPONENTBUILDER_HTWOWE_COULD_NOT_OPEN_THE_PACKAGEHTWOTHIS_COULD_BE_DUE_TO_THE_FOFENCRYPTION_THAT_IS_NO_LONGER_SUPPORTED_IN_JOOMLA_PLEASE_EXPORT_YOUR_PACKAGES_WITH_JCB_VTHREEZEROELEVENPRO_OR_VTWOONETWOSEVENTEENPUBLIC_OR_HIGHER_TO_BE_ABLE_TO_IMPORT_IT_INTO_THIS_VERSION_OF_JCB="

We could not open the package!

This could be due to the FOFEncryption that is no longer supported in Joomla. Please export your packages with JCB v3.0.11(pro) or v2.12.17(public) or higher to be able to import it into this version of JCB." COM_COMPONENTBUILDER_IAUTHORI_BSB="Author: %s" COM_COMPONENTBUILDER_ICOMPANYI_BSB="Company: %s" @@ -9094,6 +9094,8 @@ COM_COMPONENTBUILDER_SORRY_THIS_PLACEHOLDER_IS_ALREADY_IN_USE_IN_THE_COMPILER="S COM_COMPONENTBUILDER_SORRY_THIS_VALIDATION_RULE_NAME_S_ALREADY_EXIST_AS_PART_OF_THE_JOOMLA_CORE_NO_NEED_TO_CREATE_IT_IF_YOU_ARE_ADAPTING_IT_GIVE_IT_YOUR_OWN_UNIQUE_NAME="Sorry this validation rule name (%s) already exist as part of the Joomla core! No need to create it, if you are adapting it give it your own unique name." COM_COMPONENTBUILDER_SORRY_THIS_VALIDATION_RULE_NAME_S_ALREADY_EXIST_IN_YOUR_SYSTEM="Sorry this validation rule name (%s) already exist in your system!" COM_COMPONENTBUILDER_SORTABLE="Sortable" +COM_COMPONENTBUILDER_SOURCE_CODE="source code" +COM_COMPONENTBUILDER_SOURCE_CODE_FOR_JOOMLA_COMPONENT="Source Code for Joomla Component" COM_COMPONENTBUILDER_START_A_SEARCH="Start a Search" COM_COMPONENTBUILDER_STOP_A_SEARCH="Stop a Search" COM_COMPONENTBUILDER_SUBMENU="Submenu" @@ -9126,7 +9128,6 @@ COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED="Success! The snippet was sav COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED_BUT_THE_MODIFIED_DATE_COULD_NOT_BE_ADJUSTED_BR_BR_BTHIS_MEANS_THE_SNIPPETS_WILL_CONTINUE_TO_APPEAR_OUT_OF_DATEB="Success! The snippet was saved. But the modified date could not be adjusted.

This means the snippets will continue to appear out of date." COM_COMPONENTBUILDER_SUPPORT_JCB_TODAY="Support JCB Today" COM_COMPONENTBUILDER_SUPPORT_JOOMLA_COMPONENT_BUILDER_JCB_WITH_A_BFINANCIAL_DONATIONB_TO_SHOW_GRATITUDE_FOR_THE_TIME_AND_EFFORT_SAVED_IN_YOUR_DEVELOPMENT_PROCESS_YOUR_CONTRIBUTION_NO_MATTER_THE_SIZE_WILL_BE_APPRECIATED_BY_THE_PROJECTS_TEAM_AND_THE_WIDER_COMMUNITY_HELP_ENSURE_THE_GROWTH_AND_RELEVANCE_OF_THIS_ESSENTIAL_TOOL="Support Joomla Component Builder (JCB) with a financial donation to show gratitude for the time and effort saved in your development process. Your contribution, no matter the size, will be appreciated by the project's team and the wider community. Help ensure the growth and relevance of this essential tool." -COM_COMPONENTBUILDER_SZDEQZDMVSMHBTRWFIFTYTSQFLVVXJTMTHREEJTWOIXM="%szdEQzdmVsMHBtRW50T%sQFlvVXJTM3J2IXM=" COM_COMPONENTBUILDER_SZIP_COULD_NOT_BE_INSTALLED="%s.zip could not be installed!" COM_COMPONENTBUILDER_SZIP_WAS_REMOVED_THE_FROM_TMP_FOLDER_DURING_INSTALLATION="%s.zip was removed the from tmp folder during installation!" COM_COMPONENTBUILDER_S_BEING_IMPORTED="%s Being Imported" @@ -9558,8 +9559,7 @@ COM_COMPONENTBUILDER_YES_UPDATE_ALL="Yes! Update ALL" COM_COMPONENTBUILDER_YOUR_ARE_ABOUT_TO_UPDATE_BALLB_VALUES_THAT_CAN_BE_FOUND_IN_THE_DATABASE="Your are about to update ALL values that can be found in the database." COM_COMPONENTBUILDER_YOUR_ARE_ABOUT_TO_UPDATE_ROW="Your are about to update row" COM_COMPONENTBUILDER_YOUR_COMPONENT_WILL_BE_COMPILED_TO_WORK_IN_JOOMLA_THREE="Your component will be compiled to work in Joomla 3" -COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY="Your data is encrypted with a AES 128 bit encryption using the above 32 character key." -COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY_UNLESS_THEY_HAVE_THIS_KEY_ABOVE_SO_DO_KEEP_IT_SAFE="Your data is encrypted with a AES 128 bit encryption using the above 32 character key. Without this key it will take the current technology with a brute force attack method more then 700 000 000 000 000 000 000 000 000 000 000 years to crack theoretically. Unless they have this key above, so do keep it safe." +COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_TWO_HUNDRED_AND_FIFTY_SIX_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY="Your data is encrypted with a AES 256 bit encryption using the above 32 character key." COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS="You are currently viewing the trashed items." COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT="You are currently viewing the trash area, and you don't have any items in trash at the moment!" COM_COMPONENTBUILDER_YOU_CAN_DIRECTLY_DOWNLOAD_THE_LATEST_UPDATE_OR_USE_THE_JOOMLA_UPDATE_AREA="You can directly download the latest update, or use the Joomla update area." diff --git a/admin/models/ajax.php b/admin/models/ajax.php index fba286871..5f53d5e5b 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -15,7 +15,12 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\MVC\Model\ListModel; use Joomla\Utilities\ArrayHelper; use VDM\Gitea\Gitea; +use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory; +use VDM\Joomla\Utilities\FileHelper; +use VDM\Joomla\Utilities\JsonHelper; +use VDM\Joomla\Utilities\StringHelper; use Joomla\Registry\Registry; +use Joomla\CMS\Language\Text; use VDM\Joomla\Componentbuilder\Search\Factory as SearchFactory; /** @@ -90,7 +95,7 @@ class ComponentbuilderModelAjax extends ListModel // set the url $url = "https://api.crowdin.com/api/project/$identifier/info?key=$key&json"; // get the details - if (($details = ComponentbuilderHelper::getFileContents($url, false)) !== false && ComponentbuilderHelper::checkJson($details)) + if (($details = FileHelper::getContent($url, false)) !== false && JsonHelper::check($details)) { $details = json_decode($details, true); // check if there is an error @@ -102,9 +107,9 @@ class ComponentbuilderModelAjax extends ListModel if (isset($details['details'])) { $html = '
'; - $html .= '

' . JText::_('COM_COMPONENTBUILDER_COMPONENT_SUCCESSFULLY_LINKED') . '

'; + $html .= '

' . Text::_('COM_COMPONENTBUILDER_COMPONENT_SUCCESSFULLY_LINKED') . '

'; $html .= '

' . $details['details']['name'] . '

'; - if (ComponentbuilderHelper::checkString($details['details']['description'])) + if (StringHelper::check($details['details']['description'])) { $html .= '

'; $html .= $details['details']['description']; @@ -128,7 +133,7 @@ class ComponentbuilderModelAjax extends ListModel $html .= ''; $html .= ''; $html .= '

'; - return array('html' => $html); + return ['html' => $html]; } } return false; @@ -153,7 +158,7 @@ class ComponentbuilderModelAjax extends ListModel $db->execute(); if ($db->loadRowList()) { - return array( 'html' => $this->componentDetailsDisplay($db->loadObject())); + return ['html' => $this->componentDetailsDisplay($db->loadObject())]; } return false; } @@ -166,47 +171,26 @@ class ComponentbuilderModelAjax extends ListModel // convert URL $url = base64_decode($package); $url = str_replace('.zip', '.info', $url); + // check if url exist - if ($info = ComponentbuilderHelper::getFileContents($url, false)) + if ($info = FileHelper::getContent($url, false)) { - // Get the encryption object. - $db = 'COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAESFLVVXJTMTHREEJTWOIXM'; - $password = base64_decode(JText::sprintf($db, 'QzdmV', '9kQ')); - // we first use the new encryption - // load phpseclib - $opened = false; - if(ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib\Crypt\Rijndael) + if ((($info_ = PackageFactory::_('Crypt')->decrypt($info, 'local')) !== null && JsonHelper::check($info_)) || + (($info_ = PackageFactory::_('Crypt')->decrypt($info, 'local.legacy')) !== null && JsonHelper::check($info_)) || + (($info_ = PackageFactory::_('Crypt')->decrypt($info, 'local.fof')) !== null && JsonHelper::check($info_))) { - // load the system password - ComponentbuilderHelper::crypt('AES', 'CBC')->setPassword($password, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt'); - // open the info block - $_info = ComponentbuilderHelper::crypt('AES', 'CBC')->decrypt(base64_decode($info)); - // check if we had success - if ($_info !== false) - { - $opened = true; - } - } - // check if we had success - if (!$opened && class_exists('FOFEncryptAes')) - { - $opener = new FOFEncryptAes($password, 128); - $_info = $opener->decryptString($info); - // check if we had success - if ($_info !== false) - { - $opened = true; - $_info = rtrim($_info, "\0"); - } - } - // check if we have json - if ($opened && ComponentbuilderHelper::checkJson($_info)) - { - $info = json_decode($_info, true); - return array('owner' => ComponentbuilderHelper::getPackageOwnerDetailsDisplay($info, true), 'packages' => ComponentbuilderHelper::getPackageComponentsDetailsDisplay($info)); + $info = json_decode($info_, true); + + return [ + 'owner' => PackageFactory::_('Display.Details')->owner($info, true), + 'packages' => PackageFactory::_('Display.Details')->components($info) + ]; } } - return array('error' => JText::_('COM_COMPONENTBUILDER_JCB_PACKAGE_INFO_PATH_DOES_NOT_WORK_WE_ADVICE_YOU_BNOT_TO_CONTINUEB_WITH_THE_IMPORT_OF_THE_SELECTED_PACKAGE')); + + return [ + 'error' => Text::_('COM_COMPONENTBUILDER_JCB_PACKAGE_INFO_PATH_DOES_NOT_WORK_WE_ADVICE_YOU_BNOT_TO_CONTINUEB_WITH_THE_IMPORT_OF_THE_SELECTED_PACKAGE') + ]; } /** @@ -215,29 +199,29 @@ class ComponentbuilderModelAjax extends ListModel protected function componentDetailsDisplay($object) { // set some vars - $image = (ComponentbuilderHelper::checkString($object->image)) ? 'Joomla Component Image': ''; - $desc = (ComponentbuilderHelper::checkString($object->description)) ? $object->description : $object->short_description; - $placeholder = ($object->add_placeholders == 1) ? ' ' . JText::_('COM_COMPONENTBUILDER_YES') . ' ' : ' ' .JText::_('COM_COMPONENTBUILDER_NO') . ' ' ; - $debug = ($object->debug_linenr == 1) ? ' ' .JText::_('COM_COMPONENTBUILDER_YES') . '' : ' ' .JText::_('COM_COMPONENTBUILDER_NO') . ' ' ; + $image = (StringHelper::check($object->image)) ? 'Joomla Component Image': ''; + $desc = (StringHelper::check($object->description)) ? $object->description : $object->short_description; + $placeholder = ($object->add_placeholders == 1) ? ' ' . Text::_('COM_COMPONENTBUILDER_YES') . ' ' : ' ' .Text::_('COM_COMPONENTBUILDER_NO') . ' ' ; + $debug = ($object->debug_linenr == 1) ? ' ' .Text::_('COM_COMPONENTBUILDER_YES') . '' : ' ' .Text::_('COM_COMPONENTBUILDER_NO') . ' ' ; $html = array(); $html[] = '

' . $object->name . ' (v' . $object->component_version . ')

'; $html[] = '

' . $desc . $image . '

'; $html[] = '
    '; - $html[] = '
  • ' . JText::_('COM_COMPONENTBUILDER_COMPANY') . ': ' . $object->companyname . '
  • '; - $html[] = '
  • ' . JText::_('COM_COMPONENTBUILDER_AUTHOR') . ': ' . $object->author . '
  • '; - $html[] = '
  • ' . JText::_('COM_COMPONENTBUILDER_EMAIL') . ': ' . $object->email . '
  • '; - $html[] = '
  • ' . JText::_('COM_COMPONENTBUILDER_WEBSITE') . ': ' . $object->website . '
  • '; + $html[] = '
  • ' . Text::_('COM_COMPONENTBUILDER_COMPANY') . ': ' . $object->companyname . '
  • '; + $html[] = '
  • ' . Text::_('COM_COMPONENTBUILDER_AUTHOR') . ': ' . $object->author . '
  • '; + $html[] = '
  • ' . Text::_('COM_COMPONENTBUILDER_EMAIL') . ': ' . $object->email . '
  • '; + $html[] = '
  • ' . Text::_('COM_COMPONENTBUILDER_WEBSITE') . ': ' . $object->website . '
  • '; $html[] = '
'; - $html[] = '

' . JText::_('COM_COMPONENTBUILDER_COMPONENT_GLOBAL_SETTINGS') . '

'; + $html[] = '

' . Text::_('COM_COMPONENTBUILDER_COMPONENT_GLOBAL_SETTINGS') . '

'; $html[] = '

'; - $html[] = JText::_('COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS') . '
' . $placeholder . '
'; - $html[] = JText::_('COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS') . '
' . $debug ; + $html[] = Text::_('COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS') . '
' . $placeholder . '
'; + $html[] = Text::_('COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS') . '
' . $debug ; $html[] = '

'; - $html[] = '

' . JText::_('COM_COMPONENTBUILDER_LICENSE') . '

'; + $html[] = '

' . Text::_('COM_COMPONENTBUILDER_LICENSE') . '

'; $html[] = '

' . $object->license . '

'; - $html[] = '

' . JText::_('COM_COMPONENTBUILDER_COPYRIGHT') . '

'; + $html[] = '

' . Text::_('COM_COMPONENTBUILDER_COPYRIGHT') . '

'; $html[] = '

' . $object->copyright . '

'; - $html[] = ' ' . JText::_('COM_COMPONENTBUILDER_EDIT') . ' ' .$object->system_name . '

'; + $html[] = ' ' . Text::_('COM_COMPONENTBUILDER_EDIT') . ' ' .$object->system_name . '

'; // now return the diplay return implode("\n", $html); } @@ -247,7 +231,7 @@ class ComponentbuilderModelAjax extends ListModel **/ public function getCronPath($type) { - $result = array('error' => '' . JText::_('COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED') . ''); + $result = array('error' => '' . Text::_('COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED') . ''); if ('backup' === $type) { $result['error'] = '' . JText::sprintf('COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S', $type) . ''; @@ -333,7 +317,7 @@ class ComponentbuilderModelAjax extends ListModel return ['error' => $message]; } - return ['error' => JText::_('COM_COMPONENTBUILDER_THE_WIKI_CAN_ONLY_BE_LOADED_WHEN_YOUR_JCB_SYSTEM_HAS_INTERNET_CONNECTION')]; + return ['error' => Text::_('COM_COMPONENTBUILDER_THE_WIKI_CAN_ONLY_BE_LOADED_WHEN_YOUR_JCB_SYSTEM_HAS_INTERNET_CONNECTION')]; } public function getVersion($version = null) @@ -377,7 +361,7 @@ class ComponentbuilderModelAjax extends ListModel // now check if this version is out dated if ($current_version === $local_version) { - return ['notice' => '' . JText::_('COM_COMPONENTBUILDER_UP_TO_DATE') . '']; + return ['notice' => '' . Text::_('COM_COMPONENTBUILDER_UP_TO_DATE') . '']; } else { @@ -388,15 +372,15 @@ class ComponentbuilderModelAjax extends ListModel ($local_array[0] == $current_array[0] && $local_array[1] > $current_array[1]) || ($local_array[0] == $current_array[0] && $local_array[1] == $current_array[1] && $local_array[2] > $current_array[2])) { - return ['notice' => '' . JText::_('COM_COMPONENTBUILDER_BETA_RELEASE') . '']; + return ['notice' => '' . Text::_('COM_COMPONENTBUILDER_BETA_RELEASE') . '']; } else { // download link of the latest version $download = "https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/" . $tags[0]->name . ".zip?access_token=" . $token; - return ['notice' => '' . JText::_('COM_COMPONENTBUILDER_OUT_OF_DATE') . '! ' . JText::_('COM_COMPONENTBUILDER_DOWNLOAD_UPDATE') . '!']; + return ['notice' => '' . Text::_('COM_COMPONENTBUILDER_OUT_OF_DATE') . '! ' . Text::_('COM_COMPONENTBUILDER_DOWNLOAD_UPDATE') . '!']; } } } @@ -416,11 +400,12 @@ class ComponentbuilderModelAjax extends ListModel if ($message) { - return ['error' => $a . $message . $a_ . JText::_('COM_COMPONENTBUILDER_GET_TOKEN') . $_a]; + return ['error' => $a . $message . $a_ . Text::_('COM_COMPONENTBUILDER_GET_TOKEN') . $_a]; } - return ['error' => $a . JText::_('COM_COMPONENTBUILDER_GET_TOKEN_FROM_VDM_TO_GET_UPDATE_NOTICE_AND_ADD_IT_TO_YOUR_GLOBAL_OPTIONS') . $a_ . JText::_('COM_COMPONENTBUILDER_GET_TOKEN') . $_a]; + return ['error' => $a . Text::_('COM_COMPONENTBUILDER_GET_TOKEN_FROM_VDM_TO_GET_UPDATE_NOTICE_AND_ADD_IT_TO_YOUR_GLOBAL_OPTIONS') . $a_ . Text::_('COM_COMPONENTBUILDER_GET_TOKEN') . $_a]; } + // Used in joomla_module diff --git a/admin/models/import.php b/admin/models/import.php index 659065710..457bf8f3e 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -18,7 +18,7 @@ use Joomla\CMS\Filesystem\Folder; use Joomla\Utilities\ArrayHelper; use PhpOffice\PhpSpreadsheet\IOFactory; -/** +/*** * Componentbuilder Import Base Database Model */ class ComponentbuilderModelImport extends BaseDatabaseModel diff --git a/admin/models/import_joomla_components.php b/admin/models/import_joomla_components.php index 3751471da..2e2fd33c3 100644 --- a/admin/models/import_joomla_components.php +++ b/admin/models/import_joomla_components.php @@ -17,6 +17,15 @@ use Joomla\CMS\Filesystem\File; use Joomla\CMS\Filesystem\Folder; use Joomla\Utilities\ArrayHelper; use PhpOffice\PhpSpreadsheet\IOFactory; +use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory; +use VDM\Joomla\Utilities\ArrayHelper as JCBArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\JsonHelper; +use VDM\Joomla\Utilities\FileHelper; +use VDM\Joomla\Utilities\GetHelper; +use VDM\Joomla\Utilities\GuidHelper; +use Joomla\CMS\Language\Text; /** * Componentbuilder Import_joomla_components Base Database Model @@ -163,7 +172,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // now clear it $session->clear('smart_package_info'); // convert to an array if found - if ($packageInfo && ComponentbuilderHelper::checkJson($packageInfo)) + if ($packageInfo && JsonHelper::check($packageInfo)) { $this->packageInfo = json_decode($packageInfo, true); } @@ -171,7 +180,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel default: $package = $session->get('package', null); - if (ComponentbuilderHelper::checkJson($package)) + if (JsonHelper::check($package)) { // get package $package = json_decode($package, true); @@ -215,7 +224,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel $this->remove($package['packagename']); } - $this->app->setUserState('com_componentbuilder.message', JText::_('COM_COMPONENTBUILDER_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE')); + $this->app->setUserState('com_componentbuilder.message', Text::_('COM_COMPONENTBUILDER_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE')); return false; } @@ -225,7 +234,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // check if this a smart package, if true then get info if ($this->dataType !== 'smart_package' || !$this->getInfo($package, $session)) { - $this->app->setUserState('com_componentbuilder.message', JText::_('COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO')); + $this->app->setUserState('com_componentbuilder.message', Text::_('COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO')); return false; } // set package to session @@ -251,7 +260,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel if (!$this->setData($package)) { // There was an error importing the package - $msg = JText::_('COM_COMPONENTBUILDER_IMPORT_ERROR'); + $msg = Text::_('COM_COMPONENTBUILDER_IMPORT_ERROR'); $msgType = 'error'; $back = $session->get('backto_VDM_IMPORT', NULL); if ($back) @@ -297,13 +306,13 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // does this package pass a checksum $checksum = false; $checksumStatus = 'warning'; - $checksumMessage = JText::_('COM_COMPONENTBUILDER_PLEASE_NOTE_THAT_THIS_PACKAGE_BHAS_NOB_CHECKSUM_VALIDATION'); + $checksumMessage = Text::_('COM_COMPONENTBUILDER_PLEASE_NOTE_THAT_THIS_PACKAGE_BHAS_NOB_CHECKSUM_VALIDATION'); // do hash validation here for git repos - if (ComponentbuilderHelper::checkString($this->checksum) && isset($this->checksumURLs[$this->checksum])) + if (StringHelper::check($this->checksum) && isset($this->checksumURLs[$this->checksum])) { // get packages checksums - $checksums = ComponentbuilderHelper::getFileContents($this->checksumURLs[$this->checksum].'checksum.json'); - if (ComponentbuilderHelper::checkJson($checksums)) + $checksums = FileHelper::getContent($this->checksumURLs[$this->checksum].'checksum.json'); + if (JsonHelper::check($checksums)) { // convert to array $checksums = json_decode($checksums, true); @@ -324,14 +333,14 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // set error if (!$checksum) { - $checksumMessage = JText::_('COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_YOU_CAN_REFRESH_AND_TRY_AGAINBR_BUT_NOTE_THAT_THIS_PACKAGE_BFAILEDB_CHECKSUM_VALIDATION_THIS_COULD_BE_A_SERIOUS_SECURITY_BREACH_DO_NOT_CONTINUE'); + $checksumMessage = Text::_('COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_YOU_CAN_REFRESH_AND_TRY_AGAINBR_BUT_NOTE_THAT_THIS_PACKAGE_BFAILEDB_CHECKSUM_VALIDATION_THIS_COULD_BE_A_SERIOUS_SECURITY_BREACH_DO_NOT_CONTINUE'); $checksumStatus = 'error'; } } // set error else { - $checksumMessage = JText::_('COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_WE_COULD_NOT_LOAD_THE_CHECKSUM_FOR_THIS_PACKAGE_AND_SO_NO_VALIDATION_WAS_POSSIBLE_THIS_MAY_BE_DUE_TO_YOUR_NETWORK_OR_A_CHANGE_TO_THAT_PACKAGE_NAME'); + $checksumMessage = Text::_('COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_WE_COULD_NOT_LOAD_THE_CHECKSUM_FOR_THIS_PACKAGE_AND_SO_NO_VALIDATION_WAS_POSSIBLE_THIS_MAY_BE_DUE_TO_YOUR_NETWORK_OR_A_CHANGE_TO_THAT_PACKAGE_NAME'); $checksumStatus = 'error'; } } @@ -350,18 +359,17 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // load the data if ($info = @file_get_contents($infoFile)) { - // Get the password. - $db = 'COM_COMPONENTBUILDER_SZDEQZDMVSMHBTRWFIFTYTSQFLVVXJTMTHREEJTWOIXM'; - $password = base64_decode(JText::sprintf($db, 'VjR', 'WV0aE9k')); // unlock the info data - if (($info = $this->decrypt($info, $password, true)) !== false && ComponentbuilderHelper::checkJson($info)) + if ((($info_ = PackageFactory::_('Crypt')->decrypt($info, 'local')) !== null && JsonHelper::check($info_)) || + (($info_ = PackageFactory::_('Crypt')->decrypt($info, 'local.legacy')) !== null && JsonHelper::check($info_)) || + (($info_ = PackageFactory::_('Crypt')->decrypt($info, 'local.fof')) !== null && JsonHelper::check($info_))) { // we only continue if info could be opened - $session->set('smart_package_info', $info); + $session->set('smart_package_info', $info_); return true; } // do not have check sum validation - $this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTWOWE_COULD_NOT_OPEN_THE_PACKAGEHTWOTHIS_COULD_BE_DUE_TO_THE_FOFENCRYPTION_THAT_IS_NO_LONGER_SUPPORTED_IN_JOOMLA_PLEASE_EXPORT_YOUR_PACKAGES_WITH_JCB_VTHREEZEROELEVENPRO_OR_VTWOONETWOSEVENTEENPUBLIC_OR_HIGHER_TO_BE_ABLE_TO_IMPORT_IT_INTO_THIS_VERSION_OF_JCB'), 'error'); + $this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_HTWOWE_COULD_NOT_OPEN_THE_PACKAGEHTWOTHIS_COULD_BE_DUE_TO_THE_FOFENCRYPTION_THAT_IS_NO_LONGER_SUPPORTED_IN_JOOMLA_PLEASE_EXPORT_YOUR_PACKAGES_WITH_JCB_VTHREEZEROELEVENPRO_OR_VTWOONETWOSEVENTEENPUBLIC_OR_HIGHER_TO_BE_ABLE_TO_IMPORT_IT_INTO_THIS_VERSION_OF_JCB'), 'error'); } } ComponentbuilderHelper::removeFolder($this->dir); @@ -641,7 +649,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // prep the data if ($this->extractData($data)) { - if (isset($this->data['joomla_component']) && ComponentbuilderHelper::checkArray($this->data['joomla_component'])) + if (isset($this->data['joomla_component']) && JCBArrayHelper::check($this->data['joomla_component'])) { // save the smart data if ($this->saveSmartComponents()) @@ -675,16 +683,16 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel { // final check if we have success $data = @unserialize($data); - if (ComponentbuilderHelper::checkArray($data)) + if (JCBArrayHelper::check($data)) { // set the data global $this->data = $data; return true; } - $this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BKEY_ERRORB_OR_BROKEN_PACKAGE'), 'error'); + $this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BKEY_ERRORB_OR_BROKEN_PACKAGE'), 'error'); return false; } - $this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BROKEN_PACKAGE'), 'error'); + $this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BROKEN_PACKAGE'), 'error'); return false; } @@ -704,7 +712,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel if (!$this->canmerge) { // set some postfix - $this->postfix = ' ('.ComponentbuilderHelper::randomkey(2).')'; + $this->postfix = ' ('.StringHelper::random(2).')'; } // the array of tables to store $tables = array( @@ -738,11 +746,11 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // check if it is the power table if ($table === 'power') { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_TABLE_BSB_NOT_FOUND_IN_THE_LOCAL_DATABASE_SO_ITS_VALUES_COULD_NOT_BE_IMPORTED_THE_WHOLE_POWERS_FEATURE_IS_ONLY_AVAILABLE_TO_A_HREFSPRO_MEMBERSA_AT_THIS_TIME', '#__componentbuilder_' . $table, '"https://vdm.bz/get-jcb-pro-membership" target="_blank" title="Join PRO Membership today!"'), 'warning'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_TABLE_BSB_NOT_FOUND_IN_THE_LOCAL_DATABASE_SO_ITS_VALUES_COULD_NOT_BE_IMPORTED_THE_WHOLE_POWERS_FEATURE_IS_ONLY_AVAILABLE_TO_A_HREFSPRO_MEMBERSA_AT_THIS_TIME', '#__componentbuilder_' . $table, '"https://vdm.bz/get-jcb-pro-membership" target="_blank" title="Join PRO Membership today!"'), 'warning'); } else { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_TABLE_BSB_NOT_FOUND_IN_THE_LOCAL_DATABASE_SO_ITS_VALUES_COULD_NOT_BE_IMPORTED_PLEASE_UPDATE_YOUR_JCB_INSTALL_AND_TRY_AGAIN', '#__componentbuilder_' . $table), 'warning'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_TABLE_BSB_NOT_FOUND_IN_THE_LOCAL_DATABASE_SO_ITS_VALUES_COULD_NOT_BE_IMPORTED_PLEASE_UPDATE_YOUR_JCB_INSTALL_AND_TRY_AGAIN', '#__componentbuilder_' . $table), 'warning'); } } } @@ -768,7 +776,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel **/ public function saveSmartItems($table) { - if (isset($this->data[$table]) && ComponentbuilderHelper::checkArray($this->data[$table])) + if (isset($this->data[$table]) && JCBArrayHelper::check($this->data[$table])) { // add pre import event $this->preImportEvent($table); @@ -793,7 +801,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // display more import info if ($this->moreInfo) { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSB_WAS_FOUND', $table.' id:'.$oldID . '->' . $local->id), 'success'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_BSB_WAS_FOUND', $table.' id:'.$oldID . '->' . $local->id), 'success'); } $dbDate = strtotime($item->modified); $localDate = strtotime($local->modified); @@ -818,7 +826,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // display more import info if ($this->moreInfo) { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED', $table.' id:'.$oldID . '->' . $id), 'success'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED', $table.' id:'.$oldID . '->' . $id), 'success'); } } else @@ -826,9 +834,9 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel $notice = '!'; if (!$canEdit) { - $notice = JText::sprintf("COM_COMPONENTBUILDER__SINCE_YOU_DONT_HAVE_PERMISSION_TO_EDIT_S", $table); + $notice = Text::sprintf("COM_COMPONENTBUILDER__SINCE_YOU_DONT_HAVE_PERMISSION_TO_EDIT_S", $table); } - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS', $table.' id:'.$oldID, $notice), 'error'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS', $table.' id:'.$oldID, $notice), 'error'); } } // insure to load the local ID to link imported values with it @@ -844,7 +852,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // display more import info if ($this->moreInfo) { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED', $table.' id:'.$oldID . '->' . $id), 'success'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED', $table.' id:'.$oldID . '->' . $id), 'success'); } } else @@ -852,9 +860,9 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel $notice = '!'; if (!$canCreate) { - $notice = JText::sprintf("COM_COMPONENTBUILDER__SINCE_YOU_DONT_HAVE_PERMISSION_TO_CREATE_S", $table); + $notice = Text::sprintf("COM_COMPONENTBUILDER__SINCE_YOU_DONT_HAVE_PERMISSION_TO_CREATE_S", $table); } - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS', $table.' id:'.$oldID, $notice), 'error'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS', $table.' id:'.$oldID, $notice), 'error'); } } } @@ -873,7 +881,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // remove all custom code linked to these components // since some code may have been removed and changed // best unpublish all and let the import publish those still active - if ('custom_code' === $table && isset($this->newID['joomla_component']) && ComponentbuilderHelper::checkArray($this->newID['joomla_component'])) + if ('custom_code' === $table && isset($this->newID['joomla_component']) && JCBArrayHelper::check($this->newID['joomla_component'])) { $query = $this->_db->getQuery(true); // Field to update. @@ -937,7 +945,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // display more import info elseif ($this->moreInfo) { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_SOME_BCUSTOM_FILESB_WERE_MOVED_TO_BSB', $customPath), 'success'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_SOME_BCUSTOM_FILESB_WERE_MOVED_TO_BSB', $customPath), 'success'); } } // check if we have images @@ -953,7 +961,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // display more import info elseif ($this->moreInfo) { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_SOME_BIMAGESB_WERE_MOVED_TO_BSB', $imagesPath), 'success'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_SOME_BIMAGESB_WERE_MOVED_TO_BSB', $imagesPath), 'success'); } } // now move the dynamic files if found @@ -963,7 +971,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // get a list of folders $folders = JFolder::folders($dynamicDir); // check if we have files - if(ComponentbuilderHelper::checkArray($folders)) + if(JCBArrayHelper::check($folders)) { foreach ($folders as $folder) { @@ -971,20 +979,20 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel $fullPath = str_replace('//', '/', $dynamicDir . '/' . $folder); if (!JFolder::exists($fullPath) || !JFolder::copy($fullPath, $destination,'',true)) { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB', $folder, $destination), 'error'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB', $folder, $destination), 'error'); $success = false; } // display more import info elseif ($this->moreInfo) { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_MOVED_TO_BSB', $folder, $destination), 'success'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_MOVED_TO_BSB', $folder, $destination), 'success'); } } } // get a list of files $files = JFolder::files($dynamicDir); // check if we have files - if(ComponentbuilderHelper::checkArray($files)) + if(JCBArrayHelper::check($files)) { foreach ($files as $file) { @@ -992,13 +1000,13 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel $fullPath = str_replace('//', '/', $dynamicDir . '/' . $file); if (!JFile::exists($fullPath) || !JFile::copy($fullPath, $destination)) { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVED_TO_BSB', $file, $destination), 'error'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVED_TO_BSB', $file, $destination), 'error'); $success = false; } // display more import info elseif ($this->moreInfo) { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_MOVED_TO_BSB', $file, $destination), 'success'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_MOVED_TO_BSB', $file, $destination), 'success'); } } } @@ -1014,7 +1022,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel protected function unLockFiles() { // lock the data if set - if(ComponentbuilderHelper::checkString($this->sleutle) && strlen($this->sleutle) == 32) + if(StringHelper::check($this->sleutle) && strlen($this->sleutle) == 32) { // we must first store the current working directory $joomla = getcwd(); @@ -1053,21 +1061,21 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel if (($data = $this->decrypt(file_get_contents($file), $this->sleutle)) !== false) { // write the decrypted data back to file - if (!ComponentbuilderHelper::writeFile($file, $data)) + if (!FileHelper::write($file, $data)) { // in case file could not be unlocked - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_COULD_NOT_BE_UNLOCKED', $file), 'error'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FILE_BSB_COULD_NOT_BE_UNLOCKED', $file), 'error'); } // display more import info elseif ($this->moreInfo) { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_SUCCESSFULLY_UNLOCKED', $file), 'success'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_SUCCESSFULLY_UNLOCKED', $file), 'success'); } } else { // in case file could not be unlocked - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_COULD_NOT_BE_UNLOCKED', $file), 'error'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FILE_BSB_COULD_NOT_BE_UNLOCKED', $file), 'error'); } } } @@ -1075,9 +1083,9 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel /** * decrypt data * - * @param string $data The data string - * @param string $password The key to unlock - * @param bool $force Should we force phpseclib decryption + * @param string $data The data string + * @param string $password The key to unlock + * @param bool $force Should we force phpseclib decryption * * @return mixed the data, or false * @@ -1086,57 +1094,143 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel protected function decrypt(string $data, string $password, bool $force = false) { // remove all line breaks - $data = str_replace("\n", '', $data); + $data = $this->removeLineBreaks($data); + // make sure we have base64 - if ($data === base64_encode(base64_decode($data, true))) + if ($this->isBase64Encoded($data)) { // open the data - if(ComponentbuilderHelper::checkString($password) && strlen($password) == 32) + if($this->isValidPassword($password)) { - // check if we should use the phpseclib decryption - $phpseclip = (isset($this->packageInfo['phpseclib']) && $this->packageInfo['phpseclib']) ? true : $force; - // load phpseclib - if($phpseclip && ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib\Crypt\Rijndael) + // try phpseclib version 3 + if(($this->isPhpseclib3Enabled() || $force) && + ($data_ = $this->decryptWithPhpseclib3($data, $password)) !== false) { - // load the system password - ComponentbuilderHelper::crypt('AES', 'CBC')->setPassword($password, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt'); - // open the data block - $data = ComponentbuilderHelper::crypt('AES', 'CBC')->decrypt(base64_decode($data)); - // check if we had success - if ($data !== false) - { - return $data; - } + return $data_; } - // check if we had success - if (class_exists('FOFEncryptAes')) + + // try phpseclib version 2 + if(($this->isPhpseclib2Enabled() || $force) && + ($data_ = $this->decryptWithPhpseclib2($data, $password)) !== false) { - // Get the encryption object. - if (!$this->noopmaker instanceof FOFEncryptAes) - { - $this->noopmaker = new FOFEncryptAes($password, 128); - } - // open the data block - $data = $this->noopmaker->decryptString($data); - // check if we had success - if ($data !== false) - { - return $data; - } - else - { - $this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTWOWE_COULD_NOT_OPEN_THE_ENCRYPT_DATAHTWO_THIS_COULD_BE_DUE_TO_THE_FOFENCRYPTION_THAT_IS_NO_LONGER_SUPPORTED_IN_JOOMLABR_PLEASE_EXPORT_YOUR_PACKAGES_WITH_JCB_VTHREEZEROELEVENPRO_OR_VTWOONETWOSEVENTEENPUBLIC_OR_HIGHER_TO_BE_ABLE_TO_IMPORT_IT_INTO_THIS_VERSION_OF_JCB'), 'error'); - } + return $data_; } + + // try FOF the outdated method + if (($data_ = $this->decryptWithFof($data, $password)) !== false) + { + return $data_; + } + + $this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_HTWOWE_COULD_NOT_OPEN_THE_ENCRYPT_DATAHTWO_THIS_COULD_BE_DUE_TO_THE_FOFENCRYPTION_THAT_IS_NO_LONGER_SUPPORTED_IN_JOOMLABR_PLEASE_EXPORT_YOUR_PACKAGES_WITH_JCB_VTHREEONEONENINE_OR_HIGHER_TO_BE_ABLE_TO_IMPORT_IT_INTO_THIS_VERSION_OF_JCB'), 'error'); } else { return base64_decode($data); } } + return false; } + /** + * Removes all line breaks from a string + * + * @param string $data + * + * @return string + */ + private function removeLineBreaks(string $data): string + { + return str_replace("\n", '', $data); + } + + /** + * Check if the data is base64 encoded + * + * @param string $data + * + * @return bool + */ + private function isBase64Encoded(string $data): bool + { + return $data === base64_encode(base64_decode($data, true)); + } + + /** + * Check if a password is set and has a length of 32 characters + * + * @param string $password + * + * @return bool + */ + private function isValidPassword(string $password): bool + { + return StringHelper::check($password) && strlen($password) == 32; + } + + /** + * Check if we can use phpseclib library version 2 + * + * @return bool + */ + private function isPhpseclib2Enabled(): bool + { + return (bool) isset($this->packageInfo['phpseclib']) && $this->packageInfo['phpseclib']; + } + + /** + * Decrypts data using the phpseclib library version 2 + * + * @param string $data + * @param string $password + * + * @return string|bool + */ + private function decryptWithPhpseclib2(string $data, string $password) + { + $data_ = PackageFactory::_('Crypt')->decrypt($data, 'legacy', $password); + return strcmp($data, $data_) !== 0 ? $data_ : false; + } + + /** + * Check if we can use phpseclib library version 3 + * + * @return bool + */ + private function isPhpseclib3Enabled(): bool + { + return (bool) isset($this->packageInfo['phpseclib3']) && $this->packageInfo['phpseclib3']; + } + + /** + * Decrypts data using the phpseclib library version 3 + * + * @param string $data + * @param string $password + * + * @return string|bool + */ + private function decryptWithPhpseclib3(string $data, string $password) + { + $data_ = PackageFactory::_('Crypt')->decrypt($data, 'aes', $password); + return strcmp($data, $data_) !== 0 ? $data_ : false; + } + + /** + * Decrypts data using the FOF library (outdated method) + * + * @param string $data + * @param string $password + * + * @return string|bool + */ + private function decryptWithFof(string $data, string $password) + { + $data_ = PackageFactory::_('Crypt')->decrypt($data, 'fof', $password); + return strcmp($data, $data_) !== 0 ? $data_ : false; + } + /** * Update some items after all * @@ -1146,7 +1240,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel public function updateAfterAll() { // update the fields - if (isset($this->updateAfter['field']) && ComponentbuilderHelper::checkArray($this->updateAfter['field'])) + if (isset($this->updateAfter['field']) && JCBArrayHelper::check($this->updateAfter['field'])) { // update repeatable foreach ($this->updateAfter['field'] as $field => $action) @@ -1157,12 +1251,12 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel $field = $this->newID['field'][$field]; } // get the field from db - if ($xml = ComponentbuilderHelper::getVar('field', $field, 'id', 'xml')) + if ($xml = GetHelper::var('field', $field, 'id', 'xml')) { - if (ComponentbuilderHelper::checkJson($xml)) + if (JsonHelper::check($xml)) { $xml = json_decode($xml); - $fields = ComponentbuilderHelper::getBetween($xml, 'fields="', '"'); + $fields = GetHelper::between($xml, 'fields="', '"'); $fieldsSets = array(); if (strpos($fields, ',') !== false) { @@ -1175,7 +1269,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel $fieldsSets[] = (int) $fields; } // update the fields - if (ComponentbuilderHelper::checkArray($fieldsSets)) + if (JCBArrayHelper::check($fieldsSets)) { $bucket = array(); foreach ($fieldsSets as $id) @@ -1186,10 +1280,10 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } else { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BMULTIPLE_FIELD_REPEATABLE_MODEB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_EMREMOVEDEM_FROM_THE_FIELD', $id, $field), 'warning'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_BMULTIPLE_FIELD_REPEATABLE_MODEB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_EMREMOVEDEM_FROM_THE_FIELD', $id, $field), 'warning'); } } - if (ComponentbuilderHelper::checkArray($bucket)) + if (JCBArrayHelper::check($bucket)) { $string = implode(',', $bucket); $xml = json_encode(str_replace('fields="' . $fields . '"', 'fields="' . $string . '"', $xml)); @@ -1209,7 +1303,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } } // do a after all run on admin views that need it - if (isset($this->updateAfter['adminview']) && ComponentbuilderHelper::checkArray($this->updateAfter['adminview'])) + if (isset($this->updateAfter['adminview']) && JCBArrayHelper::check($this->updateAfter['adminview'])) { // update the addlinked_views foreach ($this->updateAfter['adminview'] as $adminview => $action) @@ -1220,18 +1314,18 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel $adminview = $this->newID['admin_view'][(int) $adminview]; } // get the field from db - if ($addlinked_views = ComponentbuilderHelper::getVar('admin_view', $adminview, 'id', 'addlinked_views')) + if ($addlinked_views = GetHelper::var('admin_view', $adminview, 'id', 'addlinked_views')) { - if (ComponentbuilderHelper::checkJson($addlinked_views)) + if (JsonHelper::check($addlinked_views)) { $addlinked_views = json_decode($addlinked_views, true); // convert Repeatable Fields - if (ComponentbuilderHelper::checkArray($addlinked_views) && isset($addlinked_views['adminview'])) + if (JCBArrayHelper::check($addlinked_views) && isset($addlinked_views['adminview'])) { $addlinked_views = ComponentbuilderHelper::convertRepeatable($addlinked_views, 'addlinked_views'); } // update the view IDs - if (ComponentbuilderHelper::checkArray($addlinked_views)) + if (JCBArrayHelper::check($addlinked_views)) { // only update the view IDs $addlinked_views = $this->updateIDs($addlinked_views, 'admin_view', array('adminview' => 'admin_view')); @@ -1247,7 +1341,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } } // update the joomla_component dashboard - if (isset($this->updateAfter['joomla_component']) && ComponentbuilderHelper::checkArray($this->updateAfter['joomla_component'])) + if (isset($this->updateAfter['joomla_component']) && JCBArrayHelper::check($this->updateAfter['joomla_component'])) { // update dashboard of the components foreach ($this->updateAfter['joomla_component'] as $component => $action) @@ -1258,9 +1352,9 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel $component = $this->newID['joomla_component'][(int) $component]; } // get the dashboard from db - if ($dashboard = ComponentbuilderHelper::getVar('joomla_component', $component, 'id', 'dashboard')) + if ($dashboard = GetHelper::var('joomla_component', $component, 'id', 'dashboard')) { - if (ComponentbuilderHelper::checkString($dashboard)) + if (StringHelper::check($dashboard)) { // get id $id = (int) preg_replace("/[^0-9]/", "", $dashboard); @@ -1297,7 +1391,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } } // update the admin_fields_relations - if (isset($this->updateAfter['relations']) && ComponentbuilderHelper::checkArray($this->updateAfter['relations'])) + if (isset($this->updateAfter['relations']) && JCBArrayHelper::check($this->updateAfter['relations'])) { // update repeatable foreach ($this->updateAfter['relations'] as $relation => $action) @@ -1310,38 +1404,38 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel $relation = $this->newID['admin_fields_relations'][$relation]; } // get the set relation from db - if ($addrelations = ComponentbuilderHelper::getVar('admin_fields_relations', $relation, 'id', 'addrelations')) + if ($addrelations = GetHelper::var('admin_fields_relations', $relation, 'id', 'addrelations')) { - if (ComponentbuilderHelper::checkJson($addrelations)) + if (JsonHelper::check($addrelations)) { $addrelations = json_decode($addrelations, true); - if (ComponentbuilderHelper::checkArray($addrelations)) + if (JCBArrayHelper::check($addrelations)) { foreach ($addrelations as $nr => &$value) { // reset the buckets $bucket = array(); // get fields - $found = ComponentbuilderHelper::getAllBetween($value['set'], '[field=', ']'); + $found = GetHelper::allBetween($value['set'], '[field=', ']'); // if found - if (ComponentbuilderHelper::checkArray($found)) + if (JCBArrayHelper::check($found)) { $bucket[] = $found; } // get fields - $found = ComponentbuilderHelper::getAllBetween($value['set'], '$item->{', '}'); + $found = GetHelper::allBetween($value['set'], '$item->{', '}'); // if found - if (ComponentbuilderHelper::checkArray($found)) + if (JCBArrayHelper::check($found)) { $bucket[] = $found; } // check if we have values - if (ComponentbuilderHelper::checkArray($bucket)) + if (JCBArrayHelper::check($bucket)) { - $fields = ComponentbuilderHelper::mergeArrays($bucket); + $fields = JCBArrayHelper::merge($bucket); // reset the buckets $bucket = array(); - if (ComponentbuilderHelper::checkArray($fields)) + if (JCBArrayHelper::check($fields)) { foreach ($fields as $field) { @@ -1352,11 +1446,11 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } else { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BADMIN_FIELDS_RELATIONSB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_NOT_UPDATED_IN_THE_CUSTOM_CODE', $relation, $field), 'warning'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_BADMIN_FIELDS_RELATIONSB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_NOT_UPDATED_IN_THE_CUSTOM_CODE', $relation, $field), 'warning'); } } // check if we have a bucket of values to update - if (ComponentbuilderHelper::checkArray($bucket)) + if (JCBArrayHelper::check($bucket)) { $value['set'] = str_replace(array_keys($bucket), array_values($bucket), $value['set']); $update = true; @@ -1379,7 +1473,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } } // update the verious power linked to these powers - if (isset($this->updateAfter['power']) && ComponentbuilderHelper::checkArray($this->updateAfter['power'])) + if (isset($this->updateAfter['power']) && JCBArrayHelper::check($this->updateAfter['power'])) { // update repeatable foreach ($this->updateAfter['power'] as $power => $action) @@ -1426,7 +1520,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel public function moveDivergedData() { // check if there is data to move - if (ComponentbuilderHelper::checkArray($this->divergedDataMover)) + if (JCBArrayHelper::check($this->divergedDataMover)) { foreach($this->divergedDataMover as $table => $values) { @@ -1452,13 +1546,13 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * * @return void */ - protected function updateParamIDs(&$item, $table, $targets) + private function updateParamIDs(&$item, $table, $targets) { // update the params fields if exist - if (isset($item->params) && ComponentbuilderHelper::checkJson($item->params)) + if (isset($item->params) && JsonHelper::check($item->params)) { $paramsArray = json_decode($item->params, true); - if (ComponentbuilderHelper::checkArray($paramsArray)) + if (JCBArrayHelper::check($paramsArray)) { foreach ($targets as $field => $targetArray) { @@ -1481,7 +1575,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } } // check if we had some subforms - if (ComponentbuilderHelper::checkArray($target_array)) + if (JCBArrayHelper::check($target_array)) { $paramsArray[$field] = $this->updateIDs($paramsArray[$field], $table, $target_array); } @@ -1502,15 +1596,15 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * * @return void */ - protected function updateSubformsIDs(&$item, $table, $targets) + private function updateSubformsIDs(&$item, $table, $targets) { // update the repeatable fields foreach ($targets as $field => $targetArray) { - if (isset($item->{$field}) && ComponentbuilderHelper::checkJson($item->{$field})) + if (isset($item->{$field}) && JsonHelper::check($item->{$field})) { $updateArray = json_decode($item->{$field}, true); - if (ComponentbuilderHelper::checkArray($updateArray)) + if (JCBArrayHelper::check($updateArray)) { // load it back $item->{$field} = json_encode($this->updateIDs($updateArray, $table, $targetArray), JSON_FORCE_OBJECT); @@ -1522,22 +1616,22 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel /** * Update IDs * - * @param array $values The values to update the IDs in - * @param string $table The table these values belong to - * @param array $targets The target to update and its type + * @param array $values The values to update the IDs in + * @param string $table The table these values belong to + * @param array $targets The target to update and its type * * @return void */ - protected function updateIDs($values, $table, $targets) + private function updateIDs($values, $table, $targets) { $isJson = false; - if (ComponentbuilderHelper::checkJson($values)) + if (JsonHelper::check($values)) { $values = json_decode($values, true); $isJson = true; } // now update the fields - if (ComponentbuilderHelper::checkArray($values)) + if (JCBArrayHelper::check($values)) { foreach ($values as $nr => &$value) { @@ -1568,27 +1662,27 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * @return boolean True on success * */ - protected function setNewID($item, $target, $type, $table) + private function setNewID($item, $target, $type, $table) { $isJson = false; - if (ComponentbuilderHelper::checkJson($item)) + if (JsonHelper::check($item)) { $item = json_decode($item, true); $isJson = true; } - if (ComponentbuilderHelper::checkArray($item) && isset($item[$target])) + if (JCBArrayHelper::check($item) && isset($item[$target])) { // set item ID $itemId = (isset($item['id'])) ? $item['id'] : 'id_unknow'; // check if it is json $isJsonTarget = false; - if (ComponentbuilderHelper::checkJson($item[$target])) + if (JsonHelper::check($item[$target])) { $item[$target] = json_decode($item[$target], true); $isJsonTarget = true; } // update the target - if (ComponentbuilderHelper::checkString($item[$target]) || is_numeric($item[$target])) + if (StringHelper::check($item[$target]) || is_numeric($item[$target])) { if ($item[$target] <= 0) { @@ -1607,7 +1701,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel $item[$target] = ''; } } - elseif (ComponentbuilderHelper::checkArray($item[$target])) + elseif (JCBArrayHelper::check($item[$target])) { // the bucket to load the items back $bucket = array(); @@ -1622,7 +1716,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // we add negative numbers back $bucket[] = $id; } - elseif ((ComponentbuilderHelper::checkString($id) || is_numeric($id)) && isset($this->newID[$type][(int) $id])) + elseif ((StringHelper::check($id) || is_numeric($id)) && isset($this->newID[$type][(int) $id])) { $bucket[] = $this->newID[$type][(int) $id]; } @@ -1632,7 +1726,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } } // set ids back - if (ComponentbuilderHelper::checkArray($bucket)) + if (JCBArrayHelper::check($bucket)) { $item[$target] = $bucket; } @@ -1643,19 +1737,19 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel $item[$target] = json_encode($item[$target], JSON_FORCE_OBJECT); } } - elseif (ComponentbuilderHelper::checkObject($item) && isset($item->{$target})) + elseif (ObjectHelper::check($item) && isset($item->{$target})) { // set item ID $itemId = (isset($item->id)) ? $item->id : 'id_unknow'; // check if it is json $isJsonTarget = false; - if (ComponentbuilderHelper::checkJson($item->{$target})) + if (JsonHelper::check($item->{$target})) { $item->{$target} = json_decode($item->{$target}, true); $isJsonTarget = true; } // update the target - if (ComponentbuilderHelper::checkString($item->{$target}) || is_numeric($item->{$target})) + if (StringHelper::check($item->{$target}) || is_numeric($item->{$target})) { if ($item->{$target} <= 0) { @@ -1674,7 +1768,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel $item->{$target} = ''; } } - elseif (ComponentbuilderHelper::checkArray($item->{$target})) + elseif (JCBArrayHelper::check($item->{$target})) { // the bucket to load the items back $bucket = array(); @@ -1689,7 +1783,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // we add negative numbers back $bucket[] = $id; } - elseif ((ComponentbuilderHelper::checkString($id) || is_numeric($id)) && isset($this->newID[$type][(int) $id])) + elseif ((StringHelper::check($id) || is_numeric($id)) && isset($this->newID[$type][(int) $id])) { $bucket[] = $this->newID[$type][(int) $id]; } @@ -1700,7 +1794,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } } // set ids back - if (ComponentbuilderHelper::checkArray($bucket)) + if (JCBArrayHelper::check($bucket)) { $item->{$target} = $bucket; } @@ -1731,9 +1825,9 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * @return void * */ - protected function enqueueIdMismatchMessage($id, $itemId, $target, $type, $table) + private function enqueueIdMismatchMessage($id, $itemId, $target, $type, $table) { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSBS_IN_BSB_HAS_ID_MISMATCH_SO_THE_BSB_WAS_REMOVED', ComponentbuilderHelper::safeString($type, 'Ww'), ComponentbuilderHelper::safeString($target, 'Ww') , ComponentbuilderHelper::safeString($table, 'w').':'.$itemId, $type . ':' . $id), 'warning'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_BSBS_IN_BSB_HAS_ID_MISMATCH_SO_THE_BSB_WAS_REMOVED', StringHelper::safe($type, 'Ww'), StringHelper::safe($target, 'Ww') , StringHelper::safe($table, 'w').':'.$itemId, $type . ':' . $id), 'warning'); } /** @@ -1748,7 +1842,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * object on success * **/ - protected function prepItem($item, $type, $action, $diverged = false) + private function prepItem($item, $type, $action, $diverged = false) { // remove access if (isset($item->access)) @@ -1813,12 +1907,12 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } elseif (!is_numeric($item->fieldtype) || $item->fieldtype == 0) { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BFIELD_TYPEB_NOT_SET_FOR_BSB', ComponentbuilderHelper::safeString($type, 'w').':'.$item->id), 'warning'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_BFIELD_TYPEB_NOT_SET_FOR_BSB', StringHelper::safe($type, 'w').':'.$item->id), 'warning'); unset($item->fieldtype); } else { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BFIELD_TYPEB_IDS_MISMATCH_IN_BSB', $item->fieldtype, ComponentbuilderHelper::safeString($type, 'w').':'.$item->id), 'error'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_BFIELD_TYPEB_IDS_MISMATCH_IN_BSB', $item->fieldtype, StringHelper::safe($type, 'w').':'.$item->id), 'error'); return false; } // if we can't merge add postfix to name @@ -1906,7 +2000,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel unset($item->addtables); } // update the addfields (old dataset) - if (isset($item->addfields) && ComponentbuilderHelper::checkJson($item->addfields)) + if (isset($item->addfields) && JsonHelper::check($item->addfields)) { // move the old data $this->setDivergedDataMover($item->addfields, 'admin_fields', 'addfields', $getter); @@ -1914,7 +2008,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // remove from this dataset unset($item->addfields); // update the addlinked_views - if (isset($item->addlinked_views) && ComponentbuilderHelper::checkJson($item->addlinked_views)) + if (isset($item->addlinked_views) && JsonHelper::check($item->addlinked_views)) { $this->updateAfter['adminview'][(int) $item->id] = $action; // addlinked_views } @@ -1923,7 +2017,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel unset($item->addlinked_views); } // update the addconditions (old dataset) - if (isset($item->addconditions) && ComponentbuilderHelper::checkJson($item->addconditions)) + if (isset($item->addconditions) && JsonHelper::check($item->addconditions)) { // move the old data $this->setDivergedDataMover($item->addconditions, 'admin_fields_conditions', 'addconditions', $getter); @@ -1972,7 +2066,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // set the anchors getters $getter = array('joomla_component' => $item->id); // update the addconfig - if (isset($item->addconfig) && ComponentbuilderHelper::checkJson($item->addconfig)) + if (isset($item->addconfig) && JsonHelper::check($item->addconfig)) { // move the old data $this->setDivergedDataMover($item->addconfig, 'component_config', 'addconfig', $getter); @@ -1980,7 +2074,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // remove from this dataset unset($item->addconfig); // update the addadmin_views - if (isset($item->addadmin_views) && ComponentbuilderHelper::checkJson($item->addadmin_views)) + if (isset($item->addadmin_views) && JsonHelper::check($item->addadmin_views)) { // move the old data $this->setDivergedDataMover($item->addadmin_views, 'component_admin_views', 'addadmin_views', $getter); @@ -1988,7 +2082,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // remove from this dataset unset($item->addadmin_views); // update the addcustom_admin_views - if (isset($item->addcustom_admin_views) && ComponentbuilderHelper::checkJson($item->addcustom_admin_views)) + if (isset($item->addcustom_admin_views) && JsonHelper::check($item->addcustom_admin_views)) { // move the old data $this->setDivergedDataMover($item->addcustom_admin_views, 'component_custom_admin_views', 'addcustom_admin_views', $getter); @@ -1996,7 +2090,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // remove from this dataset unset($item->addcustom_admin_views); // update the addsite_views - if (isset($item->addsite_views) && ComponentbuilderHelper::checkJson($item->addsite_views)) + if (isset($item->addsite_views) && JsonHelper::check($item->addsite_views)) { // move the old data $this->setDivergedDataMover($item->addsite_views, 'component_site_views', 'addsite_views', $getter); @@ -2004,7 +2098,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // remove from this dataset unset($item->addsite_views); // update the version_update - if (isset($item->version_update) && ComponentbuilderHelper::checkJson($item->version_update)) + if (isset($item->version_update) && JsonHelper::check($item->version_update)) { // move the old data $this->setDivergedDataMover($item->version_update, 'component_updates', 'version_update', $getter); @@ -2012,7 +2106,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // remove from this dataset unset($item->version_update); // update the sql_tweak - if (isset($item->sql_tweak) && ComponentbuilderHelper::checkJson($item->sql_tweak)) + if (isset($item->sql_tweak) && JsonHelper::check($item->sql_tweak)) { // move the old data $this->setDivergedDataMover($item->sql_tweak, 'component_mysql_tweaks', 'sql_tweak', $getter); @@ -2020,7 +2114,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // remove from this dataset unset($item->sql_tweak); // update the addcustommenus - if (isset($item->addcustommenus) && ComponentbuilderHelper::checkJson($item->addcustommenus)) + if (isset($item->addcustommenus) && JsonHelper::check($item->addcustommenus)) { // move the old data $this->setDivergedDataMover($item->addcustommenus, 'component_custom_admin_menus', 'addcustommenus', $getter); @@ -2028,7 +2122,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // remove from this dataset unset($item->addcustommenus); // update the dashboard_tab - if (isset($item->dashboard_tab) && ComponentbuilderHelper::checkJson($item->dashboard_tab)) + if (isset($item->dashboard_tab) && JsonHelper::check($item->dashboard_tab)) { // move the old data $this->setDivergedDataMover($item->dashboard_tab, 'component_dashboard', 'dashboard_tab', $getter); @@ -2045,7 +2139,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel unset($item->php_dashboard_methods); unset($item->add_php_dashboard_methods); // update the addfiles - if (isset($item->addfiles) && ComponentbuilderHelper::checkJson($item->addfiles)) + if (isset($item->addfiles) && JsonHelper::check($item->addfiles)) { // move the old data $this->setDivergedDataMover($item->addfiles, 'component_files_folders', 'addfiles', $getter); @@ -2053,7 +2147,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // remove from this dataset unset($item->addfiles); // update the addfolders - if (isset($item->addfolders) && ComponentbuilderHelper::checkJson($item->addfolders)) + if (isset($item->addfolders) && JsonHelper::check($item->addfolders)) { // move the old data $this->setDivergedDataMover($item->addfolders, 'component_files_folders', 'addfolders', $getter); @@ -2068,7 +2162,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // remove from this dataset unset($item->add_css); // update the css - if (isset($item->css) && ComponentbuilderHelper::checkString($item->css)) + if (isset($item->css) && StringHelper::check($item->css)) { $item->css_admin = $item->css; } @@ -2416,10 +2510,10 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // update the target ID where needed $item = $this->setNewID($item, $lang['target'], 'joomla_component', $type); // load the local targets if found - if (isset($item->{$lang['local']}) && ComponentbuilderHelper::checkJson($item->{$lang['local']})) + if (isset($item->{$lang['local']}) && JsonHelper::check($item->{$lang['local']})) { $targets = array(); - if (isset($item->{$lang['target']}) && ComponentbuilderHelper::checkJson($item->{$lang['target']})) + if (isset($item->{$lang['target']}) && JsonHelper::check($item->{$lang['target']})) { $targets = json_decode($item->{$lang['target']}, true); } @@ -2443,7 +2537,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel unset($item->{$lang['local']}); } // load it back - if (isset($targets) && ComponentbuilderHelper::checkArray($targets)) + if (isset($targets) && JCBArrayHelper::check($targets)) { // load it back $item->{$lang['target']} = json_encode(array_values($targets), JSON_FORCE_OBJECT); @@ -2451,8 +2545,8 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } // merge the translations where needed if (isset($item->translation) && isset($item->localTranslation) - && ComponentbuilderHelper::checkJson($item->translation) - && ComponentbuilderHelper::checkJson($item->localTranslation)) + && JsonHelper::check($item->translation) + && JsonHelper::check($item->localTranslation)) { $newTranslations = json_decode($item->translation, true); $localTranslations = json_decode($item->localTranslation, true); // always the new format @@ -2479,7 +2573,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } } // okay this is the new format lets merge on that basis - elseif (ComponentbuilderHelper::checkArray($newTranslations)) + elseif (JCBArrayHelper::check($newTranslations)) { $translations = $newTranslations; $pointer = count($translations); @@ -2502,17 +2596,17 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } } // okay seem to only have local translations - elseif (ComponentbuilderHelper::checkArray($localTranslations)) + elseif (JCBArrayHelper::check($localTranslations)) { $translations = $localTranslations; } // only update if we have translations - if (ComponentbuilderHelper::checkArray($translations)) + if (JCBArrayHelper::check($translations)) { $item->translation = json_encode($translations, JSON_FORCE_OBJECT); } } - elseif (isset($item->localTranslation) && ComponentbuilderHelper::checkJson($item->localTranslation)) + elseif (isset($item->localTranslation) && JsonHelper::check($item->localTranslation)) { $item->translation = $item->localTranslation; } @@ -2584,12 +2678,12 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } // update the repeatable fields - if (isset($updaterR) && ComponentbuilderHelper::checkArray($updaterR)) + if (isset($updaterR) && JCBArrayHelper::check($updaterR)) { $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); } // update the subform ids - if (isset($updaterT) && ComponentbuilderHelper::checkArray($updaterT)) + if (isset($updaterT) && JCBArrayHelper::check($updaterT)) { $this->updateSubformsIDs($item, $type, $updaterT); } @@ -2636,11 +2730,11 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * * @return viod */ - protected function removingFields($type, &$item) + private function removingFields($type, &$item) { // get the columns $columns = $this->getTableColumns("#__componentbuilder_" . $type); - if (ComponentbuilderHelper::checkArray($columns)) + if (JCBArrayHelper::check($columns)) { foreach ($item as $name => $value) { @@ -2649,7 +2743,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // we must show a warning that this field was not imported (but just once) if (!isset($this->fieldImportErrors[$type.$name])) { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FIELD_BSB_NOT_FOUND_IN_LOCAL_DATABASE_TABLE_S_SO_IMPORTED_OF_ITS_VALUES_FAILED_PLEASE_UPDATE_YOUR_JCB_INSTALL_AND_TRY_AGAIN', $name, '#__componentbuilder_' . $type), 'warning'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FIELD_BSB_NOT_FOUND_IN_LOCAL_DATABASE_TABLE_S_SO_IMPORTED_OF_ITS_VALUES_FAILED_PLEASE_UPDATE_YOUR_JCB_INSTALL_AND_TRY_AGAIN', $name, '#__componentbuilder_' . $type), 'warning'); // make sure the message is not loaded again $this->fieldImportErrors[$type.$name] = true; } @@ -2667,7 +2761,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * * @return array */ - protected function getTableColumns($table) + private function getTableColumns($table) { // check if the columns are in memory if (!isset($this->tableColumns[$table])) @@ -2688,10 +2782,10 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * * @return bool */ - protected function setDivergedDataMover($values, $table, $type, $getters) + private function setDivergedDataMover($values, $table, $type, $getters) { // we need to move this to the new $table based on anchors - if (ComponentbuilderHelper::checkArray($getters)) + if (JCBArrayHelper::check($getters)) { if (!isset($this->divergedDataMover[$table])) { @@ -2712,12 +2806,12 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // display more import info if ($this->moreInfo) { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_WE_SUCCESSFULLY_MOVED_BSB', ComponentbuilderHelper::safeString($type, 'Ww') . ' to ('.ComponentbuilderHelper::safeString($table, 'w').')'), 'success'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_WE_SUCCESSFULLY_MOVED_BSB', StringHelper::safe($type, 'Ww') . ' to ('.StringHelper::safe($table, 'w').')'), 'success'); } // success return true; } - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_WE_FAILED_TO_MOVE_BSB', ComponentbuilderHelper::safeString($type, 'Ww') . ' to ('.ComponentbuilderHelper::safeString($table, 'w').')'), 'warning'); + $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_WE_FAILED_TO_MOVE_BSB', StringHelper::safe($type, 'Ww') . ' to ('.StringHelper::safe($table, 'w').')'), 'warning'); // failure return false; } @@ -2730,7 +2824,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * @return bool true on success * */ - protected function checkMultiFields($typeID) + private function checkMultiFields($typeID) { if(isset($this->isMultiple[$typeID])) { @@ -2759,12 +2853,12 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * @return string field type * */ - protected function getFieldType($id) + private function getFieldType($id) { if (!isset($this->fieldTypes[$id])) { - $properties = ComponentbuilderHelper::getVar('fieldtype', $id, 'id', 'properties'); - if (ComponentbuilderHelper::checkJson($properties)) + $properties = GetHelper::var('fieldtype', $id, 'id', 'properties'); + if (JsonHelper::check($properties)) { $properties = json_decode($properties, true); // check if this is old values for repeatable fields @@ -2777,7 +2871,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel { if ('type' === $property['name']) { - if (isset($property['example']) && ComponentbuilderHelper::checkString($property['example'])) + if (isset($property['example']) && StringHelper::check($property['example'])) { $this->fieldTypes[$id] = $property['example']; break; @@ -2786,9 +2880,9 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel } } // if not found - if (!isset($this->fieldTypes[$id]) && $name = ComponentbuilderHelper::getVar('fieldtype', $id, 'id', 'name')) + if (!isset($this->fieldTypes[$id]) && $name = GetHelper::var('fieldtype', $id, 'id', 'name')) { - $this->fieldTypes[$id] = ComponentbuilderHelper::safeString($name); + $this->fieldTypes[$id] = StringHelper::safe($name); } } // return the type @@ -2810,7 +2904,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * ID int on success * **/ - protected function updateLocalItem(&$item, $type, &$canState) + private function updateLocalItem(&$item, $type, &$canState) { // prep the item if ($update = $this->prepItem($item, $type, 'update')) @@ -2841,7 +2935,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * ID int on success * **/ - protected function addLocalItem(&$item, $type, $diverged = false) + private function addLocalItem(&$item, $type, $diverged = false) { // prep the item if ($add = $this->prepItem($item, $type, 'add', $diverged)) @@ -2872,7 +2966,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * ID int on success * **/ - protected function getLocalItem($item, $type, $retry = false, $get = 1, $diverged = false) + private function getLocalItem($item, $type, $retry = false, $get = 1, $diverged = false) { $query = $this->_db->getQuery(true); $query->select('a.*'); @@ -2882,7 +2976,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // we first try to get the item by GUID if ($get == 1 && isset($item->guid)) { - if (($item = ComponentbuilderHelper::getGUID($item->guid, $type, 'a.*')) !== false) + if (($item = GuidHelper::item($item->guid, $type, 'a.*')) !== false) { return $item; } @@ -2912,7 +3006,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // set to run query $runQuery = true; } - elseif (componentbuilderHelper::checkArray($get)) + elseif (JCBArrayHelper::check($get)) { foreach ($get as $field) { @@ -2923,7 +3017,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // set the value $value = $item->{$field}; // check if we have special value - if ($this->specialValue && ComponentbuilderHelper::checkArray($this->specialValue) && isset($this->specialValue[$field])) + if ($this->specialValue && JCBArrayHelper::check($this->specialValue) && isset($this->specialValue[$field])) { $value = $this->specialValue[$field]; } @@ -2936,7 +3030,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel { $query->where($this->_db->quoteName('a.' . $field) . ' = '. (float) $value); } - elseif(componentbuilderHelper::checkString($value)) // do not allow empty strings (since it could be major mis match) + elseif(StringHelper::check($value)) // do not allow empty strings (since it could be major mis match) { $query->where($this->_db->quoteName('a.' . $field) . ' = '. $this->_db->quote($value)); } @@ -2960,7 +3054,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // set the value $value = $item->{$get}; // check if we have special value - if ($this->specialValue && ComponentbuilderHelper::checkArray($this->specialValue) && isset($this->specialValue[$get])) + if ($this->specialValue && JCBArrayHelper::check($this->specialValue) && isset($this->specialValue[$get])) { $value = $this->specialValue[$get]; } @@ -2973,7 +3067,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel { $query->where($this->_db->quoteName('a.' . $get) . ' = '. (float) $value); } - elseif(componentbuilderHelper::checkString($value)) // do not allow empty strings (since it could be major mis match) + elseif(StringHelper::check($value)) // do not allow empty strings (since it could be major mis match) { $query->where($this->_db->quoteName('a.' . $get) . ' = '. $this->_db->quote($value)); } @@ -3137,20 +3231,20 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel // get by name ... $getter = array('name', 'gettype', 'main_source'); // risky will look at this again // add some more advanced search - if (isset($item->main_source) && $item->main_source == 1 && isset($item->view_selection) && ComponentbuilderHelper::checkString($item->view_selection)) + if (isset($item->main_source) && $item->main_source == 1 && isset($item->view_selection) && StringHelper::check($item->view_selection)) { $getter[] = 'view_selection'; } - elseif (isset($item->main_source) && $item->main_source == 2 && isset($item->db_selection) && ComponentbuilderHelper::checkString($item->db_selection)) + elseif (isset($item->main_source) && $item->main_source == 2 && isset($item->db_selection) && StringHelper::check($item->db_selection)) { $getter[] = 'db_selection'; } - elseif (isset($item->main_source) && $item->main_source == 3 && isset($item->php_custom_get) && ComponentbuilderHelper::checkString($item->php_custom_get)) + elseif (isset($item->main_source) && $item->main_source == 3 && isset($item->php_custom_get) && StringHelper::check($item->php_custom_get)) { $getter[] = 'php_custom_get'; } // add some extra - if (isset($item->getcustom) && ComponentbuilderHelper::checkString($item->getcustom)) + if (isset($item->getcustom) && StringHelper::check($item->getcustom)) { $getter[] = 'getcustom'; } @@ -3396,7 +3490,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * @return string The updated path * */ - protected function setFullPath($path) + private function setFullPath($path) { return str_replace(array_keys(ComponentbuilderHelper::$constantPaths), array_values(ComponentbuilderHelper::$constantPaths), $path); } @@ -3408,13 +3502,14 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel * * @return string The full path * */ - protected function setDynamicPath($path) + private function setDynamicPath($path) { // now convert to path $path = str_replace('__v_d_m__', '/', $path); // add the full path if possible return str_replace('//', '/', $this->setFullPath($path)); - } + } + protected function getAlias($name,$type = false) { diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index 7cadbc720..45ba09e03 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -15,6 +15,12 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\MVC\Model\ListModel; use Joomla\Utilities\ArrayHelper; use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory; +use VDM\Joomla\Utilities\FileHelper; +use VDM\Joomla\Utilities\ArrayHelper as JCBArrayHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\GetHelper; +use VDM\Joomla\Utilities\JsonHelper; /** * Joomla_components List Model @@ -112,14 +118,14 @@ class ComponentbuilderModelJoomla_components extends ListModel } // has any data been set for this component - if (ComponentbuilderHelper::checkArray($pks)) + if (JCBArrayHelper::check($pks)) { // load the linked stuff $this->getLinkedToComponents($pks); } // has any data been set for this component - if (isset($this->smartBox['joomla_component']) && ComponentbuilderHelper::checkArray($this->smartBox['joomla_component'])) + if (isset($this->smartBox['joomla_component']) && JCBArrayHelper::check($this->smartBox['joomla_component'])) { // set the folder and move the files of each component to the folder return $this->smartCloner(); @@ -181,25 +187,22 @@ class ComponentbuilderModelJoomla_components extends ListModel $this->packageName = 'JCB_smartPackage'; } } + // set the package path $this->packagePath = rtrim($this->backupPath, '/') . '/' . $this->packageName; $this->zipPath = rtrim($this->zipPath, '/') . '/' . $this->packageName .'.zip'; - if (JFolder::exists($this->packagePath)) + if (FileHelper::exists($this->packagePath)) { // remove if old folder is found ComponentbuilderHelper::removeFolder($this->packagePath); } + // create the folders JFolder::create($this->packagePath); - // Get the basic encryption. - $basickey = ComponentbuilderHelper::getCryptKey('basic'); - // Get the encryption object. - if ($basickey) - { - $basic = new FOFEncryptAes($basickey, 128); - } + // update $pks with returned IDs $pks = array(); + // start loading the components $this->smartBox['joomla_component'] = array(); foreach ($items as $nr => &$item) @@ -211,8 +214,10 @@ class ComponentbuilderModelJoomla_components extends ListModel unset($items[$nr]); continue; } + // make sure old fields are not exported any more $this->removeOldComponentValues($item); + // build information data set $this->info['name'][$item->id] = $item->name; $this->info['short_description'][$item->id] = $item->short_description; @@ -223,14 +228,15 @@ class ComponentbuilderModelJoomla_components extends ListModel $this->info['website'][$item->id] = $item->website; $this->info['license'][$item->id] = $item->license; $this->info['copyright'][$item->id] = $item->copyright; + // set the keys - if (isset($item->export_key) && ComponentbuilderHelper::checkString($item->export_key)) + if (isset($item->export_key) && StringHelper::check($item->export_key)) { // keep the key locked for exported data set $export_key = $item->export_key; - if ($basickey && !is_numeric($item->export_key) && $item->export_key === base64_encode(base64_decode($item->export_key, true))) + if (!is_numeric($item->export_key) && $item->export_key === base64_encode(base64_decode($item->export_key, true))) { - $export_key = rtrim($basic->decryptString($item->export_key), "\0"); + $export_key = PackageFactory::_('Crypt')->decrypt($item->export_key, 'basic'); } // make sure we have a string if (strlen($export_key) > 4 ) @@ -238,27 +244,31 @@ class ComponentbuilderModelJoomla_components extends ListModel $this->key[$item->id] = $export_key; } } + // get name of this item key_name if (isset($item->system_name)) { - $keyName = ComponentbuilderHelper::safeString($item->system_name, 'cAmel'); + $keyName = StringHelper::safe($item->system_name, 'cAmel'); } else { - $keyName = ComponentbuilderHelper::safeString($item->name_code); + $keyName = StringHelper::safe($item->name_code); } + // set the export buy links - if (isset($item->export_buy_link) && ComponentbuilderHelper::checkString($item->export_buy_link)) + if (isset($item->export_buy_link) && StringHelper::check($item->export_buy_link)) { // set the export buy link $this->info['export_buy_link'][$item->id] = $item->export_buy_link; } + // set the export buy links - if (isset($item->joomla_source_link) && ComponentbuilderHelper::checkString($item->joomla_source_link)) + if (isset($item->joomla_source_link) && StringHelper::check($item->joomla_source_link)) { // set the source link $this->info['joomla_source_link'][$item->id] = $item->joomla_source_link; } + // component image $this->moveIt(array($item->image), 'image'); // set the custom code ID's @@ -276,14 +286,14 @@ class ComponentbuilderModelJoomla_components extends ListModel } // has any data been set for this component - if (ComponentbuilderHelper::checkArray($pks)) + if (JCBArrayHelper::check($pks)) { // load the linked stuff $this->getLinkedToComponents($pks); } // has any data been set for this component - if (isset($this->smartBox['joomla_component']) && ComponentbuilderHelper::checkArray($this->smartBox['joomla_component'])) + if (isset($this->smartBox['joomla_component']) && JCBArrayHelper::check($this->smartBox['joomla_component'])) { // set the folder and move the files of each component to the folder return $this->smartExportBuilder(); @@ -320,7 +330,7 @@ class ComponentbuilderModelJoomla_components extends ListModel $this->setData($table, $pks, $field); } // add fields conditions and relations - if (isset($this->smartIDs['admin_view']) && ComponentbuilderHelper::checkArray($this->smartIDs['admin_view'])) + if (isset($this->smartIDs['admin_view']) && JCBArrayHelper::check($this->smartIDs['admin_view'])) { $this->setData('admin_fields', array_values($this->smartIDs['admin_view']), 'admin_view'); $this->setData('admin_fields_conditions', array_values($this->smartIDs['admin_view']), 'admin_view'); @@ -328,41 +338,41 @@ class ComponentbuilderModelJoomla_components extends ListModel $this->setData('admin_custom_tabs', array_values($this->smartIDs['admin_view']), 'admin_view'); } // add joomla module - if (isset($this->smartIDs['joomla_module']) && ComponentbuilderHelper::checkArray($this->smartIDs['joomla_module'])) + if (isset($this->smartIDs['joomla_module']) && JCBArrayHelper::check($this->smartIDs['joomla_module'])) { $this->setData('joomla_module', array_values($this->smartIDs['joomla_module']), 'id'); $this->setData('joomla_module_updates', array_values($this->smartIDs['joomla_module']), 'joomla_module'); $this->setData('joomla_module_files_folders_urls', array_values($this->smartIDs['joomla_module']), 'joomla_module'); } // add joomla plugin - if (isset($this->smartIDs['joomla_plugin']) && ComponentbuilderHelper::checkArray($this->smartIDs['joomla_plugin'])) + if (isset($this->smartIDs['joomla_plugin']) && JCBArrayHelper::check($this->smartIDs['joomla_plugin'])) { $this->setData('joomla_plugin', array_values($this->smartIDs['joomla_plugin']), 'id'); $this->setData('joomla_plugin_updates', array_values($this->smartIDs['joomla_plugin']), 'joomla_plugin'); $this->setData('joomla_plugin_files_folders_urls', array_values($this->smartIDs['joomla_plugin']), 'joomla_plugin'); } // add validation rules - if (isset($this->smartIDs['validation_rule']) && ComponentbuilderHelper::checkArray($this->smartIDs['validation_rule'])) + if (isset($this->smartIDs['validation_rule']) && JCBArrayHelper::check($this->smartIDs['validation_rule'])) { $this->setData('validation_rule', array_values($this->smartIDs['validation_rule']), 'name'); } // add field types - if (isset($this->smartIDs['fieldtype']) && ComponentbuilderHelper::checkArray($this->smartIDs['fieldtype'])) + if (isset($this->smartIDs['fieldtype']) && JCBArrayHelper::check($this->smartIDs['fieldtype'])) { $this->setData('fieldtype', array_values($this->smartIDs['fieldtype']), 'id'); } // add templates - if (isset($this->smartIDs['template']) && ComponentbuilderHelper::checkArray($this->smartIDs['template'])) + if (isset($this->smartIDs['template']) && JCBArrayHelper::check($this->smartIDs['template'])) { $this->setData('template', array_values($this->smartIDs['template']), 'id'); } // add layouts - if (isset($this->smartIDs['layout']) && ComponentbuilderHelper::checkArray($this->smartIDs['layout'])) + if (isset($this->smartIDs['layout']) && JCBArrayHelper::check($this->smartIDs['layout'])) { $this->setData('layout', array_values($this->smartIDs['layout']), 'id'); } // add dynamic get - if (isset($this->smartIDs['dynamic_get']) && ComponentbuilderHelper::checkArray($this->smartIDs['dynamic_get'])) + if (isset($this->smartIDs['dynamic_get']) && JCBArrayHelper::check($this->smartIDs['dynamic_get'])) { $this->setData('dynamic_get', array_values($this->smartIDs['dynamic_get']), 'id'); } @@ -370,49 +380,49 @@ class ComponentbuilderModelJoomla_components extends ListModel if ('clone' !== $this->activeType) { // add class_property - if (isset($this->smartIDs['class_property']) && ComponentbuilderHelper::checkArray($this->smartIDs['class_property'])) + if (isset($this->smartIDs['class_property']) && JCBArrayHelper::check($this->smartIDs['class_property'])) { $this->setData('class_property', array_values($this->smartIDs['class_property']), 'id'); } // add class_method - if (isset($this->smartIDs['class_method']) && ComponentbuilderHelper::checkArray($this->smartIDs['class_method'])) + if (isset($this->smartIDs['class_method']) && JCBArrayHelper::check($this->smartIDs['class_method'])) { $this->setData('class_method', array_values($this->smartIDs['class_method']), 'id'); } // add joomla_plugin_group - if (isset($this->smartIDs['joomla_plugin_group']) && ComponentbuilderHelper::checkArray($this->smartIDs['joomla_plugin_group'])) + if (isset($this->smartIDs['joomla_plugin_group']) && JCBArrayHelper::check($this->smartIDs['joomla_plugin_group'])) { $this->setData('joomla_plugin_group', array_values($this->smartIDs['joomla_plugin_group']), 'id'); } // add class_extends - if (isset($this->smartIDs['class_extends']) && ComponentbuilderHelper::checkArray($this->smartIDs['class_extends'])) + if (isset($this->smartIDs['class_extends']) && JCBArrayHelper::check($this->smartIDs['class_extends'])) { $this->setData('class_extends', array_values($this->smartIDs['class_extends']), 'id'); } // add snippets - if (isset($this->smartIDs['snippet']) && ComponentbuilderHelper::checkArray($this->smartIDs['snippet'])) + if (isset($this->smartIDs['snippet']) && JCBArrayHelper::check($this->smartIDs['snippet'])) { $this->setData('snippet', array_values($this->smartIDs['snippet']), 'id'); } // add custom code - if (isset($this->smartIDs['custom_code']) && ComponentbuilderHelper::checkArray($this->smartIDs['custom_code'])) + if (isset($this->smartIDs['custom_code']) && JCBArrayHelper::check($this->smartIDs['custom_code'])) { $this->setData('custom_code', array_values($this->smartIDs['custom_code']), 'id'); } // add placeholder - if (isset($this->smartIDs['placeholder']) && ComponentbuilderHelper::checkArray($this->smartIDs['placeholder'])) + if (isset($this->smartIDs['placeholder']) && JCBArrayHelper::check($this->smartIDs['placeholder'])) { $this->setData('placeholder', array_values($this->smartIDs['placeholder']), 'id'); } // add powers - if (isset($this->smartIDs['power']) && ComponentbuilderHelper::checkArray($this->smartIDs['power'])) + if (isset($this->smartIDs['power']) && JCBArrayHelper::check($this->smartIDs['power'])) { $this->setData('power', array_values($this->smartIDs['power']), 'guid'); } // set limiter $limit = 0; // and add those custom codes found in custom codes - while (isset($this->smartIDs['custom_code']) && ComponentbuilderHelper::checkArray($this->smartIDs['custom_code']) && $limit < 100) + while (isset($this->smartIDs['custom_code']) && JCBArrayHelper::check($this->smartIDs['custom_code']) && $limit < 100) { $this->setData('custom_code', array_values($this->smartIDs['custom_code']), 'id'); // make sure we break @@ -429,15 +439,15 @@ class ComponentbuilderModelJoomla_components extends ListModel protected function getComponents($pks) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (JCBArrayHelper::check($pks)) { // Get the user object. - if (!ComponentbuilderHelper::checkObject($this->user)) + if (!ObjectHelper::check($this->user)) { $this->user = JFactory::getUser(); } // Create a new query object. - if (!ComponentbuilderHelper::checkObject($this->_db)) + if (!ObjectHelper::check($this->_db)) { $this->_db = JFactory::getDBO(); } @@ -468,10 +478,10 @@ class ComponentbuilderModelJoomla_components extends ListModel // load the items from db $items = $this->_db->loadObjectList(); // check if we have items - if (ComponentbuilderHelper::checkArray($items)) + if (JCBArrayHelper::check($items)) { // set params - if (!ComponentbuilderHelper::checkObject($this->params)) + if (!ObjectHelper::check($this->params)) { $this->params = JComponentHelper::getParams('com_componentbuilder'); } @@ -516,30 +526,30 @@ class ComponentbuilderModelJoomla_components extends ListModel $this->smartIDs[$table] = array(); } // convert if value is in json - if (ComponentbuilderHelper::checkJson($value)) + if (JsonHelper::check($value)) { $value = json_decode($value, true); } // now update the fields - if (ComponentbuilderHelper::checkArray($value)) + if (JCBArrayHelper::check($value)) { foreach ($value as $id) { - if ($int && (ComponentbuilderHelper::checkString($id) || is_numeric($id)) && 0 !== (int) $id) + if ($int && (StringHelper::check($id) || is_numeric($id)) && 0 !== (int) $id) { $this->smartIDs[$table][(int) $id] = (int) $id; } - elseif (!$int && ComponentbuilderHelper::checkString($id)) + elseif (!$int && StringHelper::check($id)) { $this->smartIDs[$table][$id] = $this->_db->quote($id); } } } - elseif ($int && (ComponentbuilderHelper::checkString($value) || is_numeric($value)) && 0 !== (int) $value) + elseif ($int && (StringHelper::check($value) || is_numeric($value)) && 0 !== (int) $value) { $this->smartIDs[$table][(int) $value] = (int) $value; } - elseif (!$int && ComponentbuilderHelper::checkString($value)) + elseif (!$int && StringHelper::check($value)) { $this->smartIDs[$table][$value] = $this->_db->quote($value); } @@ -555,12 +565,12 @@ class ComponentbuilderModelJoomla_components extends ListModel // the ids bucket $bucket = array(); // if json convert to array - if (ComponentbuilderHelper::checkJson($values)) + if (JsonHelper::check($values)) { $values = json_decode($values, true); } // check that the array has values - if (ComponentbuilderHelper::checkArray($values)) + if (JCBArrayHelper::check($values)) { // check if the key is an array (targeting subform) if ('subform' === $type && $key) @@ -573,7 +583,7 @@ class ComponentbuilderModelJoomla_components extends ListModel { $bucket[] = $value[$key]; } - elseif (ComponentbuilderHelper::checkString($value[$key])) + elseif (StringHelper::check($value[$key])) { if ('table' === $prep) { @@ -587,7 +597,7 @@ class ComponentbuilderModelJoomla_components extends ListModel } } // only return if we set the ids - if (ComponentbuilderHelper::checkArray($bucket)) + if (JCBArrayHelper::check($bucket)) { // now set the values back return array_unique($bucket); @@ -599,7 +609,7 @@ class ComponentbuilderModelJoomla_components extends ListModel $_key = explode('.', $key); foreach ($values as $value) { - if (isset($value[$_key[0]]) && ComponentbuilderHelper::checkArray($value[$_key[0]])) + if (isset($value[$_key[0]]) && JCBArrayHelper::check($value[$_key[0]])) { foreach ($value[$_key[0]] as $_value) { @@ -607,7 +617,7 @@ class ComponentbuilderModelJoomla_components extends ListModel { $bucket[] = $_value[$_key[1]]; } - elseif (ComponentbuilderHelper::checkString($_value[$_key[1]])) + elseif (StringHelper::check($_value[$_key[1]])) { if ('table' === $prep) { @@ -622,7 +632,7 @@ class ComponentbuilderModelJoomla_components extends ListModel } } // only return if we set the ids - if (ComponentbuilderHelper::checkArray($bucket)) + if (JCBArrayHelper::check($bucket)) { // now set the values back return array_unique($bucket); @@ -638,7 +648,7 @@ class ComponentbuilderModelJoomla_components extends ListModel { return $value; } - elseif (ComponentbuilderHelper::checkString($value)) + elseif (StringHelper::check($value)) { if ('table' === $prep) { @@ -659,11 +669,11 @@ class ComponentbuilderModelJoomla_components extends ListModel { foreach ($values[$key] as $k => $val) { - if (strpos($k, 'power_') !== false && ComponentbuilderHelper::checkArray($val)) + if (strpos($k, 'power_') !== false && JCBArrayHelper::check($val)) { foreach ($val as $v) { - if (ComponentbuilderHelper::checkArray($v) && isset($v['power'])) + if (JCBArrayHelper::check($v) && isset($v['power'])) { $bucket[$v['power']] = $v['power']; } @@ -671,7 +681,7 @@ class ComponentbuilderModelJoomla_components extends ListModel } } // only return if we set the ids - if (ComponentbuilderHelper::checkArray($bucket)) + if (JCBArrayHelper::check($bucket)) { // now return the values back return array_values($bucket); @@ -690,7 +700,7 @@ class ComponentbuilderModelJoomla_components extends ListModel protected function setData($table, $values, $key, $string = false) { // lets check for json strings - if (ComponentbuilderHelper::checkJson($values)) + if (JsonHelper::check($values)) { $values = json_decode($values, true); } @@ -701,7 +711,7 @@ class ComponentbuilderModelJoomla_components extends ListModel } // make sure we have an array of values - if (!ComponentbuilderHelper::checkArray($values, true) || !ComponentbuilderHelper::checkString($table) || !ComponentbuilderHelper::checkString($key)) + if (!JCBArrayHelper::check($values, true) || !StringHelper::check($table) || !StringHelper::check($key)) { return false; } @@ -752,7 +762,7 @@ class ComponentbuilderModelJoomla_components extends ListModel // reset the search array (only search for template/layouts) $searchTLArray = array(); // check if we have items - if (ComponentbuilderHelper::checkArray($items)) + if (JCBArrayHelper::check($items)) { // set search array if site/custom admin view if ('site_view' === $table || 'custom_admin_view' === $table) @@ -904,7 +914,7 @@ class ComponentbuilderModelJoomla_components extends ListModel if ('component_modules' === $table) { // we remove those modules not part of the export - if (isset($item->addjoomla_modules) && ComponentbuilderHelper::checkJson($item->addjoomla_modules)) + if (isset($item->addjoomla_modules) && JsonHelper::check($item->addjoomla_modules)) { $item->addjoomla_modules = array_filter( json_decode($item->addjoomla_modules, true), @@ -925,7 +935,7 @@ class ComponentbuilderModelJoomla_components extends ListModel if ('component_plugins' === $table) { // we remove those plugins not part of the export - if (isset($item->addjoomla_plugins) && ComponentbuilderHelper::checkJson($item->addjoomla_plugins)) + if (isset($item->addjoomla_plugins) && JsonHelper::check($item->addjoomla_plugins)) { $item->addjoomla_plugins = array_filter( json_decode($item->addjoomla_plugins, true), @@ -1001,17 +1011,17 @@ class ComponentbuilderModelJoomla_components extends ListModel $fieldsSets[] = (int) $fields; } // get fields - if (ComponentbuilderHelper::checkArray($fieldsSets)) + if (JCBArrayHelper::check($fieldsSets)) { $this->setData('field', $fieldsSets, 'id'); } } // check if validation rule is found $validationRule = ComponentbuilderHelper::getBetween(json_decode($item->xml), 'validate="', '"'); - if (ComponentbuilderHelper::checkString($validationRule)) + if (StringHelper::check($validationRule)) { // make sure it is lowercase - $validationRule = ComponentbuilderHelper::safeString($validationRule); + $validationRule = StringHelper::safe($validationRule); // get core validation rules if ($coreValidationRules = ComponentbuilderHelper::getExistingValidationRuleNames(true)) { @@ -1025,7 +1035,7 @@ class ComponentbuilderModelJoomla_components extends ListModel } } // check if a search is required - if (isset($searchTLArray) && ComponentbuilderHelper::checkArray($searchTLArray)){ + if (isset($searchTLArray) && JCBArrayHelper::check($searchTLArray)){ // add search array templates and layouts foreach ($searchTLArray as $scripter => $add) @@ -1181,7 +1191,7 @@ class ComponentbuilderModelJoomla_components extends ListModel protected function smartCloner() { // check if data is set - if (isset($this->smartBox) && ComponentbuilderHelper::checkArray($this->smartBox)) + if (isset($this->smartBox) && JCBArrayHelper::check($this->smartBox)) { // get the import_joomla_components $model = ComponentbuilderHelper::getModel('import_joomla_components'); @@ -1190,7 +1200,7 @@ class ComponentbuilderModelJoomla_components extends ListModel // trigger the create new (clone) feature $model->canmerge = 0; // set some postfix - $model->postfix = ' ('.ComponentbuilderHelper::randomkey(2).')'; + $model->postfix = ' ('.StringHelper::random(2).')'; // get App $model->app = JFactory::getApplication(); // set user @@ -1239,10 +1249,11 @@ class ComponentbuilderModelJoomla_components extends ListModel protected function smartExportBuilder() { // check if data is set - if (isset($this->smartBox) && ComponentbuilderHelper::checkArray($this->smartBox)) + if (isset($this->smartBox) && JCBArrayHelper::check($this->smartBox)) { // set db data $data = serialize($this->smartBox); + // Set the key owner information $this->info['source'] = array(); $this->info['source']['company'] = $this->params->get('export_company', null); @@ -1251,26 +1262,16 @@ class ComponentbuilderModelJoomla_components extends ListModel $this->info['source']['website'] = $this->params->get('export_website', null); $this->info['source']['license'] = $this->params->get('export_license', null); $this->info['source']['copyright'] = $this->params->get('export_copyright', null); + // lock the data if set - if (ComponentbuilderHelper::checkArray($this->key)) + if (JCBArrayHelper::check($this->key)) { // lock the data $this->key = md5(implode('', $this->key)); - // April 20, 2022 we moved away from FOF for good... sorry that it took this long - // $locker = new FOFEncryptAes($this->key, 128); - // $data = $locker->encryptString($data); - // load phpseclib - if(ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib\Crypt\Rijndael) - { - // set the password - ComponentbuilderHelper::crypt('AES', 'CBC')->setPassword($this->key, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt'); - // lock the data - $data = base64_encode(ComponentbuilderHelper::crypt('AES', 'CBC')->encrypt($data)); - } - else - { - return false; - } + + // lock the data + $data = PackageFactory::_('Crypt')->encrypt($data, 'aes', $this->key); + // Set the key owner information $this->info['getKeyFrom'] = array(); $this->info['getKeyFrom']['company'] = $this->info['source']['company']; @@ -1280,13 +1281,16 @@ class ComponentbuilderModelJoomla_components extends ListModel $this->info['getKeyFrom']['license'] = $this->info['source']['license']; $this->info['getKeyFrom']['copyright'] = $this->info['source']['copyright']; // add buy link if only one link is set - if (isset($this->info['export_buy_link']) && ComponentbuilderHelper::checkArray($this->info['export_buy_link']) && count((array) $this->info['export_buy_link']) == 1) + if (isset($this->info['export_buy_link']) + && JCBArrayHelper::check($this->info['export_buy_link']) + && count((array) $this->info['export_buy_link']) == 1) { $this->info['getKeyFrom']['buy_link'] = array_values($this->info['export_buy_link'])[0]; } else { - // use global if more then one component is exported (since they now have one key), or if none has a buy link + // use global if more then one component is exported + // (since they now have one key), or if none has a buy link $this->info['getKeyFrom']['buy_link'] = $this->params->get('export_buy_link', null); } // no remove the buy links @@ -1294,75 +1298,82 @@ class ComponentbuilderModelJoomla_components extends ListModel // if we have multi links add them also // we started adding this at v2.7.7 $this->info['key'] = true; - // we started adding this at v3.0.11 and v2.12.17 - $this->info['phpseclib'] = true; + // Changed: 25th Feb. 2023 at v3.1.18 + // $this->info['phpseclib'] = false; + // we started adding this at v3.1.18 + $this->info['phpseclib3'] = true; } else { // we started adding this at v2.7.7 $this->info['key'] = false; // we started adding this at v3.0.11 and v2.12.17 - $this->info['phpseclib'] = false; + // $this->info['phpseclib'] = false; + // we started adding this at v3.1.18 + $this->info['phpseclib3'] = false; // base 64 encode the data $data = base64_encode($data); } + // set the path $dbPath = $this->packagePath . '/db.vdm'; + // write the db data to file in package - if (!ComponentbuilderHelper::writeFile($dbPath, wordwrap($data, 128, "\n", true))) + if (!FileHelper::write($dbPath, wordwrap($data, 128, "\n", true))) { return false; } - // set info data - if(ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib\Crypt\Rijndael) + + // lock the info data + $info = PackageFactory::_('Crypt')->encrypt(json_encode($this->info), 'local'); + + // set the path + $infoPath = $this->packagePath . '/info.vdm'; + + // write the info data to file in package + if (!FileHelper::write($infoPath, wordwrap($info, 128, "\n", true))) { - // set system password - $db = 'COM_COMPONENTBUILDER_SZDEQZDMVSMHBTRWFIFTYTSQFLVVXJTMTHREEJTWOIXM'; - $password = base64_decode(JText::sprintf($db, 'VjR', 'WV0aE9k')); - // set the password - ComponentbuilderHelper::crypt('AES', 'CBC')->setPassword($password, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt'); - // lock the data - $info = base64_encode(ComponentbuilderHelper::crypt('AES', 'CBC')->encrypt(json_encode($this->info))); - // set the path - $infoPath = $this->packagePath . '/info.vdm'; - // write the info data to file in package - if (!ComponentbuilderHelper::writeFile($infoPath, wordwrap($info, 128, "\n", true))) - { - return false; - } - } - else - { - return false; + return false; } + // lock all files $this->lockFiles(); + // remove old zip files with the same name if (JFile::exists($this->zipPath)) { // remove file if found JFile::delete($this->zipPath); } + // zip the folder - if (!ComponentbuilderHelper::zip($this->packagePath, $this->zipPath)) + if (!FileHelper::zip($this->packagePath, $this->zipPath)) { return false; } + // move to remote server if needed if (2 == $this->backupType) { - if (!ComponentbuilderHelper::moveToServer($this->zipPath, $this->packageName.'.zip', $this->backupServer, null, 'joomla_component.export')) + if (!PackageFactory::_('Server')->legacyMove( + $this->zipPath, $this->packageName.'.zip', + $this->backupServer, null, 'joomla_component.export' + ) + ) { return false; } + // remove the local file JFile::delete($this->zipPath); } + // remove the folder if (!ComponentbuilderHelper::removeFolder($this->packagePath)) { return false; } + return true; } return false; @@ -1376,25 +1387,27 @@ class ComponentbuilderModelJoomla_components extends ListModel protected function lockFiles() { // lock the data if set - if (ComponentbuilderHelper::checkString($this->key) && strlen($this->key) == 32) + if (StringHelper::check($this->key) && strlen($this->key) == 32) { - // set secure password - ComponentbuilderHelper::crypt('AES', 'CBC')->setPassword($this->key, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt'); // we must first store the current working directory $joomla = getcwd(); + // to avoid that it encrypt the db and info file again we must move per/folder $folders = array('images', 'custom', 'dynamic'); + // loop the folders foreach ($folders as $folder) { // the sub path $subPath = $this->packagePath.'/'.$folder; + // go to the package sub folder if found - if (JFolder::exists($subPath)) + if (FileHelper::exists($subPath)) { $this->lock($subPath); } } + // change back to working dir chdir($joomla); } @@ -1409,16 +1422,21 @@ class ComponentbuilderModelJoomla_components extends ListModel { // we are changing the working directory to the tmp path (important) chdir($tmpPath); + // get a list of files in the current directory tree (all) $files = JFolder::files('.', '.', true, true); + // read in the file content foreach ($files as $file) { + // get file content + $content = FileHelper::getContent($file); + // write the encrypted string back to file - if (!ComponentbuilderHelper::writeFile($file, wordwrap(base64_encode(ComponentbuilderHelper::crypt('AES', 'CBC')->encrypt(file_get_contents($file))), 128, "\n", true))) - { - // we should add error handler here in case file could not be locked - } + $content = PackageFactory::_('Crypt')->encrypt($content, 'eac', $this->key); + + // store the encrypted file content in the same file + FileHelper::write($file, wordwrap($content, 128, "\n", true)); } } @@ -1430,10 +1448,11 @@ class ComponentbuilderModelJoomla_components extends ListModel protected function moveIt($paths, $type, $dynamic = false) { // make sure we have an array - if (!ComponentbuilderHelper::checkArray($paths)) + if (!JCBArrayHelper::check($paths)) { return false; } + // set the name of the folder if ('file' === $type || 'folder' === $type) { @@ -1452,19 +1471,22 @@ class ComponentbuilderModelJoomla_components extends ListModel { return false; } + // setup the type path $tmpPath = str_replace('//', '/', $this->packagePath . '/' . $folderName); + // create type path if not set - if (!JFolder::exists($tmpPath)) + if (!FileHelper::exists($tmpPath)) { // create the folders if not found JFolder::create($tmpPath); } + // now move it foreach ($paths as $item) { // make sure we have a string - if (ComponentbuilderHelper::checkString($item)) + if (StringHelper::check($item)) { // if the file type if ('file' === $type) @@ -1487,14 +1509,16 @@ class ComponentbuilderModelJoomla_components extends ListModel JFile::copy($customFilePath, $tmpFilePath); } } + // if the image type if ('image' === $type) { $imageName = basename($item); $imagePath = str_replace($imageName, '', $item); $imageFolderPath = str_replace('//', '/', $this->packagePath.'/'. $imagePath); + // check if image folder exist - if (!JFolder::exists($imageFolderPath)) + if (!FileHelper::exists($imageFolderPath)) { // create the folders if not found JFolder::create($imageFolderPath); @@ -1507,6 +1531,7 @@ class ComponentbuilderModelJoomla_components extends ListModel JFile::copy($customImagePath, $tmpImagePath); } } + // if the folder type if ('folder' === $type) { @@ -1521,7 +1546,8 @@ class ComponentbuilderModelJoomla_components extends ListModel $tmpFolderPath = str_replace('//', '/', $tmpPath.'/'.$item); $customFolderPath = str_replace('//', '/', $this->customPath.'/'.$item); } - if (!JFolder::exists($tmpFolderPath) && JFolder::exists($customFolderPath)) + + if (!FileHelper::exists($tmpFolderPath) && FileHelper::exists($customFolderPath)) { // move the folder to its place JFolder::copy($customFolderPath, $tmpFolderPath,'',true); @@ -1574,14 +1600,14 @@ class ComponentbuilderModelJoomla_components extends ListModel if (!isset($this->fieldTypes[$id])) { $properties = ComponentbuilderHelper::getVar('fieldtype', $id, 'id', 'properties'); - if (ComponentbuilderHelper::checkJson($properties)) + if (JsonHelper::check($properties)) { $properties = json_decode($properties, true); foreach ($properties as $property) { if ('type' === $property['name']) { - if (isset($property['example']) && ComponentbuilderHelper::checkString($property['example'])) + if (isset($property['example']) && StringHelper::check($property['example'])) { $this->fieldTypes[$id] = $property['example']; break; @@ -1592,7 +1618,7 @@ class ComponentbuilderModelJoomla_components extends ListModel // if not found if (!isset($this->fieldTypes[$id]) && $name = ComponentbuilderHelper::getVar('fieldtype', $id, 'id', 'name')) { - $this->fieldTypes[$id] = ComponentbuilderHelper::safeString($name); + $this->fieldTypes[$id] = StringHelper::safe($name); } } // return the type @@ -1619,31 +1645,31 @@ class ComponentbuilderModelJoomla_components extends ListModel $default = base64_decode($default); } // set the Template data - $temp1 = ComponentbuilderHelper::getAllBetween($default, "\$this->loadTemplate('","')"); - $temp2 = ComponentbuilderHelper::getAllBetween($default, '$this->loadTemplate("','")'); + $temp1 = GetHelper::allBetween($default, "\$this->loadTemplate('","')"); + $temp2 = GetHelper::allBetween($default, '$this->loadTemplate("','")'); $templates = array(); $again = array(); - if (ComponentbuilderHelper::checkArray($temp1) && ComponentbuilderHelper::checkArray($temp2)) + if (JCBArrayHelper::check($temp1) && JCBArrayHelper::check($temp2)) { $templates = array_merge($temp1,$temp2); } else { - if (ComponentbuilderHelper::checkArray($temp1)) + if (JCBArrayHelper::check($temp1)) { $templates = $temp1; } - elseif (ComponentbuilderHelper::checkArray($temp2)) + elseif (JCBArrayHelper::check($temp2)) { $templates = $temp2; } } - if (ComponentbuilderHelper::checkArray($templates)) + if (JCBArrayHelper::check($templates)) { foreach ($templates as $template) { $data = $this->getDataWithAlias($template, 'template'); - if (ComponentbuilderHelper::checkArray($data)) + if (JCBArrayHelper::check($data)) { if (!isset($this->smartIDs['template']) || !isset($this->smartIDs['template'][$data['id']])) { @@ -1656,29 +1682,29 @@ class ComponentbuilderModelJoomla_components extends ListModel } } // set the layout data - $lay1 = ComponentbuilderHelper::getAllBetween($default, "JLayoutHelper::render('","',"); - $lay2 = ComponentbuilderHelper::getAllBetween($default, 'JLayoutHelper::render("','",'); - if (ComponentbuilderHelper::checkArray($lay1) && ComponentbuilderHelper::checkArray($lay2)) + $lay1 = GetHelper::allBetween($default, "JLayoutHelper::render('","',"); + $lay2 = GetHelper::allBetween($default, 'JLayoutHelper::render("','",'); + if (JCBArrayHelper::check($lay1) && JCBArrayHelper::check($lay2)) { $layouts = array_merge($lay1,$lay2); } else { - if (ComponentbuilderHelper::checkArray($lay1)) + if (JCBArrayHelper::check($lay1)) { $layouts = $lay1; } - elseif (ComponentbuilderHelper::checkArray($lay2)) + elseif (JCBArrayHelper::check($lay2)) { $layouts = $lay2; } } - if (isset($layouts) && ComponentbuilderHelper::checkArray($layouts)) + if (isset($layouts) && JCBArrayHelper::check($layouts)) { foreach ($layouts as $layout) { $data = $this->getDataWithAlias($layout, 'layout'); - if (ComponentbuilderHelper::checkArray($data)) + if (JCBArrayHelper::check($data)) { if (!isset($this->smartIDs['layout']) || !isset($this->smartIDs['layout'][$data['id']])) { @@ -1690,7 +1716,7 @@ class ComponentbuilderModelJoomla_components extends ListModel } } } - if (ComponentbuilderHelper::checkArray($again)) + if (JCBArrayHelper::check($again)) { foreach ($again as $get) { @@ -1701,12 +1727,12 @@ class ComponentbuilderModelJoomla_components extends ListModel if ($user) { // add templates - if (isset($this->smartIDs['template']) && ComponentbuilderHelper::checkArray($this->smartIDs['template'])) + if (isset($this->smartIDs['template']) && JCBArrayHelper::check($this->smartIDs['template'])) { $this->setData('template', array_values($this->smartIDs['template']), 'id'); } // add layouts - if (isset($this->smartIDs['layout']) && ComponentbuilderHelper::checkArray($this->smartIDs['layout'])) + if (isset($this->smartIDs['layout']) && JCBArrayHelper::check($this->smartIDs['layout'])) { $this->setData('layout', array_values($this->smartIDs['layout']), 'id'); } @@ -1733,7 +1759,7 @@ class ComponentbuilderModelJoomla_components extends ListModel $rows = $this->_db->loadObjectList(); foreach ($rows as $row) { - $k_ey = ComponentbuilderHelper::safeString($row->alias); + $k_ey = StringHelper::safe($row->alias); $key = preg_replace("/[^A-Za-z]/", '', $k_ey); $name = preg_replace("/[^A-Za-z]/", '', $n_ame); if ($k_ey == $n_ame || $key == $name) @@ -1794,8 +1820,8 @@ class ComponentbuilderModelJoomla_components extends ListModel if ('custom_code' === $type) { // search the value to see if it has custom code - $codeArray = ComponentbuilderHelper::getAllBetween($value, '[CUSTOMC' . 'ODE=',']'); - if (ComponentbuilderHelper::checkArray($codeArray)) + $codeArray = GetHelper::allBetween($value, '[CUSTOMC' . 'ODE=',']'); + if (JCBArrayHelper::check($codeArray)) { foreach ($codeArray as $func) { @@ -1813,7 +1839,7 @@ class ComponentbuilderModelJoomla_components extends ListModel { $this->setSmartIDs($func, $type); } - elseif (ComponentbuilderHelper::checkString($func)) + elseif (StringHelper::check($func)) { if (($funcID = ComponentbuilderHelper::getVar($type, $func, 'function_name', 'id')) !== false && is_numeric($funcID)) { @@ -1831,12 +1857,12 @@ class ComponentbuilderModelJoomla_components extends ListModel elseif ('placeholder' === $type) { // check if we already have the placeholder search array - if (!componentbuilderHelper::checkArray($this->placeholderM) && !componentbuilderHelper::checkArray($this->placeholderS)) + if (!JCBArrayHelper::check($this->placeholderM) && !JCBArrayHelper::check($this->placeholderS)) { $this->placeholderS = ComponentbuilderHelper::getVars($type, 1, 'published', 'target'); } // only continue search if placeholders found - if (componentbuilderHelper::checkArray($this->placeholderS)) + if (JCBArrayHelper::check($this->placeholderS)) { foreach ($this->placeholderS as $remove => $placeholder) { @@ -1899,7 +1925,7 @@ class ComponentbuilderModelJoomla_components extends ListModel { $items = $this->_db->loadObjectList(); // check if we have items - if (ComponentbuilderHelper::checkArray($items)) + if (JCBArrayHelper::check($items)) { if (!isset($this->smartBox['language_translation'])) { @@ -1907,7 +1933,7 @@ class ComponentbuilderModelJoomla_components extends ListModel } foreach ($items as $item) { - if (!isset($this->smartBox['language_translation'][$item->id]) && ComponentbuilderHelper::checkJson($item->{$target})) + if (!isset($this->smartBox['language_translation'][$item->id]) && JsonHelper::check($item->{$target})) { $targets = json_decode($item->{$target}, true); if (in_array($id, $targets)) @@ -1940,11 +1966,11 @@ class ComponentbuilderModelJoomla_components extends ListModel { if (isset($item->system_name)) { - return ComponentbuilderHelper::safeString($item->system_name, 'cAmel'); + return StringHelper::safe($item->system_name, 'cAmel'); } else { - return ComponentbuilderHelper::safeString($item->name_code); + return StringHelper::safe($item->name_code); } } } @@ -2747,7 +2773,7 @@ class ComponentbuilderModelJoomla_components extends ListModel $db = JFactory::getDbo(); // get the columns $columns = $db->getTableColumns("#__componentbuilder_joomla_component"); - if (ComponentbuilderHelper::checkArray($columns)) + if (JCBArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 496c32aae..5621ae02c 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1979,18 +1979,18 @@ INSERT INTO `#__componentbuilder_power` (`id`, `add_head`, `description`, `exten (9, 1, '', '', '', '011813ba-8dd2-4beb-98f9-50ab3f3665d1', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwIGFzIEJhc2VIdHRwOw0KdXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwRmFjdG9yeTsNCnVzZSBKb29tbGFcUmVnaXN0cnlcUmVnaXN0cnk7', '', '', '{\"load_selection0\":{\"load\":\"aa253bac-f4b4-41b4-8ace-071a73fc4d96\"},\"load_selection1\":{\"load\":\"c65aaf1f-817c-49a2-8202-282e3904f5b1\"},\"load_selection2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[[[Api]]]\\[[[Api]]]', '1.0.0', '{}', 'API', 'class', '{}', '', 1, '2022-01-05 00:44:15', '2022-09-20 10:09:49', 6, 4), (10, 1, 'Control the naming of a field\r\n\r\n@since 3.0.9', '', '', '9ef0eb24-aae4-4f5a-99af-d724db44808f', 'dXNlIEpvb21sYVxDTVNcQ29tcG9uZW50XENvbXBvbmVudEhlbHBlcjs=', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBmaWVsZCBidWlsZGVyIHN3aXRjaA0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwcm90ZWN0ZWQgc3RhdGljICRidWlsZGVyID0gZmFsc2U7DQoNCgkvKioNCgkgKiBNYWtpbmcgZmllbGQgbmFtZXMgc2FmZQ0KCSAqDQoJICogQGlucHV0CXN0cmluZyAgICAgICBUaGUgc3RyaW5nIHlvdSB3b3VsZCBsaWtlIHRvIG1ha2Ugc2FmZQ0KCSAqIEBpbnB1dAlib29sZWFuICAgICAgVGhlIHN3aXRjaCB0byByZXR1cm4gYW4gQUxMIFVQUEVSIENBU0Ugc3RyaW5nDQoJICogQGlucHV0CXN0cmluZyAgICAgICBUaGUgc3RyaW5nIHRvIHVzZSBpbiB3aGl0ZSBzcGFjZQ0KCSAqDQoJICogQHJldHVybnMgc3RyaW5nIG9uIHN1Y2Nlc3MNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBzYWZlKCRzdHJpbmcsICRhbGxjYXAgPSBmYWxzZSwgJHNwYWNlciA9ICdfJykNCgl7DQoJCS8vIGdldCBnbG9iYWwgdmFsdWUNCgkJaWYgKHNlbGY6OiRidWlsZGVyID09PSBmYWxzZSkNCgkJew0KCQkJc2VsZjo6JGJ1aWxkZXIgPSBIZWxwZXI6OmdldFBhcmFtcygpLT5nZXQoJ2ZpZWxkX25hbWVfYnVpbGRlcicsIDEpOw0KCQl9DQoNCgkJLy8gdXNlIHRoZSBuZXc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GxhY2UoJy9ccysvJywgKHN0cmluZykgJHNwYWNlciwgJHN0cmluZyk7DQoNCgkJCQkvLyByZXR1cm4gYWxsIGNhcHMNCgkJCQlpZiAoJGFsbGNhcCkNCgkJCQl7DQoJCQkJCXJldHVybiBzdHJ0b3VwcGVyKCRzdHJpbmcpOw0KCQkJCX0NCg0KCQkJCS8vIGRlZmF1bHQgaXMgdG8gcmV0dXJuIGxvd2VyDQoJCQkJcmV0dXJuIHN0cnRvbG93ZXIoJHN0cmluZyk7DQoJCQl9DQoJCQkvLyBub3QgYSBzdHJpbmcNCgkJCXJldHVybiAnJzsNCgkJfQ0KDQoJCS8vIHJldHVybiBhbGwgY2Fwcw0KCQlpZiAoJGFsbGNhcCkNCgkJew0KCQkJcmV0dXJuIFN0cmluZ0hlbHBlcjo6c2FmZSgkc3RyaW5nLCAnVScpOw0KCQl9DQoNCgkJLy8gdXNlIHRoZSBkZWZhdWx0IChvcmlnaW5hbCBiZWhhdmlvci9jb252ZW50aW9uKQ0KCQlyZXR1cm4gU3RyaW5nSGVscGVyOjpzYWZlKCRzdHJpbmcpOw0KCX0NCg==', '{}', 'FieldHelper', 'VDM\\Joomla\\Utilities.String.FieldHelper', '1.0.0', '{}', 'String Field Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"},\"use_selection1\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-08 20:46:56', '2023-01-14 18:06:18', 22, 5), (11, '', 'The json checker\r\n\r\n@since 3.0.9', '', '', '4b225c51-d293-48e4-b3f6-5136cf5c3f18', '', '', '', '{\"load_selection0\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"},\"load_selection1\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection2\":{\"load\":\"db87c339-5bb6-4291-a7ef-2c48ea1b06bc\"}}', 'CS8qKg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cmluZykgaW1wbG9kZSgkc2VwYXJhdG9yLCAkcmVzdWx0KTsNCgkJCX0NCgkJCXJldHVybiAoc3RyaW5nKSBqc29uX2RlY29kZSgoc3RyaW5nKSAkdmFsdWUpOw0KCQl9DQoJCXJldHVybiAkdmFsdWU7DQoJfQ0K', '{}', 'JsonHelper', 'VDM\\Joomla\\Utilities.JsonHelper', '1.0.0', '{}', 'Utilities Json Helper', 'abstract class', '{}', '', 1, '2022-03-08 21:03:54', '2023-01-14 18:11:18', 22, 6), -(12, 1, 'Some string tricks\r\n\r\n@since 3.0.9', '', '', '1f28cb53-60d9-4db1-b517-3c7dc6b429ef', 'dXNlIEpvb21sYVxDTVNcRmlsdGVyXElucHV0RmlsdGVyOw0KdXNlIEpvb21sYVxDTVNcTGFuZ3VhZ2VcTGFuZ3VhZ2U7', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"}}', 'CS8qKg0KCSAqIFRoZSBNYWluIEFjdGl2ZSBMYW5ndWFnZQ0KCSAqIA0KCSAqIEB2YXIgICAgICBzdHJpbmcNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyAkbGFuZ1RhZzsNCg0KCS8qKg0KCSAqIENoZWNrIGlmIHdlIGhhdmUgYSBzdHJpbmcgd2l0aCBhIGxlbmd0aA0KCSAqDQoJICogQGlucHV0ICAgIHN0cmluZyAgJHN0cmluZyBUaGUgc3RyaW5nIHRvIGNoZWNrDQoJICoNCgkgKiBAcmV0dXJucyBib29sIHRydWUgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGNoZWNrKCRzdHJpbmcpOiBib29sDQoJew0KCQlyZXR1cm4gaXNfc3RyaW5nKCRzdHJpbmcpICYmIHN0cmxlbigkc3RyaW5nKSA+IDA7DQoJfQ0KDQoJLyoqDQoJICogU2h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CXsNCgkJJGJhZyA9ICJhYmNlZmdoaWprbm9wcXJzdHV3eHl6QUJDRERFRkdISUpLTExNTU5PUFFSU1RVVlZXWFlaYWJjZGRlZmdoaWprbGxtbW5vcHFyc3R1dnZ3eHl6QUJDRUZHSElKS05PUFFSU1RVV1hZWiI7DQoJCSRrZXkgPSBbXTsNCgkJJGJhZ3NpemUgPSBzdHJsZW4oJGJhZykgLSAxOw0KDQoJCWZvciAoJGkgPSAwOyAkaSA8ICRzaXplOyAkaSsrKQ0KCQl7DQoJCQkkZ2V0ID0gcmFuZCgwLCAkYmFnc2l6ZSk7DQoJCQkka2V5W10gPSAkYmFnWyRnZXRdOw0KCQl9DQoNCgkJcmV0dXJuIGltcGxvZGUoJGtleSk7DQoJfQ0K', '{}', 'StringHelper', 'VDM\\Joomla\\Utilities.StringHelper', '1.0.0', '{}', 'Utilities String Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-08 21:35:37', '2023-01-31 12:08:09', 31, 7), +(12, 1, 'Some string tricks\r\n\r\n@since 3.0.9', '', '', '1f28cb53-60d9-4db1-b517-3c7dc6b429ef', 'dXNlIEpvb21sYVxDTVNcRmlsdGVyXElucHV0RmlsdGVyOw0KdXNlIEpvb21sYVxDTVNcTGFuZ3VhZ2VcTGFuZ3VhZ2U7', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"}}', 'CS8qKg0KCSAqIFRoZSBNYWluIEFjdGl2ZSBMYW5ndWFnZQ0KCSAqIA0KCSAqIEB2YXIgICAgICBzdHJpbmcNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyAkbGFuZ1RhZzsNCg0KCS8qKg0KCSAqIENoZWNrIGlmIHdlIGhhdmUgYSBzdHJpbmcgd2l0aCBhIGxlbmd0aA0KCSAqDQoJICogQGlucHV0ICAgIHN0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kJCQkJJHcgLj0gJ2FuZCAnOw0KCQkJCQl9DQoJCQkJCSR3IC49IHNlbGY6Om51bWJlcigkcik7DQoJCQkJfQ0KCQkJfQ0KCQl9DQoJCXJldHVybiAkdzsNCgl9DQoNCgkvKioNCgkgKiBSYW5kb20gS2V5DQoJICoNCgkgKiBAaW5wdXQJIGludCAgJHNpemUgICBUaGUgc2l6ZSBvZiB0aGUgcmFuZG9tIHN0cmluZw0KCSAqDQoJICogQHJldHVybnMgYSBzdHJpbmcNCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiByYW5kb20oaW50ICRzaXplKTogc3RyaW5nDQoJew0KCQkkYmFnID0gImFiY2VmZ2hpamtub3BxcnN0dXd4eXpBQkNEREVGR0hJSktMTE1NTk9QUVJTVFVWVldYWVphYmNkZGVmZ2hpamtsbG1tbm9wcXJzdHV2dnd4eXpBQkNFRkdISUpLTk9QUVJTVFVXWFlaIjsNCgkJJGtleSA9IFtdOw0KCQkkYmFnc2l6ZSA9IHN0cmxlbigkYmFnKSAtIDE7DQoNCgkJZm9yICgkaSA9IDA7ICRpIDwgJHNpemU7ICRpKyspDQoJCXsNCgkJCSRnZXQgPSByYW5kKDAsICRiYWdzaXplKTsNCgkJCSRrZXlbXSA9ICRiYWdbJGdldF07DQoJCX0NCg0KCQlyZXR1cm4gaW1wbG9kZSgka2V5KTsNCgl9DQo=', '{}', 'StringHelper', 'VDM\\Joomla\\Utilities.StringHelper', '1.0.0', '{}', 'Utilities String Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-08 21:35:37', '2023-02-26 17:25:05', 32, 7), (13, '', 'Some array tricks helper\r\n\r\n@since 3.0.9', '', '', '0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a', '', '', '', '{}', 'CS8qKg0KCSAqIENoZWNrIGlmIGhhdmUgYW4gYXJyYXkgd2l0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WNrKCRhcnJheXMpKQ0KCQl7DQoJCQkkbWVyZ2VkID0gW107DQoJCQlmb3JlYWNoICgkYXJyYXlzIGFzICRhcnJheSkNCgkJCXsNCgkJCQlpZiAoc2VsZjo6Y2hlY2soJGFycmF5KSkNCgkJCQl7DQoJCQkJCSRtZXJnZWQgPSBhcnJheV9tZXJnZSgkbWVyZ2VkLCAkYXJyYXkpOw0KCQkJCX0NCgkJCX0NCgkJCXJldHVybiAkbWVyZ2VkOw0KCQl9DQoJCXJldHVybiBudWxsOw0KCX0NCg0KCS8qKg0KCSAqIENoZWNrIGlmIGFycmF5cyBpbnRlcnNlY3QNCgkgKg0KCSAqIEBpbnB1dAlhcnJheSAgIFRoZSBmaXJzdCBhcnJheQ0KCSAqIEBpbnB1dAlhcnJheSAgIFRoZSBzZWNvbmQgYXJyYXkNCgkgKg0KCSAqIEByZXR1cm5zIGJvb2wgIHRydWUgaWYgaW50ZXJzZWN0IGVsc2UgZmFsc2UNCgkgKiANCgkgKiBAc2luY2UgIDMuMS4xDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBpbnRlcnNlY3QoJGFfYXJyYXksICRiX2FycmF5KTogYm9vbA0KCXsNCgkJLy8gZmxpcCB0aGUgc2Vjb25kIGFycmF5DQoJCSRiX2FycmF5ID0gYXJyYXlfZmxpcCgkYl9hcnJheSk7DQoNCgkJLy8gbG9vcCB0aGUgZmlyc3QgYXJyYXkNCgkJZm9yZWFjaCAoJGFfYXJyYXkgYXMgJHYpDQoJCXsNCgkJCWlmIChpc3NldCgkYl9hcnJheVskdl0pKQ0KCQkJew0KCQkJCXJldHVybiB0cnVlOw0KCQkJfQ0KCQl9DQoJCXJldHVybiBmYWxzZTsNCgl9DQo=', '{}', 'ArrayHelper', 'VDM\\Joomla\\Utilities.ArrayHelper', '1.0.0', '{}', 'Utilities Array Helper', 'abstract class', '{}', '', 1, '2022-03-08 22:53:52', '2023-02-05 17:36:34', 21, 8), (14, '', 'Control the naming of a namespace helper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FwnLCAnKycsIChzdHJpbmcpICRzdHJpbmcpOw0KDQoJCQkvLyByZW1vdmUgYWxsIGFuZCBrZWVwIG9ubHkgY2hhcmFjdGVycyBhbmQgW1xdIGJhY2tzbGFzaGVzIGluc2lkZSBvZiB0aGUgc3RyaW5nDQoJCQlpZiAoJHJlbW92ZU51bWJlcnMpDQoJCQl7DQoJCQkJJHN0cmluZyA9IHRyaW0oIHByZWdfcmVwbGFjZSgiL1teQS1aYS16XCtdLyIsICcnLCAkc3RyaW5nKSwgJysnKTsNCgkJCX0NCgkJCWVsc2UNCgkJCXsNCgkJCQkkc3RyaW5nID0gdHJpbSggcHJlZ19yZXBsYWNlKCIvW15BLVphLXowLTlcK10vIiwgJycsICRzdHJpbmcpLCAnKycpOw0KCQkJfQ0KDQoJCQkvLyBwbGFjZSB0aGUgW1xdIGJhY2tzbGFzaGVzIGJhY2sNCgkJCXJldHVybiB0cmltKCBwcmVnX3JlcGxhY2UoIi9cKysvIiwgJ1xcJywgJHN0cmluZykpOw0KCQl9DQoNCgkJLy8gbm90IGEgc3RyaW5nDQoJCXJldHVybiAnJzsNCgl9DQo=', '{}', 'NamespaceHelper', 'VDM\\Joomla\\Utilities.String.NamespaceHelper', '1.0.0', '{}', 'String Namespace Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"}}', '', 1, '2022-03-08 23:27:57', '2023-01-14 18:04:48', 19, 5), (15, 1, 'Control the naming of a field type\r\n\r\n@since 3.0.9', '', '', 'a8935cbe-7701-40dc-bfd5-675f2d600954', 'dXNlIEpvb21sYVxDTVNcQ29tcG9uZW50XENvbXBvbmVudEhlbHBlcjs=', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBmaWVsZCBidWlsZGVyIHN3aXRjaA0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwcm90ZWN0ZWQgc3RhdGljICRidWlsZGVyID0gZmFsc2U7DQoNCg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yA9IFN0cmluZ0hlbHBlcjo6dHJhbnNsaXRlcmF0ZSgkc3RyaW5nKTsNCg0KCQkJCS8vIHJlbW92ZSBhbGwgYW5kIGtlZXAgb25seSBjaGFyYWN0ZXJzIGFuZCBudW1iZXJzIGFuZCBwb2ludCAoVE9ETyBqdXN0IG9uZSBwb2ludCkNCgkJCQkkc3RyaW5nID0gdHJpbShwcmVnX3JlcGxhY2UoIi9bXkEtWmEtejAtOVwuXS8iLCAnJywgKHN0cmluZykgJHN0cmluZykpOw0KDQoJCQkJLy8gYmVzdCBpcyB0byByZXR1cm4gbG93ZXIgKGZvciBhbGwgc3RyaW5nIGVxdWFsaXR5IGluIGNvbXBpbGVyKQ0KCQkJCXJldHVybiBzdHJ0b2xvd2VyKCRzdHJpbmcpOw0KCQkJfQ0KCQkJLy8gbm90IGEgc3RyaW5nDQoJCQlyZXR1cm4gJyc7DQoJCX0NCg0KCQkvLyB1c2UgdGhlIGRlZmF1bHQgKG9yaWdpbmFsIGJlaGF2aW91ci9jb252ZW50aW9uKQ0KCQlyZXR1cm4gU3RyaW5nSGVscGVyOjpzYWZlKCRzdHJpbmcpOw0KCX0NCg==', '{}', 'TypeHelper', 'VDM\\Joomla\\Utilities.String.TypeHelper', '1.0.0', '{}', 'String Type Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"},\"use_selection1\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-08 23:33:09', '2023-01-14 17:56:28', 16, 5), (16, '', 'Control the naming of a class and function\r\n\r\n@since 3.0.9', '', '', '30c5b4c2-f75f-4d15-869a-f8bfedd87358', '', '', '', '{}', 'CS8qKg0KCSAqIE1ha2luZyBjbGFzcyBvciBmdW5jdGlvbiBuYW1lIHNhZmUNCgkgKg0KCSAqIEBpbnB1dAlzdHJpbmcgICAgICAgVGhlIG5hbWUgeW91IHdvdWxkIGxpa2UgdG8gbWFrZSBzYWZlDQoJICoNCgkgKiBAcmV0dXJucyBzdHJpbmcgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHNhZmUoJG5hbWUpOiBzdHJpbmcNCgl7DQoJCS8vIHJlbW92ZSBudW1iZXJzIGlmIHRoZSBmaXJzdCBjaGFyYWN0ZXIgaXMgYSBudW1iZXINCgkJaWYgKGlzX251bWVyaWMoc3Vic3RyKChzdHJpbmcpICRuYW1lLCAwLCAxKSkpDQoJCXsNCgkJCSRuYW1lID0gU3RyaW5nSGVscGVyOjpudW1iZXJzKCRuYW1lKTsNCgkJfQ0KDQoJCS8vIHJlbW92ZSBhbGwgc3BhY2VzIGFuZCBzdHJhbmdlIGNoYXJhY3RlcnMNCgkJcmV0dXJuIHRyaW0ocHJlZ19yZXBsYWNlKCIvW15BLVphLXowLTlfLV0vIiwgJycsIChzdHJpbmcpICRuYW1lKSk7DQoJfQ0K', '{}', 'ClassfunctionHelper', 'VDM\\Joomla\\Utilities.String.ClassfunctionHelper', '1.0.0', '{}', 'String Classfunction Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"}}', '', 1, '2022-03-08 23:43:10', '2023-02-05 18:04:30', 17, 5), (17, 1, 'Some easy get...\r\n\r\n@since 3.0.9', '', '', 'db87c339-5bb6-4291-a7ef-2c48ea1b06bc', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTs=', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', 'CS8qKg0KCSAqIEdldCBhIFZhcmlhYmxlIA0KCSAqDQoJICogQHBhcmFtICAgc3RyaW5nfG51bGwgICR0YWJsZSAgICAgICAgVGhlIHRhYmxlIGZ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GetHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-09 00:21:06', '2023-01-18 22:46:18', 26, 9), -(18, '', 'Some object tricks\r\n\r\n@since 3.0.9', '', '', '91004529-94a9-4590-b842-e7c6b624ecf5', '', '', '', '{}', 'CS8qKg0KCSAqIENoZWNrIGlmIGhhdmUgYW4gb2JqZWN0IHdpdGggYSBsZW5ndGgNCgkgKg0KCSAqIEBpbnB1dAlvYmplY3QgICBUaGUgb2JqZWN0IHRvIGNoZWNrDQoJICoNCgkgKiBAcmV0dXJucyBib29sIHRydWUgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGNoZWNrKCRvYmplY3QpDQoJew0KCQlpZiAoaXNfb2JqZWN0KCRvYmplY3QpKQ0KCQl7DQoJCQlyZXR1cm4gY291bnQoKGFycmF5KSAkb2JqZWN0KSA+IDA7DQoJCX0NCg0KCQlyZXR1cm4gZmFsc2U7DQoJfQ0K', '{}', 'ObjectHelper', 'VDM\\Joomla\\Utilities.ObjectHelper', '1.0.0', '{}', 'Utilities Object Helper', 'abstract class', '{}', '', 1, '2022-03-09 00:35:23', '2022-09-20 09:51:31', 15, 8), +(18, '', 'Some object tricks\r\n\r\n@since 3.0.9', '', '', '91004529-94a9-4590-b842-e7c6b624ecf5', '', '', '', '{}', 'CS8qKg0KCSAqIENoZWNrIGlmIGhhdmUgYW4gb2JqZWN0IHdpdGggYSBsZW5ndGgNCgkgKg0KCSAqIEBpbnB1dAlvYmplY3QgICBUaGUgb2JqZWN0IHRvIGNoZWNrDQoJICoNCgkgKiBAcmV0dXJucyBib29sIHRydWUgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGNoZWNrKCRvYm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ZSBpcyBhIG5vbmUgb2JqZWN0DQoJCS8vIHdlIGFyZSBub3QgY29tcGFyaW5nIG51bGwgYnV0IG9iamVjdHMNCgkJLy8gYnV0IHdlIGFsbG93IG51bGwgYXMgc29tZSBvYmplY3RzIHdoaWxlDQoJCS8vIG5vdCBpbnN0YW50aWF0ZSBhcmUgc3RpbGwgbnVsbA0KCQlpZiAoaXNfbnVsbCgkb2JqMSkgfHwgaXNfbnVsbCgkb2JqMikpDQoJCXsNCgkJCXJldHVybiBmYWxzZTsNCgkJfQ0KDQoJCS8vIENvbnZlcnQgdGhlIG9iamVjdHMgdG8gYXJyYXlzIG9mIHRoZWlyIHByb3BlcnR5IHZhbHVlcyB1c2luZyBnZXRfb2JqZWN0X3ZhcnMuDQoJCSRhcnJheTEgPSBnZXRfb2JqZWN0X3ZhcnMoJG9iajEpOw0KCQkkYXJyYXkyID0gZ2V0X29iamVjdF92YXJzKCRvYmoyKTsNCg0KCQkvLyBDb21wYXJlIHRoZSBhcnJheXMgdXNpbmcgYXJyYXlfZGlmZl9hc3NvYyB0byBkZXRlY3QgYW55IGRpZmZlcmVuY2VzLg0KCQkkZGlmZjEgPSBhcnJheV9kaWZmX2Fzc29jKCRhcnJheTEsICRhcnJheTIpOw0KCQkkZGlmZjIgPSBhcnJheV9kaWZmX2Fzc29jKCRhcnJheTIsICRhcnJheTEpOw0KDQoJCS8vIElmIHRoZSBhcnJheXMgaGF2ZSB0aGUgc2FtZSBrZXktdmFsdWUgcGFpcnMsIHRoZXkgd2lsbCBoYXZlIG5vIGRpZmZlcmVuY2VzLCBzbyByZXR1cm4gdHJ1ZS4NCgkJcmV0dXJuIGVtcHR5KCRkaWZmMSkgJiYgZW1wdHkoJGRpZmYyKTsNCgl9DQo=', '{}', 'ObjectHelper', 'VDM\\Joomla\\Utilities.ObjectHelper', '1.0.0', '{}', 'Utilities Object Helper', 'abstract class', '{}', '', 1, '2022-03-09 00:35:23', '2023-02-23 10:21:53', 19, 8), (19, '', 'Basic Math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XJuIGZsb2F0DQoJICogDQoJICogQHNpbmNlICAzLjAuOQ0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gc3VtKCRhcnJheSwgJHNjYWxlID0gNCkNCgl7DQoJCS8vIHVzZSB0aGUgYmNhZGQgZnVuY3Rpb24gaWYgYXZhaWxhYmxlDQoJCWlmIChmdW5jdGlvbl9leGlzdHMoJ2JjYWRkJykpDQoJCXsNCgkJCS8vIHNldCB0aGUgc3RhcnQgdmFsdWUNCgkJCSR2YWx1ZSA9IDAuMDsNCgkJCS8vIGxvb3AgdGhlIHZhbHVlcyBhbmQgcnVuIGJjYWRkDQoJCQlmb3JlYWNoKCRhcnJheSBhcyAkdmFsKQ0KCQkJew0KCQkJCSR2YWx1ZSA9IGJjYWRkKCR2YWx1ZSwgKHN0cmluZykgJHZhbCwgJHNjYWxlKTsNCgkJCX0NCgkJCXJldHVybiAkdmFsdWU7DQoJCX0NCgkJLy8gZmFsbCBiYWNrIG9uIGFycmF5IHN1bQ0KCQlyZXR1cm4gYXJyYXlfc3VtKCRhcnJheSk7DQoJfQ0K', '{}', 'MathHelper', 'VDM\\Joomla\\Utilities.MathHelper', '1.0.0', '{}', 'Utilities Math Helper', 'abstract class', '{}', '', 1, '2022-03-09 13:05:39', '2023-01-31 13:10:26', 13, 9), (20, '', 'Control the naming of a plugin\r\n\r\n@since 3.0.9', '', '', '3cf76fbf-fd95-4a33-878e-7aff6d36b7f6', '', '', '', '{}', 'CS8qKg0KCSAqIE1ha2luZyBwbHVnaW4gZm9sZGVyIG5hbWUgc2FmZQ0KCSAqDQoJICogQGlucHV0CXN0cmluZyAgICAkY29kZU5hbWUgICBUaGUgbmFtZQ0KCSAqIEBpbnB1dAlzdHJpbmcgICAgJGdyb3VwICAgVGhlIGdyb3VwIG5hbWUNCgkgKg0KCSAqIEByZXR1cm5zIHN0cmluZyBvbiBzdWNjZXNzDQoJICogDQoJICogQHNpbmNlICAzLjAuOQ0KCSAqLw0KCXB1Ymx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YXRpYyBmdW5jdGlvbiBzYWZlTGFuZ1ByZWZpeChzdHJpbmcgJGNvZGVOYW1lLCBzdHJpbmcgJGdyb3VwKTogc3RyaW5nDQoJew0KCQkvLyBlZGl0b3JzLXh0ZCBncm91cCBwbHVnaW5zIG11c3QgaGF2ZSBhIGNsYXNzIHdpdGggcGxnQnV0dG9uPFBsdWdpbk5hbWU+IHN0cnVjdHVyZQ0KCQlpZiAoJGdyb3VwID09PSAnZWRpdG9ycy14dGQnKQ0KCQl7DQoJCQkkZ3JvdXAgPSAnQnV0dG9uJzsNCgkJfQ0KDQoJCXJldHVybiAnUExHXycgLiBzdHJ0b3VwcGVyKCRncm91cCkgLiAnXycgLiBzdHJ0b3VwcGVyKA0KCQkJJGNvZGVOYW1lDQoJCSk7DQoJfQ0K', '{}', 'PluginHelper', 'VDM\\Joomla\\Utilities.String.PluginHelper', '1.0.0', '{}', 'String Plugin Helper', 'abstract class', '{}', '', 1, '2022-03-09 14:44:58', '2023-01-14 18:00:42', 16, 5), (21, 1, 'Global Unique ID Helper\r\n\r\n@since 3.0.9', '', '', '9c513baf-b279-43fd-ae29-a585c8cbc4f0', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTs=', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', 'CS8qKg0KCSAqIFJldHVybnMgYSBHVUlEdjQgc3RyaW5nDQoJICogDQoJICogVGhhbmtzIHRvIERhdmUgUGVhcnNvbiAoYW5kIG90aGVyKQ0KCSAqIGh0dHBzOi8vd3d3LnBocC5uZXQvbWFudWFsL2VuL2Z1bmN0aW9uLmNvbS1jcmVhdGUtZ3VpZC5waHAjMTE5MTY4IA0KCSAqDQoJICogVXNlcyB0aGUgYmVzdCBjcnlwdG9ncmFwaGljYWxseSBzZWN1cmUgbWV0aG9kDQoJICogZm9yIGFsbCBzdXBwb3J0Z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0NCgkJcmV0dXJuIGZhbHNlOw0KCX0NCg0KCS8qKg0KCSAqIFZhbGlkYXRlIHRoZSBHbG9iYWxseSBVbmlxdWUgSWRlbnRpZmllcg0KCSAqDQoJICogVGhhbmtzIHRvIExld2llDQoJICogaHR0cHM6Ly9zdGFja292ZXJmbG93LmNvbS9hLzE1MTU0NTYvMTQyOTY3Nw0KCSAqDQoJICogQHBhcmFtIHN0cmluZyAkZ3VpZA0KCSAqDQoJICogQHJldHVybiBib29sDQoJICoNCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHJvdGVjdGVkIHN0YXRpYyBmdW5jdGlvbiB2YWxpZGF0ZSgkZ3VpZCkNCgl7DQoJCS8vIGNoZWNrIGlmIHdlIGhhdmUgYSBzdHJpbmcNCgkJaWYgKFN0cmluZ0hlbHBlcjo6Y2hlY2soJGd1aWQpKQ0KCQl7DQoJCQlyZXR1cm4gcHJlZ19tYXRjaCgiL14oXHspP1thLWZcZF17OH0oLVthLWZcZF17NH0pezR9W2EtZlxkXXs4fSg/KDEpXH0pJC9pIiwgJGd1aWQpOw0KCQl9DQoJCXJldHVybiBmYWxzZTsNCgl9DQo=', '{}', 'GuidHelper', 'VDM\\Joomla\\Utilities.GuidHelper', '1.0.0', '{}', 'Utilities GuidHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-12 01:27:10', '2023-01-14 20:50:52', 17, 9), (22, 1, 'File helper\r\n\r\n@since 3.0.9', '', '', 'a223b31e-ea1d-4cdf-92ae-5f9becffaff0', 'dXNlIEpvb21sYVxDTVNcVXJpXFVyaTsNCnVzZSBKb29tbGFcQ01TXEZhY3Rvcnk7DQp1c2UgSm9vbWxhXENNU1xMYW5ndWFnZVxUZXh0Ow0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxQYXRoOw0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGaWxlOw0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGb2xkZXI7DQp1c2UgSm9vbWxhXEFyY2hpdmVcQXJjaGl2ZTs=', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"},\"load_selection2\":{\"load\":\"91004529-94a9-4590-b842-e7c6b624ecf5\"}}', 'CS8qKg0KCSAqIFRyaWdnZXIgZXJyb3Igbm90aWNlIG9ubHkgb25jZQ0KCSAqDQoJICogQHZhciAgICBib29sDQoJICoNCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHJvdGVjdGVkIHN0YXRpYyAkY3VybEVycm9yID0gZmFsc2U7DQoNCgkvKioNCgkgKiBUaGUgemlwcGVyIG1ldGhvZA0KCSAqIA0KCSAqIEBwYXJhbSAgc3RyaW5nICAgJHdvcmtpbmdEaXJlY3RvcnkgICAgVGhlIGRpcmVjdG9yeSB3aGVyZSB0aGUgaXRlbXMgbXVzdCBiZSB6aXBwZWQNCgkgKiBAcGFyYW0gIHN0cmluZyAgICRmaWxlcGF0aCAgICAgICAgICBUaGUgcGF0aCB0byB3aGVyZSB0aGUgemlwIGZpbGUgbXVzdCBiZSBwbGFjZWQNCgkgKg0KCSAqIEByZXR1cm4gIGJvb2wgdHJ1ZSAgIE9uIHN1Y2Nlc3MNCgkgKg0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHppcCgkd29ya2luZ0RpcmVjdG9yeSwgJiRmaWxlcGF0aCk6IGJvb2wNCgl7DQoJCS8vIHN0b3JlIHRoZSBjdXJyZW50IGpvb21sYSB3b3JraW5nIGRpcmVjdG9yeQ0KCQkkam9vbWxhID0gZ2V0Y3dkKCk7DQoNCgkJLy8gd2UgYXJlIGNoYW5naW5nIHRoZSB3b3JraW5nIGRpcmVjdG9yeSB0byB0aGUgY29tc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mZvKCRjaCwgQ1VSTElORk9fSFRUUF9DT0RFKTsNCgkJCQlpZiAoJHN0YXR1c0NvZGUgIT09IDQwNCkNCgkJCQl7DQoJCQkJCSRleGlzdHMgPSB0cnVlOw0KCQkJCX0NCgkJCX0NCgkJCS8vIGNsb3NlIHRoZSBjb25uZWN0aW9uDQoJCQljdXJsX2Nsb3NlKCRjaCk7DQoJCX0NCgkJZWxzZWlmICgkaGVhZGVycyA9IEBnZXRfaGVhZGVycygkcGF0aCkpDQoJCXsNCgkJCWlmKGlzc2V0KCRoZWFkZXJzWzBdKSAmJiBpc19zdHJpbmcoJGhlYWRlcnNbMF0pICYmIHN0cnBvcygkaGVhZGVyc1swXSwnNDA0JykgPT09IGZhbHNlKQ0KCQkJew0KCQkJCSRleGlzdHMgPSB0cnVlOw0KCQkJfQ0KCQl9DQoJCXJldHVybiAkZXhpc3RzOw0KCX0NCg==', '{}', 'FileHelper', 'VDM\\Joomla\\Utilities.FileHelper', '1.0.0', '{}', 'Utilities FileHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-12 02:09:18', '2023-02-05 17:42:56', 33, 9), -(23, 1, 'Some component helper\r\n\r\n@since 3.0.11', '', '', '640b5352-fb09-425f-a26e-cd44eda03f15', 'dXNlIEpvb21sYVxJbnB1dFxJbnB1dDsNCnVzZSBKb29tbGFcQ01TXENvbXBvbmVudFxDb21wb25lbnRIZWxwZXI7DQp1c2UgSm9vbWxhXFJlZ2lzdHJ5XFJlZ2lzdHJ5Ow==', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBjdXJyZW50IG9wdGlvbg0KCSAqDQoJICogQHZhciAgICBzdHJpbmcNCgkgKiBAc2luY2UgICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdGljIHN0cmluZyAkb3B0aW9uOw0KDQoJLyoqDQoJICogVGhlIGNvbXBvbmVudCBwYXJhbXMgbGlzdCBjYWNo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Component Helper', 'abstract class', '{}', '', 1, '2022-05-13 05:36:32', '2023-01-26 15:29:49', 27, 7), +(23, 1, 'Some component helper\r\n\r\n@since 3.0.11', '', '', '640b5352-fb09-425f-a26e-cd44eda03f15', 'dXNlIEpvb21sYVxJbnB1dFxJbnB1dDsNCnVzZSBKb29tbGFcQ01TXENvbXBvbmVudFxDb21wb25lbnRIZWxwZXI7DQp1c2UgSm9vbWxhXFJlZ2lzdHJ5XFJlZ2lzdHJ5Ow==', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBjdXJyZW50IG9wdGlvbg0KCSAqDQoJICogQHZhciAgICBzdHJpbmcNCgkgKiBAc2luY2UgICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdGljIHN0cmluZyAkb3B0aW9uOw0KDQoJLyoqDQoJICogVGhlIGNvbXBvbmVudCBwYXJhbXMgbGlzdCBjYWNoZQ0KCSAqDQoJICogQHZhciAgICBSZWdpc3RyeVtdDQoJICogQHNpbmNlICAgMy4wLjExDQoJICovDQoJcHJvdGVjdGVkIHN0YXRpYyBhcnJheSAkcGFyYW1zID0gW107DQoNCgkvKioNCgkgKiBHZXRzIHRoZSBwYXJhbWV0ZXIgb2JqZWN0IGZvciB0aGUgY29tcG9uZW50DQoJICoNCgkgKiBAcGFyYW0gICBzdHJpbmd8bnVsbCAgICAgJG9wdGlvbiAgVGhlIG9wdGlvbiBmb3IgdGhlIGNvbXBvbmVudC4NCgkgKg0KCSAqIEByZXR1cm4gIFJlZ2lzdHJ5ICAgICBBIFJlZ2lzdHJ5IG9iamVjdC4NCgkgKiBAc2VlICAgICBSZWdpc3RyeQ0KCSAqIEBzaW5jZSAgIDMuMC4xMQ0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gZ2V0UGFyYW1zKD9zdHJpbmcgJG9wdGlvbiA9IG51bGwpOiBSZWdpc3RyeQ0KCXsNCgkJLy8gY2hlY2sgdGhhdCB3ZSBoYXZlIGFuIG9wdGlvbg0KCQl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GUgaGVscGVyIGNsYXNzDQoJCWlmICgoJGhlbHBlciA9IHNlbGY6OmdldCgkb3B0aW9uLCBmYWxzZSkpICE9PSBmYWxzZSAmJg0KCQkJbWV0aG9kX2V4aXN0cygkaGVscGVyLCAkbWV0aG9kKSkNCgkJew0KCQkJLy8gd2Uga25vdyB0aGlzIGlzIG5vdCBpZGVhbC4uLg0KCQkJLy8gc28gd2UgbmVlZCB0byBtb3ZlIHRoZXNlDQoJCQkvLyBmdW5jdGlvbnMgdG8gdGhlaXIgb3duIGNsYXNzZXMNCgkJCXJldHVybiBjYWxsX3VzZXJfZnVuY19hcnJheShbJGhlbHBlciwgJG1ldGhvZF0sICAkYXJndW1lbnRzKTsNCgkJfQ0KDQoJCXJldHVybiBudWxsOw0KCX0NCg==', '{}', 'Helper', 'VDM\\Joomla\\Utilities.Component.Helper', '1.0.0', '{}', 'Utilities Component Helper', 'abstract class', '{}', '', 1, '2022-05-13 05:36:32', '2023-02-17 12:44:28', 28, 7), (24, 1, 'Image helper\r\n\r\n@since 3.0.11', '', '', '962b15d8-915f-4cd7-aea6-7cf82afdc20b', 'dXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGaWxlOw0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGb2xkZXI7DQp1c2UgSm9vbWxhXENNU1xVcmlcVXJpOw0KdXNlIEpvb21sYVxDTVNcSW1hZ2VcSW1hZ2U7', '', '', '{\"load_selection0\":{\"load\":\"91004529-94a9-4590-b842-e7c6b624ecf5\"},\"load_selection1\":{\"load\":\"f11dc790-713e-4706-9a85-a318ed3ad56e\"}}', 'CS8qKg0KCSAqIFJlc2l6ZSBhbiBpbWFnZQ0KCSAqDQoJICogQHBhcmFtICAgc3RyaW5nICAgICRmdWxsUGF0aCAgIFRoZSBmdWxsIHBhdGggdG8gdGhlIGltYWdlDQoJICogQHBhcmFtICAgc3RyaW5nICAgICR0eXBlICAgICAgICBUaGUgdHlwZSBvZiBpbWFnZQ0KCSAq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Utilities ImageHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-05-16 10:59:17', '2022-09-20 09:51:10', 21, 9), (25, 1, 'Upload Helper\r\n\r\n@since 3.0.11', '', '', 'd7600b43-771a-4747-9f5d-952765721799', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTsNCnVzZSBKb29tbGFcQ01TXExhbmd1YWdlXFRleHQ7DQp1c2UgSm9vbWxhXENNU1xGaWxlc3lzdGVtXEZpbGU7DQp1c2UgSm9vbWxhXENNU1xGaWxlc3lzdGVtXEZvbGRlcjsNCnVzZSBKb29tbGFcQ01TXEZpbGVzeXN0ZW1cUGF0aDs=', '', '', '{\"load_selection0\":{\"load\":\"f11dc790-713e-4706-9a85-a318ed3ad56e\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', 'CS8qKg0KCSAqIFRydWUgdG8gdXNlIHN0cmVhbXMNCgkgKg0KCSAqIEB2YXIgICAgYm9vbA0KCSAqDQoJICogQHNpbmNlICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdGljICR1c2VTdHJlYW1zID0gZmFsc2U7DQoNCgkvKioNCgkgKiBBbGxvdyB0aGUgdXBsb2FkIG9mIHVuc2FmZSBmaWxlcw0KCSAqDQoJICogQHZhciAgICBib29sDQoJICoNCgkgKiBAc2luY2UgIDMuMC4xMQ0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgJGFsbG93VW5zYWZlID0gZmFsc2U7DQoNCgkvKioNCgkgKiBPcHRpb25zIHRvIElucHV0RmlsdGVyOjppc1NhZmVGaWxlDQoJICoNCgkgKiBAdmFyICAgIGFycmF5DQoJICoNCgkgKiBAc2luY2UgIDMuMC4xMQ0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgJHNhZmVGaWxlT3B0aW9ucyA9IFtdOw0KDQoJLyoqDQoJICogU2V0IHRoZSBlcnJvciBiZ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bigkZnVsbFBhdGgpKTsNCgkJfQ0KCX0NCg0KCS8qKg0KCSAqIFNldCB0aGUgZXJyb3JzDQoJICoNCgkgKiBAcGFyYW0gIHN0cmluZyAgICAgICAgJG1lc3NhZ2UgICBUaGUgZXJyb3IgbWVzc2FnZQ0KCSAqDQoJICogQHJldHVybiAgdm9pZA0KCSAqIEBzaW5jZSAgMy4wLjExDQoJICovDQoJcHJvdGVjdGVkIHN0YXRpYyBmdW5jdGlvbiBzZXRFcnJvcigkbWVzc2FnZSkNCgl7DQoJCWlmIChzZWxmOjokZW5xdWV1ZUVycm9yKQ0KCQl7DQoJCQlGYWN0b3J5OjpnZXRBcHBsaWNhdGlvbigpLT5lbnF1ZXVlTWVzc2FnZSgkbWVzc2FnZSwgJ2Vycm9yJyk7DQoJCX0NCgkJZWxzZQ0KCQl7DQoJCQlzZWxmOjokZXJyb3JzW10gPSAkbWVzc2FnZTsNCgkJfQ0KCX0NCg==', '{}', 'UploadHelper', 'VDM\\Joomla\\Utilities.UploadHelper', '1.0.0', '{}', 'Utilities UploadHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-05-16 13:20:50', '2022-09-20 10:10:51', 37, 9), (26, '', 'Mime Helper\r\n\r\n@since 3.0.11', '', '', 'f11dc790-713e-4706-9a85-a318ed3ad56e', '', '', '', '{}', 'W0VYVEVSTkFMQ09ERT1odHRwczovL2dpc3QuZ2l0aHVidXNlcmNvbnRlbnQuY29tL0xsZXdlbGx5bnZkbS83NGJlMzczMzU3ZTEzMWI4Nzc1YTc1ODJjM2RlNTA4Yi9yYXcvbWltZV90eXBlcy5waHBdDQoNCltFWFRFUk5BTENPREU9aHR0cHM6Ly9naXN0LmdpdGh1YnVzZXJjb250ZW50LmNvbS9MbGV3ZWxseW52ZG0vNzRiZTM3MzM1N2UxMzFiODc3NWE3NTgyYzNkZTUwOGIvcmF3L2dldC5waHBdDQoNCltFWFRFUk5BTENPREU9aHR0cHM6Ly9naXN0LmdpdGh1YnVzZXJjb250ZW50LmNvbS9MbGV3ZWxseW52ZG0vNzRiZTM3MzM1N2UxMzFiODc3NWE3NTgyYzNkZTUwOGIvcmF3L2V4dGVuc2lvbnMucGhwXQ==', '{}', 'MimeHelper', 'VDM\\Joomla\\Utilities.MimeHelper', '1.0.0', '{}', 'Utilities MimeHelper', 'abstract class', '{}', '', 1, '2022-05-16 14:27:38', '2022-09-20 09:51:01', 6, 9), diff --git a/admin/views/import_joomla_components/tmpl/default.php b/admin/views/import_joomla_components/tmpl/default.php index f3a994ce9..1325b83e4 100644 --- a/admin/views/import_joomla_components/tmpl/default.php +++ b/admin/views/import_joomla_components/tmpl/default.php @@ -213,14 +213,14 @@ jQuery('
')
- packageInfo); ?> + owner($this->packageInfo); ?>
packageInfo['name']) && ComponentbuilderHelper::checkArray($this->packageInfo['name'])) : ?> - packageInfo); ?> + components($this->packageInfo); ?> diff --git a/componentbuilder.xml b/componentbuilder.xml index 799cdfa6b..317dc70ae 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 12th February, 2023 + 27th February, 2023 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.1.17 + 3.1.19 Component Builder (v.3.1.17) +

Component Builder (v.3.1.19)

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 0e22c1a2a..85c4c353f 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -1115,10 +1115,10 @@ pkg_component_builder package site - 3.1.17 + 3.1.19 https://dev.vdm.io - https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.1.17.zip + https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.1.19.zip stable diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/BaseConfig.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/BaseConfig.php index fe673b442..76c01e37b 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/BaseConfig.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/BaseConfig.php @@ -56,9 +56,6 @@ abstract class BaseConfig extends JoomlaRegistry $this->input = $input ?: Factory::getApplication()->input; $this->params = $params ?: Helper::getParams('com_componentbuilder'); - // use underscore as the separator - $this->separator = '_'; - // Instantiate the internal data object. $this->data = new \stdClass(); } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Data.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Data.php index cfb7bc801..fe3bc19bc 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Data.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Data.php @@ -31,6 +31,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Model\Sqltweaking; use VDM\Joomla\Componentbuilder\Compiler\Model\Adminviews; use VDM\Joomla\Componentbuilder\Compiler\Model\Siteviews; use VDM\Joomla\Componentbuilder\Compiler\Model\Customadminviews; +use VDM\Joomla\Componentbuilder\Compiler\Model\Updateserver; use VDM\Joomla\Componentbuilder\Compiler\Model\Joomlamodules; use VDM\Joomla\Componentbuilder\Compiler\Model\Joomlaplugins; use VDM\Joomla\Utilities\StringHelper; @@ -182,6 +183,14 @@ class Data */ protected Customadminviews $customadminviews; + /** + * The modelling Update Server + * + * @var Updateserver + * @since 3.2.0 + */ + protected Updateserver $updateserver; + /** * The modelling Joomla Modules * @@ -226,6 +235,7 @@ class Data * @param Adminviews|null $adminviews The modelling adminviews object. * @param Siteviews|null $siteviews The modelling siteviews object. * @param Customadminviews|null $customadminviews The modelling customadminviews object. + * @param Updateserver|null $updateserver The modelling update server object. * @param Joomlamodules|null $modules The modelling modules object. * @param Joomlaplugins|null $plugins The modelling plugins object. * @param \JDatabaseDriver|null $db The database object. @@ -238,8 +248,8 @@ class Data ?Field $field = null, ?FieldName $fieldName = null, ?UniqueName $uniqueName = null, ?Filesfolders $filesFolders = null, ?Historycomponent $history = null, ?Whmcs $whmcs = null, ?Sqltweaking $sqltweaking = null, ?Adminviews $adminviews = null, ?Siteviews $siteviews = null, - ?Customadminviews $customadminviews = null, ?Joomlamodules $modules = null, - ?Joomlaplugins $plugins = null, ?\JDatabaseDriver $db = null) + ?Customadminviews $customadminviews = null, ?Updateserver $updateserver = null, + ?Joomlamodules $modules = null, ?Joomlaplugins $plugins = null, ?\JDatabaseDriver $db = null) { $this->config = $config ?: Compiler::_('Config'); $this->event = $event ?: Compiler::_('Event'); @@ -258,6 +268,7 @@ class Data $this->adminviews = $adminviews ?: Compiler::_('Model.Adminviews'); $this->siteviews = $siteviews ?: Compiler::_('Model.Siteviews'); $this->customadminviews = $customadminviews ?: Compiler::_('Model.Customadminviews'); + $this->updateserver = $updateserver ?: Compiler::_('Model.Updateserver'); $this->modules = $modules ?: Compiler::_('Model.Joomlamodules'); $this->plugins = $plugins ?: Compiler::_('Model.Joomlaplugins'); $this->db = $db ?: Factory::getDbo(); @@ -397,10 +408,10 @@ class Data $this->whmcs->set($component); // set the footable switch - if ($component->addfootable) + if ($component->addfootable > 0) { // force add footable - $this->config->set('footable ', true); + $this->config->set('footable', true); // add the version $this->config->set('footable_version', (3 == $component->addfootable) ? 3 : 2); } @@ -472,15 +483,7 @@ class Data unset($component->addcontributors); // set the version updates - $component->version_update = (isset($component->version_update) - && JsonHelper::check($component->version_update)) - ? json_decode((string) $component->version_update, true) : null; - if (ArrayHelper::check($component->version_update)) - { - $component->version_update = array_values( - $component->version_update - ); - } + $this->updateserver->set($component); // build the build date if ($this->config->get('add_build_date', 1) == 3) @@ -569,11 +572,8 @@ class Data { foreach ($addScriptTypes as $scriptType) { - if (isset( - $component->{'add_' . $scriptMethod . '_' . $scriptType} - ) - && $component->{'add_' . $scriptMethod . '_' . $scriptType} - == 1 + if (isset($component->{'add_' . $scriptMethod . '_' . $scriptType}) + && $component->{'add_' . $scriptMethod . '_' . $scriptType} == 1 && StringHelper::check( $component->{$scriptMethod . '_' . $scriptType} )) @@ -795,14 +795,24 @@ class Data // reset back to now lang $this->config->lang_target = $nowLang; + // catch empty URL to update server TODO: we need to fix this in better way later + if ($component->add_update_server == 1 && $component->update_server_target !== 3 + && ( + !StringHelper::check($component->update_server_url) + || strpos($component->update_server_url, 'http') === false + )) + { + // we fall back to other, since we can't work with an empty update server URL + $component->add_update_server = 0; + $component->update_server_target = 3; + } + // add the update/sales server FTP details if that is the expected protocol $serverArray = array('update_server', 'sales_server'); foreach ($serverArray as $server) { if ($component->{'add_' . $server} == 1 - && is_numeric( - $component->{$server} - ) + && is_numeric($component->{$server}) && $component->{$server} > 0) { // get the server protocol diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Structuresingle.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Structuresingle.php index 6c9816daf..f9b357d17 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Structuresingle.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Structuresingle.php @@ -192,6 +192,9 @@ class Structuresingle // do README check $README = $this->doReadmeCheck(); + // do CHANGELOG check + $CHANGELOG = $this->doChangelogCheck(); + // start moving foreach ($this->settings->single() as $target => $details) { @@ -208,6 +211,12 @@ class Structuresingle continue; } + // if not needed do not add + if ($details->naam === 'CHANGELOG.md' && !$CHANGELOG) + { + continue; + } + // set new name $this->setNewName($details); @@ -264,12 +273,18 @@ class Structuresingle */ private function doReadmeCheck(): bool { - if ($this->component->get('addreadme', false)) - { - return true; - } + return (bool) $this->component->get('addreadme', false); + } - return false; + /** + * Check if changelog must be added + * + * @return bool + * @since 3.2.0 + */ + private function doChangelogCheck(): bool + { + return (bool) $this->component->get('changelog', false); } /** diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/PlaceholderInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/PlaceholderInterface.php index 50eb87ee2..d0ba2d281 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/PlaceholderInterface.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/PlaceholderInterface.php @@ -213,7 +213,7 @@ interface PlaceholderInterface * @return string * @since 3.2.0 */ - public function update(string $data, array &$placeholder, int $action = 1): string; + public function update(string $data, array $placeholder, int $action = 1): string; /** * Update the data with the active placeholders diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Data.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Data.php index ccee1a8d5..4fb42f201 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Data.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Data.php @@ -813,50 +813,47 @@ class Data $this->libraries->set($module->code_name, $module); // add PHP in module install - $module->add_install_script = false; - $addScriptMethods = array('php_preflight', + $module->add_install_script = true; + $addScriptMethods = [ + 'php_script', + 'php_preflight', 'php_postflight', - 'php_method'); - $addScriptTypes = array('install', 'update', - 'uninstall'); + 'php_method' + ]; + $addScriptTypes = [ + 'install', + 'update', + 'uninstall' + ]; // the next are php placeholders $guiMapper['type'] = 'php'; foreach ($addScriptMethods as $scriptMethod) { foreach ($addScriptTypes as $scriptType) { - if (isset( - $module->{'add_' . $scriptMethod . '_' - . $scriptType} - ) - && $module->{'add_' . $scriptMethod . '_' - . $scriptType} == 1 + if (isset($module->{'add_' . $scriptMethod . '_' . $scriptType}) + && $module->{'add_' . $scriptMethod . '_' . $scriptType} == 1 && StringHelper::check( $module->{$scriptMethod . '_' . $scriptType} )) { // set GUI mapper field - $guiMapper['field'] = $scriptMethod . '_' - . $scriptType; + $guiMapper['field'] = $scriptMethod . '_' . $scriptType; $module->{$scriptMethod . '_' . $scriptType} = $this->gui->set( $this->placeholder->update_( $this->customcode->update( base64_decode( - (string) $module->{$scriptMethod . '_' - . $scriptType} + (string) $module->{$scriptMethod . '_' . $scriptType} ) ) ), $guiMapper ); - $module->add_install_script = true; } else { unset($module->{$scriptMethod . '_' . $scriptType}); - $module->{'add_' . $scriptMethod . '_' - . $scriptType} - = 0; + $module->{'add_' . $scriptMethod . '_' . $scriptType} = 0; } } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Structure.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Structure.php index 87f9b7fff..d3d0d14c5 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Structure.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Structure.php @@ -307,19 +307,17 @@ class Structure // set install script if needed if ($module->add_install_script) { - $fileDetails = array('path' => $module->folder_path - . '/script.php', - 'name' => 'script.php', - 'zip' => 'script.php'); + $fileDetails = [ + 'path' => $module->folder_path . '/script.php', + 'name' => 'script.php', + 'zip' => 'script.php' + ]; $this->file->write( $fileDetails['path'], 'files->appendArray($module->key, $fileDetails); @@ -331,10 +329,11 @@ class Structure // set readme if found if ($module->addreadme) { - $fileDetails = array('path' => $module->folder_path - . '/README.md', - 'name' => 'README.md', - 'zip' => 'README.md'); + $fileDetails = [ + 'path' => $module->folder_path . '/README.md', + 'name' => 'README.md', + 'zip' => 'README.md' + ]; $this->file->write($fileDetails['path'], $module->readme); $this->files->appendArray($module->key, $fileDetails); @@ -369,10 +368,11 @@ class Structure $this->folder->create($module->folder_path . '/css'); // add the CSS file - $fileDetails = array('path' => $module->folder_path - . '/css/mod_admin.css', - 'name' => 'mod_admin.css', - 'zip' => 'mod_admin.css'); + $fileDetails = [ + 'path' => $module->folder_path . '/css/mod_admin.css', + 'name' => 'mod_admin.css', + 'zip' => 'mod_admin.css' + ]; $this->file->write( $fileDetails['path'], Placefix::_h('BOM') . PHP_EOL @@ -409,10 +409,11 @@ class Structure $this->folder->create($module->folder_path . '/js'); // add the CSS file - $fileDetails = array('path' => $module->folder_path - . '/js/mod_admin.js', - 'name' => 'mod_admin.js', - 'zip' => 'mod_admin.js'); + $fileDetails = [ + 'path' => $module->folder_path . '/js/mod_admin.js', + 'name' => 'mod_admin.js', + 'zip' => 'mod_admin.js' + ]; $this->file->write( $fileDetails['path'], Placefix::_h('BOM') . PHP_EOL @@ -484,11 +485,11 @@ class Structure foreach ($module->form_files as $file => $fields) { // set file details - $fileDetails = array('path' => $module->folder_path - . '/forms/' . $file . '.xml', - 'name' => $file . '.xml', - 'zip' => 'forms/' . $file - . '.xml'); + $fileDetails = [ + 'path' => $module->folder_path . '/forms/' . $file . '.xml', + 'name' => $file . '.xml', + 'zip' => 'forms/' . $file . '.xml' + ]; // build basic XML $xml = ''; diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Data.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Data.php index 1743d1052..29b92a5d3 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Data.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Data.php @@ -735,49 +735,44 @@ class Data $this->filesFolders->set($plugin); // add PHP in plugin install - $plugin->add_install_script = false; - $addScriptMethods = array('php_preflight', + $plugin->add_install_script = true; + $addScriptMethods = [ + 'php_preflight', 'php_postflight', - 'php_method'); - $addScriptTypes = array('install', 'update', - 'uninstall'); + 'php_method' + ]; + $addScriptTypes = [ + 'install', + 'update', + 'uninstall' + ]; foreach ($addScriptMethods as $scriptMethod) { foreach ($addScriptTypes as $scriptType) { - if (isset( - $plugin->{'add_' . $scriptMethod . '_' - . $scriptType} - ) - && $plugin->{'add_' . $scriptMethod . '_' - . $scriptType} == 1 + if (isset( $plugin->{'add_' . $scriptMethod . '_' . $scriptType}) + && $plugin->{'add_' . $scriptMethod . '_' . $scriptType} == 1 && StringHelper::check( $plugin->{$scriptMethod . '_' . $scriptType} )) { // set GUI mapper field - $guiMapper['field'] = $scriptMethod . '_' - . $scriptType; - $plugin->{$scriptMethod . '_' . $scriptType} - = $this->gui->set( + $guiMapper['field'] = $scriptMethod . '_' . $scriptType; + $plugin->{$scriptMethod . '_' . $scriptType} = $this->gui->set( $this->placeholder->update_( $this->customcode->update( base64_decode( - (string) $plugin->{$scriptMethod . '_' - . $scriptType} + (string) $plugin->{$scriptMethod . '_' . $scriptType} ) ) ), $guiMapper ); - $plugin->add_install_script = true; } else { unset($plugin->{$scriptMethod . '_' . $scriptType}); - $plugin->{'add_' . $scriptMethod . '_' - . $scriptType} - = 0; + $plugin->{'add_' . $scriptMethod . '_' . $scriptType} = 0; } } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Structure.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Structure.php index 225010c65..f8f2cbc63 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Structure.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Structure.php @@ -228,19 +228,17 @@ class Structure // set install script if needed if ($plugin->add_install_script) { - $fileDetails = array('path' => $plugin->folder_path - . '/script.php', - 'name' => 'script.php', - 'zip' => 'script.php'); + $fileDetails = [ + 'path' => $plugin->folder_path . '/script.php', + 'name' => 'script.php', + 'zip' => 'script.php' + ]; $this->file->write( $fileDetails['path'], 'files->appendArray($plugin->key, $fileDetails); @@ -252,10 +250,11 @@ class Structure // set readme if found if ($plugin->addreadme) { - $fileDetails = array('path' => $plugin->folder_path - . '/README.md', - 'name' => 'README.md', - 'zip' => 'README.md'); + $fileDetails = [ + 'path' => $plugin->folder_path . '/README.md', + 'name' => 'README.md', + 'zip' => 'README.md' + ]; $this->file->write($fileDetails['path'], $plugin->readme); $this->files->appendArray($plugin->key, $fileDetails); @@ -287,11 +286,11 @@ class Structure foreach ($plugin->form_files as $file => $fields) { // set file details - $fileDetails = array('path' => $plugin->folder_path - . '/forms/' . $file . '.xml', - 'name' => $file . '.xml', - 'zip' => 'forms/' . $file - . '.xml'); + $fileDetails = [ + 'path' => $plugin->folder_path . '/forms/' . $file . '.xml', + 'name' => $file . '.xml', + 'zip' => 'forms/' . $file . '.xml' + ]; // build basic XML $xml = ''; diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Loader.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Loader.php index aeecb07c4..d371c4418 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Loader.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Loader.php @@ -79,7 +79,7 @@ class Loader $this->registry-> set('builder.footable_scripts.' . $target . '.' . $key, true); - $this->config->set('footable ', true); + $this->config->set('footable', true); } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Updateserver.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Updateserver.php new file mode 100644 index 000000000..a81fa510f --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Updateserver.php @@ -0,0 +1,102 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Model; + + +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Componentbuilder\Compiler\Registry; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\JsonHelper; +use VDM\Joomla\Utilities\StringHelper; + + +/** + * Model Joomla Update Server Class + * + * @since 3.2.0 + */ +class Updateserver +{ + /** + * Compiler Registry Class + * + * @var Registry + * @since 3.2.0 + */ + protected Registry $registry; + + /** + * Constructor + * + * @param Registry|null $registry The compiler registry object. + * + * @since 3.2.0 + */ + public function __construct(?Registry $registry = null) + { + $this->registry = $registry ?: Compiler::_('Registry'); + } + + /** + * Set version updates + * + * @param object $item The item data + * + * @return void + * @since 3.2.0 + */ + public function set(object &$item) + { + // set the version updates + $item->version_update = (isset($item->version_update) + && JsonHelper::check($item->version_update)) + ? json_decode((string) $item->version_update, true) : null; + if (ArrayHelper::check($item->version_update)) + { + $item->version_update = array_values( + $item->version_update + ); + + // set the change log details + $this->changelog($item); + } + } + + /** + * Set changelog values to registry + * + * @param array $updates The update data + * + * @return void + * @since 3.2.0 + */ + protected function changelog(object &$item) + { + // set the version updates + foreach ($item->version_update as $update) + { + $bucket = []; + if (isset($update['change_log']) && StringHelper::check($update['change_log']) + && isset($update['version']) && StringHelper::check($update['version'])) + { + $bucket[] = '# v' . $update['version'] . PHP_EOL . PHP_EOL . $update['change_log']; + } + } + + if (ArrayHelper::check($bucket)) + { + $item->changelog = implode(PHP_EOL . PHP_EOL, $bucket); + } + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder.php index 15e4308dc..cb10955ca 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder.php @@ -368,7 +368,7 @@ class Placeholder implements PlaceholderInterface * @return string * @since 3.2.0 */ - public function update(string $data, array &$placeholder, int $action = 1): string + public function update(string $data, array $placeholder, int $action = 1): string { // make sure the placeholders is an array if (!ArrayHelper::check($placeholder)) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Component.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Component.php index 737c4206d..1cd89ebeb 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Component.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Component.php @@ -162,6 +162,7 @@ class Component implements ServiceProviderInterface $container->get('Model.Adminviews'), $container->get('Model.Siteviews'), $container->get('Model.Customadminviews'), + $container->get('Model.Updateserver'), $container->get('Model.Joomlamodules'), $container->get('Model.Joomlaplugins') ); diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Model.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Model.php index e8fae64f2..3650a8279 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Model.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Model.php @@ -52,6 +52,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Model\Whmcs; use VDM\Joomla\Componentbuilder\Compiler\Model\Filesfolders; use VDM\Joomla\Componentbuilder\Compiler\Model\Modifieddate; use VDM\Joomla\Componentbuilder\Compiler\Model\Createdate; +use VDM\Joomla\Componentbuilder\Compiler\Model\Updateserver; /** @@ -173,15 +174,18 @@ class Model implements ServiceProviderInterface $container->alias(Whmcs::class, 'Model.Whmcs') ->share('Model.Whmcs', [$this, 'getModelWhmcs'], true); - $container->alias(Filesfolders::class, 'Model.Filesfolders') - ->share('Model.Filesfolders', [$this, 'getModelFilesfolders'], true); - $container->alias(Modifieddate::class, 'Model.Modifieddate') ->share('Model.Modifieddate', [$this, 'getModifieddate'], true); $container->alias(Createdate::class, 'Model.Createdate') ->share('Model.Createdate', [$this, 'getCreatedate'], true); + $container->alias(Updateserver::class, 'Model.Updateserver') + ->share('Model.Updateserver', [$this, 'getUpdateserver'], true); + + $container->alias(Filesfolders::class, 'Model.Filesfolders') + ->share('Model.Filesfolders', [$this, 'getModelFilesfolders'], true); + $container->alias(ServerLoad::class, 'Model.Server.Load') ->share('Model.Server.Load', [$this, 'getServerLoad'], true); } @@ -758,6 +762,21 @@ class Model implements ServiceProviderInterface return new Createdate(); } + /** + * Get the update server Model + * + * @param Container $container The DI container. + * + * @return Updateserver + * @since 3.2.0 + */ + public function getUpdateserver(Container $container): Updateserver + { + return new Updateserver( + $container->get('Registry') + ); + } + /** * Get the files folders Model * diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt.php index 3827e21fe..27ad5fb79 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt.php @@ -13,7 +13,11 @@ namespace VDM\Joomla\Componentbuilder; use VDM\Joomla\Componentbuilder\Crypt\FOF; +use VDM\Joomla\Componentbuilder\Crypt\Aes; +use VDM\Joomla\Componentbuilder\Crypt\Aes\Legacy; use VDM\Joomla\Componentbuilder\Crypt\Password; +use VDM\Joomla\Componentbuilder\Interfaces\Cryptinterface; +use VDM\Joomla\Utilities\StringHelper; /** @@ -32,6 +36,22 @@ class Crypt */ protected FOF $fof; + /** + * The Crypt AES CBC class + * + * @var Aes + * @since 3.2.0 + */ + protected Aes $aes; + + /** + * The Crypt AES Legacy class + * + * @var Legacy + * @since 3.2.0 + */ + protected Legacy $legacy; + /** * The Password class * @@ -46,7 +66,11 @@ class Crypt * @var array * @since 3.2.0 */ - protected array $options = ['basic' => true, 'medium' => true]; + protected array $options = [ + 'basic' => 'fof', + 'medium' => 'fof', + 'local' => 'aes' + ]; /** * Active passwords @@ -54,19 +78,23 @@ class Crypt * @var array * @since 3.2.0 */ - protected array $passwords = ['basic' => null, 'medium' => null]; + protected array $passwords = []; /** * Constructor * * @param FOF $fof The FOF class + * @param Aes $aes The AES CBC class + * @param Legacy $legacy The AES Legacy class * @param Password $password The Password class * * @since 3.2.0 */ - public function __construct(FOF $fof, Password $password) + public function __construct(FOF $fof, Aes $aes, Legacy $legacy, Password $password) { $this->fof = $fof; + $this->aes = $aes; + $this->legacy = $legacy; $this->password = $password; } @@ -74,18 +102,19 @@ class Crypt * Encrypt a string as needed * * @param string $string The string to encrypt - * @param string $method The encryption method to use - * @param string|null $default The default password + * @param string $method The encryption method to use + * @param string|null $password The password * * @return string * @since 3.2.0 **/ public function encrypt(string $string, string $method, - ?string $default = null): string + ?string $password = null): string { - if (($password = $this->getPassword($method, $default)) !== null) + if (($password = $this->getPassword($method, $password)) !== null + && ($name = $this->getClassName($method)) !== null) { - return $this->fof->encrypt($string, $password); + return $this->{$name}->encrypt($string, $password); } return $string; @@ -104,49 +133,152 @@ class Crypt public function decrypt(string $string, string $method, ?string $default = null): string { - if (($password = $this->getPassword($method, $default)) !== null) + if (($password = $this->getPassword($method, $default)) !== null + && ($name = $this->getClassName($method)) !== null) { - return $this->fof->decrypt($string, $password); + return $this->{$name}->decrypt($string, $password); } return $string; } /** - * Check if a decryption method exist and is supported - * - * @param string $method The encryption method to find - * - * @return bool true it it exist + * Check if a decryption method exist and is supported + * + * @param string $method The encryption method to find + * + * @return bool true if it exist * @since 3.2.0 - **/ + **/ public function exist(string $method): bool { - return $this->options[$method] ?? false; + return is_string($this->getClassName($method)) ?? false; + } + + /** + * Get crypto class name to use + * + * @param string $method The encryption method to find + * + * @return string|null The crypto class name + * @since 3.2.0 + **/ + private function getClassName(string $method): ?string + { + if (($name = $this->getClassNameFromRegistry($method)) !== null) + { + return $name; + } + + return $this->getClassNameFromOptions($method); + } + + /** + * Get the crypto class name from the registry + * + * @param string $method The encryption method to use + * + * @return string|null The crypto class name, or null if not found + * @since 3.2.0 + **/ + private function getClassNameFromRegistry(string $method): ?string + { + $name = $this->name($method); + + if (isset($this->{$name}) && $this->{$name} instanceof Cryptinterface) + { + return $name; + } + + return null; + } + + /** + * Get the crypto class name for the given encryption method and options + * + * @param string $method The encryption method to use + * + * @return string|null The crypto class name, or null if not found + * @since 3.2.0 + **/ + private function getClassNameFromOptions(string $method): ?string + { + $key = $this->getPasswordKey($method); + + if (isset($this->options[$key])) + { + $name = $this->options[$key]; + + if (isset($this->{$name}) && $this->{$name} instanceof Cryptinterface) + { + return $name; + } + } + + return null; } /** * Get the password * - * @param string $method The encryption method to find - * @param string|null $default The default password + * @param string $method The encryption method to find + * @param string|null $password The password * * @return string|null the password or null * @since 3.2.0 **/ - protected function getPassword(string $method, ?string $default = null): ?string + private function getPassword(string $method, ?string $password = null): ?string { - if ($this->exist($method)) + if (StringHelper::check($password)) { - if (empty($this->passwords[$method])) - { - $this->passwords[$method] = $this->password->get($method, $default); - } - - return $this->passwords[$method]; + return $password; } - return null; + // get password key name + $key = $this->getPasswordKey($method); + + if (empty($this->passwords[$key])) + { + $this->passwords[$key] = $this->password->get($key); + } + + return $this->passwords[$key]; + } + + /** + * Get the key + * + * @param string $method The encryption method to find + * + * @return string the password key name + * @since 3.2.0 + **/ + private function getPasswordKey(string $method): string + { + if (($pos = strpos($method, '.')) !== false) + { + return substr($method, 0, $pos); + } + + return $method; + } + + /** + * Get the class name + * + * @param string $method The encryption method to find + * + * @return string the class name + * @since 3.2.0 + **/ + private function name(string $method): string + { + if (($pos = strpos($method, '.')) !== false) + { + return substr($method, $pos + 1); + } + + return $method; } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/Aes.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/Aes.php new file mode 100644 index 000000000..e940f57ca --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/Aes.php @@ -0,0 +1,131 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Crypt; + + +use phpseclib3\Crypt\AES as BASEAES; +use VDM\Joomla\Componentbuilder\Crypt\Random; +use VDM\Joomla\Componentbuilder\Interfaces\Cryptinterface; + + +/** + * Class for Aes Encryption + * + * @since 3.2.0 + */ +class Aes implements Cryptinterface +{ + /** + * The Aes class + * + * @var BASEAES + * @since 3.2.0 + */ + protected BASEAES $aes; + + /** + * The Random class + * + * @var Random + * @since 3.2.0 + */ + protected Random $random; + + /** + * The block size + * + * @var int + * @since 3.2.0 + */ + protected int $size = 256; + + /** + * Constructor + * + * @param BASEAES $aes The Aes class + * @param Random $random The Random class + * + * @since 3.2.0 + */ + public function __construct(BASEAES $aes, Random $random) + { + $this->aes = $aes; + $this->random = $random; + + // we set the length once + $this->aes->setKeyLength($this->size); + + // enable padding + $this->aes->enablePadding(); + } + + /** + * Encrypt a string as needed + * + * @param string $string The string to encrypt + * @param string $key The encryption key + * + * @return string + * @since 3.2.0 + **/ + public function encrypt(string $string, string $key): string + { + // we get the IV length + $iv_length = (int) $this->aes->getBlockLength() >> 3; + + // get the IV value + $iv = $this->random::string($iv_length); + + // Load the IV + $this->aes->setIV($iv); + + // set the password + $this->aes->setPassword($key, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt'); + + // encrypt the string, and base 64 encode the result + return base64_encode($iv . $this->aes->encrypt($string)); + } + + /** + * Decrypt a string as needed + * + * @param string $string The string to decrypt + * @param string $key The decryption key + * + * @return string + * @since 3.2.0 + **/ + public function decrypt(string $string, string $key): string + { + // we get the IV length + $iv_length = (int) $this->aes->getBlockLength() >> 3; + + // remove base 64 encoding + $string = base64_decode($string); + + // get the IV + $iv = substr($string, 0, $iv_length); + + // remove the IV + $string = substr($string, $iv_length); + + // set the IV + $this->aes->setIV($iv); + + // set the password + $this->aes->setPassword($key, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt'); + + return $this->aes->decrypt($string); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/Aes/Legacy.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/Aes/Legacy.php new file mode 100644 index 000000000..e73c5bd42 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/Aes/Legacy.php @@ -0,0 +1,117 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Crypt\Aes; + + +use phpseclib3\Crypt\AES as BASEAES; +use VDM\Joomla\Componentbuilder\Interfaces\Cryptinterface; + + +/** + * Legacy Class for Aes Encryption + * + * @since 3.2.0 + */ +class Legacy implements Cryptinterface +{ + /** + * The Aes class + * + * @var BASEAES + * @since 3.2.0 + */ + protected BASEAES $aes; + + /** + * The block size + * + * @var int + * @since 3.2.0 + */ + protected int $size = 128; + + /** + * Constructor + * + * @param BASEAES $aes The Aes class + * + * @since 3.2.0 + */ + public function __construct(BASEAES $aes) + { + $this->aes = $aes; + + // we set the length once + $this->aes->setKeyLength($this->size); + + // enable padding + $this->aes->enablePadding(); + } + + /** + * Encrypt a string as needed + * + * @param string $string The string to encrypt + * @param string $key The encryption key + * + * @return string + * @since 3.2.0 + **/ + public function encrypt(string $string, string $key): string + { + // we get the IV length + $iv_length = (int) $this->aes->getBlockLength() >> 3; + + // get the IV value + $iv = str_repeat("\0", $iv_length); + + // Load the IV + $this->aes->setIV($iv); + + // set the password + $this->aes->setPassword($key, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt'); + + // encrypt the string, and base 64 encode the result + return base64_encode($this->aes->encrypt($string)); + } + + /** + * Decrypt a string as needed + * + * @param string $string The string to decrypt + * @param string $key The decryption key + * + * @return string + * @since 3.2.0 + **/ + public function decrypt(string $string, string $key): string + { + // remove base 64 encoding + $string = base64_decode($string); + + // we get the IV length + $iv_length = (int) $this->aes->getBlockLength() >> 3; + + // get the IV value + $iv = str_repeat("\0", $iv_length); + + // Load the IV + $this->aes->setIV($iv); + + // set the password + $this->aes->setPassword($key, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt'); + + return $this->aes->decrypt($string); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/Aes/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/Aes/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/Aes/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/Password.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/Password.php index 90076dc80..de5e7903c 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/Password.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/Password.php @@ -12,6 +12,7 @@ namespace VDM\Joomla\Componentbuilder\Crypt; +use Joomla\CMS\Language\Text; use VDM\Joomla\Utilities\Component\Helper; @@ -34,13 +35,34 @@ class Password */ public function get(string $type, ?string $default = null): ?string { - if (($password = Helper::_('getCryptKey', [$type, $default])) !== null) + // we have a local key for JCB only use + if ('local' === $type) + { + return $this->local(); + } + elseif (($password = Helper::_('getCryptKey', [$type, $default])) !== null) { return $password; } return $default; } + + /** + * Get the local password + * + * @return string + * @since 3.2.0 + */ + private function local(): string + { + return base64_decode( + Text::sprintf( + 'COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAESFLVVXJTMTHREEJTWOIXM', + 'QzdmV', '9kQ' + ) + ); + } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Package/Display/Details.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Package/Display/Details.php new file mode 100644 index 000000000..9b63d9d96 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Package/Display/Details.php @@ -0,0 +1,281 @@ + 'COM_COMPONENTBUILDER_DTCOMPANYDTDDSDD', + 'owner' => 'COM_COMPONENTBUILDER_DTOWNERDTDDSDD', + 'email' => 'COM_COMPONENTBUILDER_DTEMAILDTDDSDD', + 'website' => 'COM_COMPONENTBUILDER_DTWEBSITEDTDDSDD', + 'license' => 'COM_COMPONENTBUILDER_DTLICENSEDTDDSDD', + 'copyright' => 'COM_COMPONENTBUILDER_DTCOPYRIGHTDTDDSDD' + ]; + + /** + * The Component details template + * + * @var array + * @since 3.2.0 + */ + private array $component = [ + 'ul' => [ + 'companyname' => 'COM_COMPONENTBUILDER_ICOMPANYI_BSB', + 'author' => 'COM_COMPONENTBUILDER_IAUTHORI_BSB', + 'email' => 'COM_COMPONENTBUILDER_IEMAILI_BSB', + 'website' => 'COM_COMPONENTBUILDER_IWEBSITEI_BSB', + ], + 'other' => [ + 'license' => 'COM_COMPONENTBUILDER_HFOUR_CLASSNAVHEADERLICENSEHFOURPSP', + 'copyright' => 'COM_COMPONENTBUILDER_HFOUR_CLASSNAVHEADERCOPYRIGHTHFOURPSP' + ] + ]; + + /** + * get the JCB package owner details display + * + * @param array $info The package info object + * @param bool $trust The trust switch + * + * @return string + * @since 3.2.0 + **/ + public function owner(array $info, $trust = false): string + { + $hasOwner = false; + + $ownerDetails = '

'; + $ownerDetails .= '
'; + + // load the list items + foreach ($this->owner as $key => $dd) + { + if ($value = $this->getInfoValue($key, $info)) + { + $ownerDetails .= Text::sprintf($dd, $value); + + // check if we have a owner/source name + if (('owner' === $key || 'company' === $key) && !$hasOwner) + { + $hasOwner = true; + $owner = $value; + } + } + } + $ownerDetails .= '
'; + + // provide some details to how the user can get a key + if ($hasOwner && isset($info['getKeyFrom']['buy_link']) && StringHelper::check($info['getKeyFrom']['buy_link'])) + { + $ownerDetails .= '
'; + $ownerDetails .= Text::sprintf('COM_COMPONENTBUILDER_BGET_THE_KEY_FROMB_A_SSA', 'class="btn btn-primary" href="' . $info['getKeyFrom']['buy_link'] . '" target="_blank" title="get a key from ' . $owner . '"', $owner); + } + // add more custom links + elseif ($hasOwner && isset($info['getKeyFrom']['buy_links']) && ArrayHelper::check($info['getKeyFrom']['buy_links'])) + { + $buttons = array(); + foreach ($info['getKeyFrom']['buy_links'] as $keyName => $link) + { + $buttons[] = Text::sprintf('COM_COMPONENTBUILDER_BGET_THE_KEY_FROM_SB_FOR_A_SSA', $owner, 'class="btn btn-primary" href="' . $link . '" target="_blank" title="get a key from ' . $owner . '"', $keyName); + } + $ownerDetails .= '
'; + $ownerDetails .= implode('
', $buttons); + } + + // return the owner details + if (!$hasOwner) + { + $ownerDetails = '

' . Text::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND') . '

'; + + if (!$trust) + { + $ownerDetails .= '

' . Text::_('COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE') . '

'; + } + } + + return '
'.$ownerDetails.'
'; + } + + /** + * Check if info details has owner values set + * + * @param array $info The package info object + * + * @return bool + * @since 3.2.0 + **/ + public function hasOwner(array &$info): bool + { + if ($this->getInfoValue('owner', $info) || $this->getInfoValue('company', $info)) + { + return true; + } + + return false; + } + + /** + * get the JCB package components details display + * + * @param array $info The package info object + * + * @return string + * @since 3.2.0 + **/ + public function components(array &$info): string + { + // check if these components need a key + $needKey = $this->hasKey($info); + + if (isset($info['name']) && ArrayHelper::check($info['name'])) + { + $cAmount = count((array) $info['name']); + $class2 = ($cAmount == 1) ? 'span12' : 'span6'; + $counter = 1; + $display = array(); + foreach ($info['name'] as $key => $value) + { + // set the name + $name = $value . ' v' . $info['component_version'][$key]; + if ($cAmount > 1 && $counter == 3) + { + $display[] = ''; + $counter = 1; + } + if ($cAmount > 1 && $counter == 1) + { + $display[] = '
'; + } + $display[] = '
'; + $display[] = '

'; + $display[] = $name; + if ($needKey) + { + $display[] = ' - ' . Text::sprintf('COM_COMPONENTBUILDER_PAIDLOCKED') . ''; + } + else + { + $display[] = ' - ' . Text::sprintf('COM_COMPONENTBUILDER_FREEOPEN') . ''; + } + $display[] = '

'; + $display[] = $info['short_description'][$key]; + $display[] = '

'; + $display[] = '
    '; + + // load the list items + foreach ($this->component['ul'] as $li => $value) + { + if (isset($info[$li]) && isset($info[$li][$key])) + { + $display[] = '
  • '.Text::sprintf($value, $info[$li][$key]).'
  • '; + } + } + $display[] = '
'; + + // if we have a source link we add it + if (isset($info['joomla_source_link']) && ArrayHelper::check($info['joomla_source_link']) && isset($info['joomla_source_link'][$key]) && StringHelper::check($info['joomla_source_link'][$key])) + { + $display[] = '' . Text::_('COM_COMPONENTBUILDER_SOURCE_CODE') . ''; + } + + // load other + foreach ($this->component['other'] as $other => $value) + { + if (isset($info[$other]) && isset($info[$other][$key])) + { + $display[] = Text::sprintf($value, $info[$other][$key]); + } + } + + $display[] = '
'; + + $counter++; + } + + // close the div if needed + if ($cAmount > 1) + { + $display[] = '
'; + } + + return implode(PHP_EOL, $display); + } + + return '
' . Text::_('COM_COMPONENTBUILDER_NO_COMPONENT_DETAILS_FOUND_SO_IT_IS_NOT_SAFE_TO_CONTINUE') . '
'; + } + + /** + * get the value from INFO array + * + * @param string $key The value key + * @param array $info The package info object + * + * @return string|null + * @since 3.2.0 + **/ + private function getInfoValue(string $key, array &$info): ?string + { + $source = (isset($info['source']) && isset($info['source'][$key])) ? 'source' : ((isset($info['getKeyFrom']) && isset($info['getKeyFrom'][$key])) ? 'getKeyFrom' : null); + if ($source && StringHelper::check($info[$source][$key])) + { + return $info[$source][$key]; + } + return null; + } + + /** + * Check if the JCB package has a key + * + * @param array $info The package info object + * + * @return bool + * @since 3.2.0 + **/ + private function hasKey(array &$info): bool + { + // check the package key status + if (!isset($info['key'])) + { + if (isset($info['getKeyFrom']) && isset($info['getKeyFrom']['owner'])) + { + // has a key + $info['key'] = true; + } + else + { + // does not have a key + $info['key'] = false; + } + } + + return (bool) $info['key']; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Package/Display/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Package/Display/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Package/Display/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Package/Factory.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Package/Factory.php index 1bc9497ce..e5225d81b 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Package/Factory.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Package/Factory.php @@ -16,6 +16,7 @@ use Joomla\DI\Container; use VDM\Joomla\Componentbuilder\Service\Crypt; use VDM\Joomla\Componentbuilder\Package\Service\Database; use VDM\Joomla\Componentbuilder\Service\Server; +use VDM\Joomla\Componentbuilder\Package\Service\Display; use VDM\Joomla\Componentbuilder\Interfaces\FactoryInterface; @@ -74,7 +75,8 @@ abstract class Factory implements FactoryInterface return (new Container()) ->registerServiceProvider(new Database()) ->registerServiceProvider(new Crypt()) - ->registerServiceProvider(new Server()); + ->registerServiceProvider(new Server()) + ->registerServiceProvider(new Display()); } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Package/Service/Display.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Package/Service/Display.php new file mode 100644 index 000000000..5dfbe4f9f --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Package/Service/Display.php @@ -0,0 +1,55 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Package\Service; + + +use Joomla\DI\Container; +use Joomla\DI\ServiceProviderInterface; +use VDM\Joomla\Componentbuilder\Package\Display\Details; + + +/** + * Display Service Provider + * + * @since 3.2.0 + */ +class Display implements ServiceProviderInterface +{ + /** + * Registers the service provider with a DI container. + * + * @param Container $container The DI container. + * + * @return void + * @since 3.2.0 + */ + public function register(Container $container) + { + $container->alias(Details::class, 'Display.Details') + ->share('Display.Details', [$this, 'getDetails'], true); + } + + /** + * Get the Display Details + * + * @param Container $container The DI container. + * + * @return Details + * @since 3.2.0 + */ + public function getDetails(Container $container): Details + { + return new Details(); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Ftp.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Ftp.php index 038356148..792332f89 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Ftp.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Ftp.php @@ -15,6 +15,7 @@ namespace VDM\Joomla\Componentbuilder\Server; use Joomla\CMS\Client\FtpClient; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; use VDM\Joomla\Componentbuilder\Interfaces\Serverinterface; @@ -39,7 +40,7 @@ class Ftp implements Serverinterface * @var object * @since 3.2.0 **/ - protected object $details; + protected ?object $details = null; /** * set the server details @@ -51,8 +52,15 @@ class Ftp implements Serverinterface **/ public function set(object $details): Ftp { - // set the details - $this->details = $details; + // we need to make sure the if the details changed to get a new server client + if (!ObjectHelper::equal($details, $this->details)) + { + // set the details + $this->details = $details; + + // reset the client if it was set before + $this->client = null; + } return $this; } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Sftp.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Sftp.php index cfef0137f..d27246049 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Sftp.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Sftp.php @@ -16,6 +16,7 @@ use phpseclib3\Net\SFTP as SftpClient; use VDM\Joomla\Componentbuilder\Crypt\KeyLoader; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\FileHelper; +use VDM\Joomla\Utilities\ObjectHelper; use VDM\Joomla\Componentbuilder\Interfaces\Serverinterface; @@ -48,7 +49,7 @@ class Sftp implements Serverinterface * @var object * @since 3.2.0 **/ - protected object $details; + protected ?object $details = null; /** * Constructor @@ -72,8 +73,15 @@ class Sftp implements Serverinterface **/ public function set(object $details): Sftp { - // set the details - $this->details = $details; + // we need to make sure the if the details changed to get a new server client + if (!ObjectHelper::equal($details, $this->details)) + { + // set the details + $this->details = $details; + + // reset the client if it was set before + $this->client = null; + } return $this; } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Service/Crypt.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Service/Crypt.php index 290e79a0a..65947df85 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Service/Crypt.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Service/Crypt.php @@ -14,14 +14,14 @@ namespace VDM\Joomla\Componentbuilder\Service; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; -use phpseclib3\Crypt\AES; -use phpseclib3\Crypt\Rijndael; -use phpseclib3\Crypt\DES; +use phpseclib3\Crypt\AES as BASEAES; use VDM\Joomla\Componentbuilder\Crypt as Crypto; use VDM\Joomla\Componentbuilder\Crypt\KeyLoader; use VDM\Joomla\Componentbuilder\Crypt\Random; use VDM\Joomla\Componentbuilder\Crypt\Password; use VDM\Joomla\Componentbuilder\Crypt\FOF; +use VDM\Joomla\Componentbuilder\Crypt\Aes; +use VDM\Joomla\Componentbuilder\Crypt\Aes\Legacy; /** @@ -50,45 +50,20 @@ class Crypt implements ServiceProviderInterface $container->alias(Password::class, 'Crypt.Password') ->share('Crypt.Password', [$this, 'getPassword'], true); - $container->alias(FOF::class, 'Crypt.FOF') - ->share('Crypt.FOF', [$this, 'getFOF'], true); - $container->alias(KeyLoader::class, 'Crypt.Key') ->share('Crypt.Key', [$this, 'getKeyLoader'], true); - $container->alias(AES::class, 'Crypt.AES') - ->share('Crypt.AES', [$this, 'getAesCBC'], true) - ->share('Crypt.AES.CBC', [$this, 'getAesCBC'], true) - ->share('Crypt.AES.CTR', [$this, 'getAesCTR'], true) - ->share('Crypt.AES.ECB', [$this, 'getAesECB'], true) - ->share('Crypt.AES.CBC3', [$this, 'getAesCBC3'], true) - ->share('Crypt.AES.CFB', [$this, 'getAesCFB'], true) - ->share('Crypt.AES.CFB8', [$this, 'getAesCFB8'], true) - ->share('Crypt.AES.OFB', [$this, 'getAesOFB'], true) - ->share('Crypt.AES.GCM', [$this, 'getAesGCM'], true); + $container->alias(BASEAES::class, 'Crypt.AESCBC') + ->share('Crypt.AESCBC', [$this, 'getBASEAESCBC'], false); - $container->alias(Rijndael::class, 'Crypt.Rijndael') - ->share('Crypt.Rijndael', [$this, 'getRijndaelCBC'], true) - ->share('Crypt.Rijndael.CBC', [$this, 'getRijndaelCBC'], true) - ->share('Crypt.Rijndael.CTR', [$this, 'getRijndaelCTR'], true) - ->share('Crypt.Rijndael.ECB', [$this, 'getRijndaelECB'], true) - ->share('Crypt.Rijndael.CBC3', [$this, 'getRijndaelCBC3'], true) - ->share('Crypt.Rijndael.CFB', [$this, 'getRijndaelCFB'], true) - ->share('Crypt.Rijndael.CFB8', [$this, 'getRijndaelCFB8'], true) - ->share('Crypt.Rijndael.OFB', [$this, 'getRijndaelOFB'], true) - ->share('Crypt.Rijndael.GCM', [$this, 'getRijndaelGCM'], true); + $container->alias(FOF::class, 'Crypt.FOF') + ->share('Crypt.FOF', [$this, 'getFOF'], true); - $container->alias(DES::class, 'Crypt.DES') - ->share('Crypt.DES', [$this, 'getDesCBC'], true) - ->share('Crypt.DES.CBC', [$this, 'getDesCBC'], true) - ->share('Crypt.DES.CTR', [$this, 'getDesCTR'], true) - ->share('Crypt.DES.ECB', [$this, 'getDesECB'], true) - ->share('Crypt.DES.CBC3', [$this, 'getDesCBC3'], true) - ->share('Crypt.DES.CFB', [$this, 'getDesCFB'], true) - ->share('Crypt.DES.CFB8', [$this, 'getDesCFB8'], true) - ->share('Crypt.DES.OFB', [$this, 'getDesOFB'], true) - ->share('Crypt.DES.GCM', [$this, 'getDesGCM'], true) - ->share('Crypt.DES.STREAM', [$this, 'getDesSTREAM'], true); + $container->alias(Aes::class, 'Crypt.AES.CBC') + ->share('Crypt.AES.CBC', [$this, 'getAesCBC'], true); + + $container->alias(Legacy::class, 'Crypt.AES.LEGACY') + ->share('Crypt.AES.LEGACY', [$this, 'getAesLEGACY'], true); } /** @@ -103,6 +78,8 @@ class Crypt implements ServiceProviderInterface { return new Crypto( $container->get('Crypt.FOF'), + $container->get('Crypt.AES.CBC'), + $container->get('Crypt.AES.LEGACY'), $container->get('Crypt.Password') ); } @@ -133,22 +110,6 @@ class Crypt implements ServiceProviderInterface return new Random(); } - /** - * Get the FOF AES Cyper with CBC mode - * - * @param Container $container The DI container. - * - * @return FOF - * @since 3.2.0 - */ - public function getFOF(Container $container): FOF - { - return new FOF( - $container->get('Crypt.AES.CBC'), - $container->get('Crypt.Random') - ); - } - /** * Get the KeyLoader class * @@ -167,324 +128,59 @@ class Crypt implements ServiceProviderInterface * * @param Container $container The DI container. * - * @return AES + * @return BASEAES * @since 3.2.0 */ - public function getAesCBC(Container $container): AES + public function getBASEAESCBC(Container $container): BASEAES { - return new AES('cbc'); + return new BASEAES('cbc'); } /** - * Get the AES Cyper with CTR mode + * Get the Wrapper AES Cyper with CBC mode * * @param Container $container The DI container. * - * @return AES + * @return Aes * @since 3.2.0 */ - public function getAesCTR(Container $container): AES + public function getAesCBC(Container $container): Aes { - return new AES('ctr'); + return new Aes( + $container->get('Crypt.AESCBC'), + $container->get('Crypt.Random') + ); } /** - * Get the AES Cyper with ECB mode + * Get the Wrapper AES Legacy Cyper with CBC mode * * @param Container $container The DI container. * - * @return AES + * @return Legacy * @since 3.2.0 */ - public function getAesECB(Container $container): AES + public function getAesLEGACY(Container $container): Legacy { - return new AES('ecb'); + return new Legacy( + $container->get('Crypt.AESCBC') + ); } /** - * Get the AES Cyper with CBC3 mode + * Get the FOF AES Cyper with CBC mode * * @param Container $container The DI container. * - * @return AES + * @return FOF * @since 3.2.0 */ - public function getAesCBC3(Container $container): AES + public function getFOF(Container $container): FOF { - return new AES('cbc3'); - } - - /** - * Get the AES Cyper with CFB mode - * - * @param Container $container The DI container. - * - * @return AES - * @since 3.2.0 - */ - public function getAesCFB(Container $container): AES - { - return new AES('cfb'); - } - - /** - * Get the AES Cyper with CFB8 mode - * - * @param Container $container The DI container. - * - * @return AES - * @since 3.2.0 - */ - public function getAesCFB8(Container $container): AES - { - return new AES('cfb8'); - } - - /** - * Get the AES Cyper with OFB mode - * - * @param Container $container The DI container. - * - * @return AES - * @since 3.2.0 - */ - public function getAesOFB(Container $container): AES - { - return new AES('ofb'); - } - - /** - * Get the AES Cyper with GCM mode - * - * @param Container $container The DI container. - * - * @return AES - * @since 3.2.0 - */ - public function getAesGCM(Container $container): AES - { - return new AES('gcm'); - } - - /** - * Get the Rijndael Cyper with CBC mode - * - * @param Container $container The DI container. - * - * @return Rijndael - * @since 3.2.0 - */ - public function getRijndaelCBC(Container $container): Rijndael - { - return new Rijndael('cbc'); - } - - /** - * Get the Rijndael Cyper with CTR mode - * - * @param Container $container The DI container. - * - * @return Rijndael - * @since 3.2.0 - */ - public function getRijndaelCTR(Container $container): Rijndael - { - return new Rijndael('ctr'); - } - - /** - * Get the Rijndael Cyper with ECB mode - * - * @param Container $container The DI container. - * - * @return Rijndael - * @since 3.2.0 - */ - public function getRijndaelECB(Container $container): Rijndael - { - return new Rijndael('ecb'); - } - - /** - * Get the Rijndael Cyper with CBC3 mode - * - * @param Container $container The DI container. - * - * @return Rijndael - * @since 3.2.0 - */ - public function getRijndaelCBC3(Container $container): Rijndael - { - return new Rijndael('cbc3'); - } - - /** - * Get the Rijndael Cyper with CFB mode - * - * @param Container $container The DI container. - * - * @return Rijndael - * @since 3.2.0 - */ - public function getRijndaelCFB(Container $container): Rijndael - { - return new Rijndael('cfb'); - } - - /** - * Get the Rijndael Cyper with CFB8 mode - * - * @param Container $container The DI container. - * - * @return Rijndael - * @since 3.2.0 - */ - public function getRijndaelCFB8(Container $container): Rijndael - { - return new Rijndael('cfb8'); - } - - /** - * Get the Rijndael Cyper with OFB mode - * - * @param Container $container The DI container. - * - * @return Rijndael - * @since 3.2.0 - */ - public function getRijndaelOFB(Container $container): Rijndael - { - return new Rijndael('ofb'); - } - - /** - * Get the Rijndael Cyper with GCM mode - * - * @param Container $container The DI container. - * - * @return Rijndael - * @since 3.2.0 - */ - public function getRijndaelGCM(Container $container): Rijndael - { - return new Rijndael('gcm'); - } - - /** - * Get the DES Cyper with CBC mode - * - * @param Container $container The DI container. - * - * @return DES - * @since 3.2.0 - */ - public function getDesCBC(Container $container): DES - { - return new DES('cbc'); - } - - /** - * Get the DES Cyper with CTR mode - * - * @param Container $container The DI container. - * - * @return DES - * @since 3.2.0 - */ - public function getDesCTR(Container $container): DES - { - return new DES('ctr'); - } - - /** - * Get the DES Cyper with ECB mode - * - * @param Container $container The DI container. - * - * @return DES - * @since 3.2.0 - */ - public function getDesECB(Container $container): DES - { - return new DES('ecb'); - } - - /** - * Get the DES Cyper with CBC3 mode - * - * @param Container $container The DI container. - * - * @return DES - * @since 3.2.0 - */ - public function getDesCBC3(Container $container): DES - { - return new DES('cbc3'); - } - - /** - * Get the DES Cyper with CFB mode - * - * @param Container $container The DI container. - * - * @return DES - * @since 3.2.0 - */ - public function getDesCFB(Container $container): DES - { - return new DES('cfb'); - } - - /** - * Get the DES Cyper with CFB8 mode - * - * @param Container $container The DI container. - * - * @return DES - * @since 3.2.0 - */ - public function getDesCFB8(Container $container): DES - { - return new DES('cfb8'); - } - - /** - * Get the DES Cyper with OFB mode - * - * @param Container $container The DI container. - * - * @return DES - * @since 3.2.0 - */ - public function getDesOFB(Container $container): DES - { - return new DES('ofb'); - } - - /** - * Get the DES Cyper with GCM mode - * - * @param Container $container The DI container. - * - * @return DES - * @since 3.2.0 - */ - public function getDesGCM(Container $container): DES - { - return new DES('gcm'); - } - - /** - * Get the DES Cyper with STREAM mode - * - * @param Container $container The DI container. - * - * @return DES - * @since 3.2.0 - */ - public function getDesSTREAM(Container $container): DES - { - return new DES('stream'); + return new FOF( + $container->get('Crypt.AESCBC'), + $container->get('Crypt.Random') + ); } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Utilities/ObjectHelper.php b/libraries/jcb_powers/VDM.Joomla/src/Utilities/ObjectHelper.php index fd6b51746..2646f7c37 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Utilities/ObjectHelper.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Utilities/ObjectHelper.php @@ -37,6 +37,42 @@ abstract class ObjectHelper return false; } + + /** + * Compare two objects for equality based on their property values. + * + * Note that this method works only for simple objects that don't + * contain any nested objects or resource references. If you need + * to compare more complex objects, you may need to use a + * more advanced method such as serialization or reflection. + * + * @param object|null $obj1 The first object to compare. + * @param object|null $obj2 The second object to compare. + * + * @return bool True if the objects have the same key-value pairs and false otherwise. + */ + public static function equal(?object $obj1, ?object $obj2): bool + { + // if any is null we return false as that means there is a none object + // we are not comparing null but objects + // but we allow null as some objects while + // not instantiate are still null + if (is_null($obj1) || is_null($obj2)) + { + return false; + } + + // Convert the objects to arrays of their property values using get_object_vars. + $array1 = get_object_vars($obj1); + $array2 = get_object_vars($obj2); + + // Compare the arrays using array_diff_assoc to detect any differences. + $diff1 = array_diff_assoc($array1, $array2); + $diff2 = array_diff_assoc($array2, $array1); + + // If the arrays have the same key-value pairs, they will have no differences, so return true. + return empty($diff1) && empty($diff2); + } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Utilities/StringHelper.php b/libraries/jcb_powers/VDM.Joomla/src/Utilities/StringHelper.php index 1e3d7b966..3a37f2b9a 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Utilities/StringHelper.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Utilities/StringHelper.php @@ -392,11 +392,12 @@ abstract class StringHelper /** * Random Key * + * @input int $size The size of the random string + * * @returns a string - * * @since 3.0.9 */ - public static function random($size): string + public static function random(int $size): string { $bag = "abcefghijknopqrstuwxyzABCDDEFGHIJKLLMMNOPQRSTUVVWXYZabcddefghijkllmmnopqrstuvvwxyzABCEFGHIJKNOPQRSTUWXYZ"; $key = []; diff --git a/libraries/phpseclib3/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php b/libraries/phpseclib3/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php index b1a8ca98a..30261db8b 100644 --- a/libraries/phpseclib3/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php +++ b/libraries/phpseclib3/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php @@ -2590,11 +2590,11 @@ abstract class SymmetricKey $length = ord($text[strlen($text) - 1]); if (!$length) { - // temp fix for FOFEncryptAes conversions - // Added by Llewellyn van der Merwe - return rtrim($text, "\0"); + // temp fix for FOFEncryptAes conversions + // Added by Llewellyn van der Merwe + return rtrim($text); } elseif ($length > $this->block_size) { - throw new BadDecryptionException("The ciphertext has an invalid padding length ($length) compared to the block size ({$this->block_size})"); + throw new BadDecryptionException("The ciphertext has an invalid padding length ($length) compared to the block size ({$this->block_size})"); } return substr($text, 0, -$length); diff --git a/script.php b/script.php index ec2f4b889..5257edbff 100644 --- a/script.php +++ b/script.php @@ -9422,7 +9422,7 @@ class com_componentbuilderInstallerScript echo ' -

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

'; +

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

'; // Set db if not set already. if (!isset($db)) diff --git a/site/controllers/api.php b/site/controllers/api.php index 3acac97d8..dc502c228 100644 --- a/site/controllers/api.php +++ b/site/controllers/api.php @@ -287,8 +287,8 @@ class ComponentbuilderControllerApi extends FormController { $textNotice = array(); $keyNotice = '

' . JText::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE', $model->key) . '

'; + $keyNotice .= '

' . JText::_('COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_TWO_HUNDRED_AND_FIFTY_SIX_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY') . '

'; $textNotice[] = JText::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_S', $model->key); - $keyNotice .= JText::_('COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY_UNLESS_THEY_HAVE_THIS_KEY_ABOVE_SO_DO_KEEP_IT_SAFE') . '
'; // set the package owner info if ((isset($model->info['getKeyFrom']['company']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['company'])) || (isset($model->info['getKeyFrom']['owner']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['owner']))) { diff --git a/site/language/en-GB/en-GB.com_componentbuilder.ini b/site/language/en-GB/en-GB.com_componentbuilder.ini index 7ddca56da..f9cc9f346 100644 --- a/site/language/en-GB/en-GB.com_componentbuilder.ini +++ b/site/language/en-GB/en-GB.com_componentbuilder.ini @@ -90,6 +90,8 @@ COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCES COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_IMPORT_PROCESS_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_DOES_NOT_HAVE_THE_KEY_THEY_CAN_SEE_WHERE_TO_GET_IT="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it." COM_COMPONENTBUILDER_SORRY_THIS_PLACEHOLDER_IS_ALREADY_IN_USE="Sorry this placeholder is already in use!" COM_COMPONENTBUILDER_SORRY_THIS_PLACEHOLDER_IS_ALREADY_IN_USE_IN_THE_COMPILER="Sorry this placeholder is already in use in the compiler!" +COM_COMPONENTBUILDER_SOURCE_CODE="source code" +COM_COMPONENTBUILDER_SOURCE_CODE_FOR_JOOMLA_COMPONENT="Source Code for Joomla Component" COM_COMPONENTBUILDER_S_WE_DETECTED_A_CHANGE_IN_BEXTERNALCODEB_BUT_YOU_DO_NOT_HAVE_PERMISSION_TO_ALLOW_THIS_CHANGE_SO_BSB_WAS_REMOVED_FROM_THE_COMPILATION_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFOBR_SMALLADMIN_ACCESS_REQUIREDSMALL="%s, we detected a change in EXTERNALCODE, but you do not have permission to allow this change so %s was removed from the compilation. Please contact your system administrator for more info!
(admin access required)" COM_COMPONENTBUILDER_S_WE_DETECTED_BNEW_EXTERNALCODEB_BUT_YOU_DO_NOT_HAVE_PERMISSION_TO_ALLOW_THIS_NEW_CODESTRING_SO_BSB_WAS_REMOVED_FROM_THE_COMPILATION_PLEASE_CONTACT_YOU_SYSTEM_ADMINISTRATOR_FOR_MORE_INFOBR_SMALLADMIN_ACCESS_REQUIREDSMALL="%s, we detected NEW EXTERNALCODE, but you do not have permission to allow this new code/string so %s was removed from the compilation. Please contact you system administrator for more info!
(admin access required)" COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_BSETTINGSB_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_BEXPORT_KEYB="That means anyone who has this package can install it into JCB. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." @@ -128,9 +130,10 @@ COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key." COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_BJCB_GLOBAL_OPTIONSB_GO_TO_THE_BCOMPANYB_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the JCB Global Options, go to the Company tab and add the correct company details there." COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the JCB Global Options, go to the Company tab and add the correct company details there." COM_COMPONENTBUILDER_TRANSLATOR_MODULE_NOT_READYBR_THIS_AREA_IS_STILL_UNDER_PRODUCTION_HOPEFULLY_WITH_NEXT_UPDATE="Translator Module not ready!
This area is still under production, hopefully with next update." +COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAESFLVVXJTMTHREEJTWOIXM="VjRzdE%ssMHBtRW50TWV0aE%sFlvVXJTM3J2IXM=" COM_COMPONENTBUILDER_WEBSITE_S="Website: %s" COM_COMPONENTBUILDER_WE_FOUND_DYNAMIC_CODE_BALL_IN_ONE_LINEB_AND_IGNORED_IT_PLEASE_REVIEW_S_FOR_MORE_DETAILS="We found dynamic code all in one line, and ignored it! Please review (%s) for more details!" -COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY_UNLESS_THEY_HAVE_THIS_KEY_ABOVE_SO_DO_KEEP_IT_SAFE="Your data is encrypted with a AES 128 bit encryption using the above 32 character key. Without this key it will take the current technology with a brute force attack method more then 700 000 000 000 000 000 000 000 000 000 000 years to crack theoretically. Unless they have this key above, so do keep it safe." +COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_TWO_HUNDRED_AND_FIFTY_SIX_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY="Your data is encrypted with a AES 256 bit encryption using the above 32 character key." COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_ACCESS_THE_SERVER_DETAILS_BS_DENIEDB_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="You do not have permission to access the server details (%s - denied), please contact your system administrator for more info." COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS="You should add the correct owner details." COM_COMPONENTBUILDER__HAS_BEEN_CHECKED_OUT_BY_S="% has been checked out by %s"