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:
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
1
admin/compiler/joomla_3/CHANGELOG.md
Normal file
1
admin/compiler/joomla_3/CHANGELOG.md
Normal file
@ -0,0 +1 @@
|
||||
###CHANGELOG###
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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':
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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."
|
||||
|
@ -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
|
||||
|
@ -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
@ -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 <https://phpseclib.com/docs/symmetric>
|
||||
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']);
|
||||
|
File diff suppressed because one or more lines are too long
@ -213,14 +213,14 @@ jQuery('<div id="loading"></div>')
|
||||
</div>
|
||||
<?php if ($hasOwner): ?>
|
||||
<div class="well span6">
|
||||
<?php echo ComponentbuilderHelper::getPackageOwnerDetailsDisplay($this->packageInfo); ?>
|
||||
<?php echo \VDM\Joomla\Componentbuilder\Package\Factory::_('Display.Details')->owner($this->packageInfo); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php if (isset($this->packageInfo['name']) && ComponentbuilderHelper::checkArray($this->packageInfo['name'])) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'info', JText::sprintf('COM_COMPONENTBUILDER_S_BEING_IMPORTED', $comP)); ?>
|
||||
<?php echo ComponentbuilderHelper::getPackageComponentsDetailsDisplay($this->packageInfo); ?>
|
||||
<?php echo \VDM\Joomla\Componentbuilder\Package\Factory::_('Display.Details')->components($this->packageInfo); ?>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
|
Reference in New Issue
Block a user