Stable release of 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.
This commit is contained in:
Robot 2023-02-27 14:27:41 +02:00
parent 339aec221e
commit 737bd03e46
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
55 changed files with 1900 additions and 1048 deletions

12
CHANGELOG.md Normal file
View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -0,0 +1 @@
###CHANGELOG###

View File

@ -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",

View File

@ -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",

View File

@ -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

View File

@ -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 = '<h1>' . JText::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE', $model->key) . '</h1>';
$keyNotice .= '<p>' . JText::_('COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY') . '</h1>';
$keyNotice = '<h1>' . Text::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE', $model->key) . '</h1>';
$keyNotice .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_TWO_HUNDRED_AND_FIFTY_SIX_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY') . '</p>';
// 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 = '<h2>' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET') . '</h2>';
$ownerDetails .= '<p>' . 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') . '</p>';
$ownerDetails .= '<h3>' . JText::_('COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS') . '</h3>';
$ownerDetails .= '<p>' . 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') . '</p>';
$ownerDetails = '<h2>' . Text::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET') . '</h2>';
$ownerDetails .= '<p>' . 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') . '</p>';
$ownerDetails .= '<h3>' . Text::_('COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS') . '</h3>';
$ownerDetails .= '<p>' . 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') . '</p>';
}
}
else
{
$keyNotice = '<h1>' . JText::_('COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY') . '</h1>';
$ownerDetails = '<p>' . 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') . '</p>';
$keyNotice = '<h1>' . Text::_('COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY') . '</h1>';
$ownerDetails = '<p>' . 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') . '</p>';
}
// Redirect to the list screen with success.
$message = array();
$message[] = '<h1>' . JText::_('COM_COMPONENTBUILDER_EXPORT_COMPLETED') . '</h1>';
$message[] = '<h1>' . Text::_('COM_COMPONENTBUILDER_EXPORT_COMPLETED') . '</h1>';
$message[] = '<p>' . JText::sprintf('COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE_BR_S_S', $model->zipPath, $keyNotice, $ownerDetails) . '</p>';
$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 = '<h1>' . JText::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE', $model->key) . '</h1>';
$keyNotice .= '<p>' . JText::_('COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_TWO_HUNDRED_AND_FIFTY_SIX_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY') . '</p>';
$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') . '<br />';
// 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();
}
}
}

View File

@ -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

View File

@ -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[] = '</updates>';
// 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 <<<DYNAMIC>>> 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 <<<DYNAMIC>>> 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':

View File

@ -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 <<<DYNAMIC>>> add the header details for the controller
CFactory::_('Content')->set_('import', 'IMPORT_CONTROLLER_HEADER', $this->setFileHeader(
'import.controller', 'import'
));
// IMPORT_MODEL_HEADER <<<DYNAMIC>>> 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();

View File

@ -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="<h2>Curl Not Found!</h2><p>Please setup curl on your system, or <b>componentbuilder</b> will not function correctly!</p>"
COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BKEY_ERRORB_OR_BROKEN_PACKAGE="<h2>Data is corrupt!</h2>This could be due to <b>key error</b>, or broken package!"
COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BROKEN_PACKAGE="<h2>Data is corrupt!</h2>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="<h2>We could not open the encrypt data!</h2> This could be due to the FOFEncryption that is no longer supported in Joomla.<br />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="<h2>We could not open the encrypt data!</h2> This could be due to the FOFEncryption that is no longer supported in Joomla.<br />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="<h2>We could not open the package!</h2>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="<i>Author:</i> <b>%s</b>"
COM_COMPONENTBUILDER_ICOMPANYI_BSB="<i>Company:</i> <b>%s</b>"
@ -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. <br /><br /><b>This means the snippets will continue to appear out of date.</b>"
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 <b>financial donation</b> 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 <b>ALL</b> 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 <a href="http://random-ize.com/how-long-to-hack-pass/" target="_blank" title="How long to hack pass">700 000 000 000 000 000 000 000 000 000 000</a> 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."

View File

@ -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 = '<div class="alert alert-success" id="crowdin_message">';
$html .= '<h1>' . JText::_('COM_COMPONENTBUILDER_COMPONENT_SUCCESSFULLY_LINKED') . '</h1>';
$html .= '<h1>' . Text::_('COM_COMPONENTBUILDER_COMPONENT_SUCCESSFULLY_LINKED') . '</h1>';
$html .= '<h3>' . $details['details']['name'] . '</h3>';
if (ComponentbuilderHelper::checkString($details['details']['description']))
if (StringHelper::check($details['details']['description']))
{
$html .= '<p>';
$html .= $details['details']['description'];
@ -128,7 +133,7 @@ class ComponentbuilderModelAjax extends ListModel
$html .= '</b></li>';
$html .= '</ul>';
$html .= '</div>';
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 <https://phpseclib.com/docs/symmetric>
$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)) ? '<img alt="Joomla Component Image" src="'. JURI::root() . $object->image . '" style="float: right;">': '';
$desc = (ComponentbuilderHelper::checkString($object->description)) ? $object->description : $object->short_description;
$placeholder = ($object->add_placeholders == 1) ? '<span class="btn btn-small btn-success"> ' . JText::_('COM_COMPONENTBUILDER_YES') . ' </span>' : '<span class="btn btn-small btn-danger"> ' .JText::_('COM_COMPONENTBUILDER_NO') . ' </span>' ;
$debug = ($object->debug_linenr == 1) ? '<span class="btn btn-small btn-success"> ' .JText::_('COM_COMPONENTBUILDER_YES') . '</span>' : ' <span class="btn btn-small btn-danger"> ' .JText::_('COM_COMPONENTBUILDER_NO') . ' </span>' ;
$image = (StringHelper::check($object->image)) ? '<img alt="Joomla Component Image" src="'. JURI::root() . $object->image . '" style="float: right;">': '';
$desc = (StringHelper::check($object->description)) ? $object->description : $object->short_description;
$placeholder = ($object->add_placeholders == 1) ? '<span class="btn btn-small btn-success"> ' . Text::_('COM_COMPONENTBUILDER_YES') . ' </span>' : '<span class="btn btn-small btn-danger"> ' .Text::_('COM_COMPONENTBUILDER_NO') . ' </span>' ;
$debug = ($object->debug_linenr == 1) ? '<span class="btn btn-small btn-success"> ' .Text::_('COM_COMPONENTBUILDER_YES') . '</span>' : ' <span class="btn btn-small btn-danger"> ' .Text::_('COM_COMPONENTBUILDER_NO') . ' </span>' ;
$html = array();
$html[] = '<h3>' . $object->name . ' (v' . $object->component_version . ')</h3>';
$html[] = '<p>' . $desc . $image . '</p>';
$html[] = '<ul>';
$html[] = '<li>' . JText::_('COM_COMPONENTBUILDER_COMPANY') . ': <b>' . $object->companyname . '</b></li>';
$html[] = '<li>' . JText::_('COM_COMPONENTBUILDER_AUTHOR') . ': <b>' . $object->author . '</b></li>';
$html[] = '<li>' . JText::_('COM_COMPONENTBUILDER_EMAIL') . ': <b>' . $object->email . '</b></li>';
$html[] = '<li>' . JText::_('COM_COMPONENTBUILDER_WEBSITE') . ': <b>' . $object->website . '</b></li>';
$html[] = '<li>' . Text::_('COM_COMPONENTBUILDER_COMPANY') . ': <b>' . $object->companyname . '</b></li>';
$html[] = '<li>' . Text::_('COM_COMPONENTBUILDER_AUTHOR') . ': <b>' . $object->author . '</b></li>';
$html[] = '<li>' . Text::_('COM_COMPONENTBUILDER_EMAIL') . ': <b>' . $object->email . '</b></li>';
$html[] = '<li>' . Text::_('COM_COMPONENTBUILDER_WEBSITE') . ': <b>' . $object->website . '</b></li>';
$html[] = '</ul>';
$html[] = '<h4>' . JText::_('COM_COMPONENTBUILDER_COMPONENT_GLOBAL_SETTINGS') . '</h4>';
$html[] = '<h4>' . Text::_('COM_COMPONENTBUILDER_COMPONENT_GLOBAL_SETTINGS') . '</h4>';
$html[] = '<p>';
$html[] = JText::_('COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS') . '<br />' . $placeholder . '<br />';
$html[] = JText::_('COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS') . '<br />' . $debug ;
$html[] = Text::_('COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS') . '<br />' . $placeholder . '<br />';
$html[] = Text::_('COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS') . '<br />' . $debug ;
$html[] = '</p>';
$html[] = '<h4>' . JText::_('COM_COMPONENTBUILDER_LICENSE') . '</h4>';
$html[] = '<h4>' . Text::_('COM_COMPONENTBUILDER_LICENSE') . '</h4>';
$html[] = '<p>' . $object->license . '</p>';
$html[] = '<h4>' . JText::_('COM_COMPONENTBUILDER_COPYRIGHT') . '</h4>';
$html[] = '<h4>' . Text::_('COM_COMPONENTBUILDER_COPYRIGHT') . '</h4>';
$html[] = '<p>' . $object->copyright . '<br /><br />';
$html[] = '<a href="index.php?option=com_componentbuilder&ref=compiler&view=joomla_components&task=joomla_component.edit&id=' . (int) $object->id . '" class="btn btn-small span12"><span class="icon-edit"></span> ' . JText::_('COM_COMPONENTBUILDER_EDIT') . ' ' .$object->system_name . '</a></p>';
$html[] = '<a href="index.php?option=com_componentbuilder&ref=compiler&view=joomla_components&task=joomla_component.edit&id=' . (int) $object->id . '" class="btn btn-small span12"><span class="icon-edit"></span> ' . Text::_('COM_COMPONENTBUILDER_EDIT') . ' ' .$object->system_name . '</a></p>';
// now return the diplay
return implode("\n", $html);
}
@ -247,7 +231,7 @@ class ComponentbuilderModelAjax extends ListModel
**/
public function getCronPath($type)
{
$result = array('error' => '<span style="color: red;">' . JText::_('COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED') . '</span>');
$result = array('error' => '<span style="color: red;">' . Text::_('COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED') . '</span>');
if ('backup' === $type)
{
$result['error'] = '<span style="color: red;">' . JText::sprintf('COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S', $type) . '</span>';
@ -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' => '<small><span style="color:green;"><span class="icon-shield"></span>' . JText::_('COM_COMPONENTBUILDER_UP_TO_DATE') . '</span></small>'];
return ['notice' => '<small><span style="color:green;"><span class="icon-shield"></span>' . Text::_('COM_COMPONENTBUILDER_UP_TO_DATE') . '</span></small>'];
}
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' => '<small><span style="color:#F7B033;"><span class="icon-wrench"></span>' . JText::_('COM_COMPONENTBUILDER_BETA_RELEASE') . '</span></small>'];
return ['notice' => '<small><span style="color:#F7B033;"><span class="icon-wrench"></span>' . Text::_('COM_COMPONENTBUILDER_BETA_RELEASE') . '</span></small>'];
}
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' => '<small><span style="color:red;"><span class="icon-warning-circle"></span>' . JText::_('COM_COMPONENTBUILDER_OUT_OF_DATE') . '!</span> <a style="color:green;" href="' .
$download . '" title="' . JText::_('COM_COMPONENTBUILDER_YOU_CAN_DIRECTLY_DOWNLOAD_THE_LATEST_UPDATE_OR_USE_THE_JOOMLA_UPDATE_AREA') . '">' . JText::_('COM_COMPONENTBUILDER_DOWNLOAD_UPDATE') . '!</a></small>'];
return ['notice' => '<small><span style="color:red;"><span class="icon-warning-circle"></span>' . Text::_('COM_COMPONENTBUILDER_OUT_OF_DATE') . '!</span> <a style="color:green;" href="' .
$download . '" title="' . Text::_('COM_COMPONENTBUILDER_YOU_CAN_DIRECTLY_DOWNLOAD_THE_LATEST_UPDATE_OR_USE_THE_JOOMLA_UPDATE_AREA') . '">' . Text::_('COM_COMPONENTBUILDER_DOWNLOAD_UPDATE') . '!</a></small>'];
}
}
}
@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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']))