From fb393ec782e76ad2412817c03d6c4a7efe60d933 Mon Sep 17 00:00:00 2001 From: aB0t Date: Wed, 15 Feb 2023 02:46:55 +0200 Subject: [PATCH] update - v2.2.2 --- componentbuilderheaderscompiler.php | 27 ++++++++++--------- componentbuilderheaderscompiler.xml | 4 +-- ...ension_componentbuilderheaderscompiler.ini | 2 +- ...on_componentbuilderheaderscompiler.sys.ini | 2 +- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/componentbuilderheaderscompiler.php b/componentbuilderheaderscompiler.php index 6ac6bf2..cdd484e 100644 --- a/componentbuilderheaderscompiler.php +++ b/componentbuilderheaderscompiler.php @@ -24,7 +24,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; * Extension - Componentbuilder Headers Compiler plugin. * * @package ComponentbuilderHeadersCompiler - * @since 2.2.1 + * @since 2.2.2 */ class PlgExtensionComponentbuilderHeadersCompiler extends CMSPlugin { @@ -573,7 +573,19 @@ class PlgExtensionComponentbuilderHeadersCompiler extends CMSPlugin if (isset($params[$get['field']]) || isset($params['power_' . $get['field']])) { // start little headers bucket - $headers = array(); + $headers = []; + + // load the headers if power + if (isset($params['power_' . $get['field']]) && ComponentbuilderHelper::checkArray($params['power_' . $get['field']], true) + && ($powers = $this->getPowers($params['power_' . $get['field']])) !== false) + { + foreach ($powers as $power) + { + $power = trim($power); + $headers[$power] = $power; + } + } + // load the headers if text if (isset($params[$get['field']]) && ComponentbuilderHelper::checkString($params[$get['field']])) { @@ -590,16 +602,7 @@ class PlgExtensionComponentbuilderHeadersCompiler extends CMSPlugin } } } - // load the headers if power - if (isset($params['power_' . $get['field']]) && ComponentbuilderHelper::checkArray($params['power_' . $get['field']], true) - && ($powers = $this->getPowers($params['power_' . $get['field']])) !== false) - { - foreach ($powers as $power) - { - $power = trim($power); - $headers[$power] = $power; - } - } + // check if we found some header values if (ComponentbuilderHelper::checkArray($headers, true)) { diff --git a/componentbuilderheaderscompiler.xml b/componentbuilderheaderscompiler.xml index 8b63015..704e130 100644 --- a/componentbuilderheaderscompiler.xml +++ b/componentbuilderheaderscompiler.xml @@ -1,13 +1,13 @@ PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER - 5th February, 2023 + 14th February, 2023 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io Copyright (C) 2015 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 2.2.1 + 2.2.2 PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION diff --git a/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.ini b/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.ini index d98af21..a94e2c8 100644 --- a/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.ini +++ b/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.ini @@ -2,6 +2,6 @@ PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER="Extension - Componentbuilder Head PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_DESCRIPTION="This plugin is used to set the custom headers for your classes during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field. Also be sure to set your code where you would like to set Custom Headers." -PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder Headers Compiler (v.2.2.1)

This plugin is used to set the custom headers for your classes during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field. +PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder Headers Compiler (v.2.2.2)

This plugin is used to set the custom headers for your classes during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field. Also be sure to set your code where you would like to set Custom Headers.

Created by Llewellyn van der Merwe
Development started 24th May, 2020

" \ No newline at end of file diff --git a/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.sys.ini b/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.sys.ini index d98af21..a94e2c8 100644 --- a/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.sys.ini +++ b/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.sys.ini @@ -2,6 +2,6 @@ PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER="Extension - Componentbuilder Head PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_DESCRIPTION="This plugin is used to set the custom headers for your classes during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field. Also be sure to set your code where you would like to set Custom Headers." -PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder Headers Compiler (v.2.2.1)

This plugin is used to set the custom headers for your classes during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field. +PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder Headers Compiler (v.2.2.2)

This plugin is used to set the custom headers for your classes during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field. Also be sure to set your code where you would like to set Custom Headers.

Created by Llewellyn van der Merwe
Development started 24th May, 2020

" \ No newline at end of file