From 630bfcb1771c1fbcbe62496e2c9e93398a0d7b98 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sun, 26 Jan 2020 00:24:42 +0200 Subject: [PATCH] Fixed gh-511 so that custom fields also get copied to module fields if set to do so. --- README.md | 2 +- admin/README.txt | 2 +- admin/helpers/compiler/b_Structure.php | 7 +++++++ admin/helpers/compiler/c_Fields.php | 15 ++++----------- componentbuilder.xml | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index d854317a9..a28ca4d08 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 12th January, 2020 ++ *Last Build*: 25th January, 2020 + *Version*: 2.10.10 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt diff --git a/admin/README.txt b/admin/README.txt index d854317a9..a28ca4d08 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -144,7 +144,7 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 12th January, 2020 ++ *Last Build*: 25th January, 2020 + *Version*: 2.10.10 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index fb96cd8ce..176504f15 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -228,6 +228,13 @@ class Structure extends Get */ public $fileContentStatic = array(); + /** + * Extention Custom Fields + * + * @var array + */ + public $extentionCustomfields = array(); + /** * The standard folders * diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 582112b46..f1cdecdb3 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -347,13 +347,6 @@ class Fields extends Structure */ public $movedPublishingFields = array(); - /** - * Extention Custom Fields - * - * @var array - */ - public $extentionCustomfields = array(); - /** * Set the line number in comments * @@ -1720,8 +1713,8 @@ class Fields extends Structure } $field .= PHP_EOL . $this->_t(2) . $taber . "/>"; // incase the field is in the config and has not been set - if ('config' === $view_name_single && 'configs' === $view_name_list|| - strpos($view_name_single, 'P|uG!n') !== false) + if ('config' === $view_name_single && 'configs' === $view_name_list || + (strpos($view_name_single, 'P|uG!n') !== false || strpos($view_name_single, 'M0dU|3') !== false)) { // set lang (just incase) $listLangName = $langView . '_' . ComponentbuilderHelper::safeString($name, 'U'); @@ -2208,7 +2201,7 @@ class Fields extends Structure } // incase the field is in the config and has not been set (or is part of a plugin or module) if (('config' === $view_name_single && 'configs' === $view_name_list) || - strpos($view_name_single, 'P|uG!n') !== false) + (strpos($view_name_single, 'P|uG!n') !== false || strpos($view_name_single, 'M0dU|3') !== false)) { // set lang (just incase) $listLangName = $langView . '_' . ComponentbuilderHelper::safeString($name, 'U'); @@ -3324,7 +3317,7 @@ class Fields extends Structure } } // if this field gets used in plugin or module we should track it so if needed we can copy it over - if (strpos($view_name_single, 'P|uG!n') !== false && + if ((strpos($view_name_single, 'P|uG!n') !== false || strpos($view_name_single, 'M0dU|3') !== false) && isset($data['custom']) && isset($data['custom']['type'])) { $this->extentionCustomfields[$data['type']] = $data['custom']['type']; diff --git a/componentbuilder.xml b/componentbuilder.xml index e0f1d7f90..05126a32b 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 12th January, 2020 + 25th January, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com