52
0

Update on v1.1.2 (beta for next version)

Here's an update on the current version, which includes changes towards the next release still in beta.
This commit is contained in:
Robot 2023-10-18 09:28:04 +02:00
parent 961cbd7539
commit 75090e97d3
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
2 changed files with 7 additions and 6 deletions

View File

@ -13,7 +13,8 @@
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Application\CMSApplication; use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Plugin\CMSPlugin; use Joomla\CMS\Plugin\CMSPlugin;
use VDM\Joomla\Utilities\ArrayHelper;
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php'); JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
@ -98,7 +99,7 @@ class PlgExtensionComponentbuilderExportCompiler extends CMSPlugin
if ($this->componentActive($context)) if ($this->componentActive($context))
{ {
// set the export/import option // set the export/import option
if (isset($component->admin_views) && ComponentbuilderHelper::checkArray($component->admin_views)) if (isset($component->admin_views) && ArrayHelper::check($component->admin_views))
{ {
foreach ($component->admin_views as $view) foreach ($component->admin_views as $view)
{ {
@ -121,7 +122,7 @@ class PlgExtensionComponentbuilderExportCompiler extends CMSPlugin
*/ */
public function jcb_ce_onBeforeSetLangFileData(&$context, $compiler) public function jcb_ce_onBeforeSetLangFileData(&$context, $compiler)
{ {
if ($this->exportTextOnly && $this->componentActive($context) && ComponentbuilderHelper::checkArray($this->languageArray)) if ($this->exportTextOnly && $this->componentActive($context) && ArrayHelper::check($this->languageArray))
{ {
foreach($this->languageArray as $key => $string) foreach($this->languageArray as $key => $string)
{ {
@ -244,12 +245,12 @@ class PlgExtensionComponentbuilderExportCompiler extends CMSPlugin
return true; return true;
} }
// first check is we have the active components set // first check is we have the active components set
if ($this->activateOption == 2 && !ComponentbuilderHelper::checkArray($this->componentsActive)) if ($this->activateOption == 2 && !ArrayHelper::check($this->componentsActive))
{ {
$this->componentsActive = $this->params->get('components'); $this->componentsActive = $this->params->get('components');
} }
// only check if there are active // only check if there are active
if (ComponentbuilderHelper::checkArray($this->componentsActive)) if (ArrayHelper::check($this->componentsActive))
{ {
return in_array((int) filter_var($context, FILTER_SANITIZE_NUMBER_INT), $this->componentsActive); return in_array((int) filter_var($context, FILTER_SANITIZE_NUMBER_INT), $this->componentsActive);
} }

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" version="4" group="extension" method="upgrade"> <extension type="plugin" version="4" group="extension" method="upgrade">
<name>PLG_EXTENSION_COMPONENTBUILDEREXPORTCOMPILER</name> <name>PLG_EXTENSION_COMPONENTBUILDEREXPORTCOMPILER</name>
<creationDate>2nd May, 2023</creationDate> <creationDate>18th October, 2023</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail> <authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://dev.vdm.io</authorUrl> <authorUrl>https://dev.vdm.io</authorUrl>