From 1991a46689c0e52f26edf89e0999d6bc4adfc784 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sun, 11 Mar 2018 04:59:46 +0200 Subject: [PATCH] Fixed the getFieldName method to always fall back to global name if none is set in the xml. --- admin/helpers/compiler/a_Get.php | 8 +++++++- admin/helpers/compiler/e_Interpretation.php | 1 - admin/language/en-GB/en-GB.com_componentbuilder.ini | 4 ++-- admin/models/forms/component_site_views.xml | 8 ++++---- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 53958aa76..8ce7b27d1 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -2346,7 +2346,13 @@ class Get } else { - $name = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'name="', '"')); + // get value from xml + $xml = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'name="', '"')); + // check if a value was found + if (ComponentbuilderHelper::checkString($xml)) + { + $name = $xml; + } } // exit foreach loop break; diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 4a6811dff..50460e877 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -12866,7 +12866,6 @@ class Interpretation extends Fields '###views###' => $listViewName); $view = ''; $viewType = 0; - // set the custom table key $dbkey = 'g'; foreach ($this->componentData->config as $field) diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index ad9e2d996..cfca1b413 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -2114,14 +2114,12 @@ COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_CREATED_DATE_DESC="The date this Compo COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_CREATED_DATE_LABEL="Created Date" COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_DEFAULT_VIEW_DESCRIPTION="Select only one." COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_DEFAULT_VIEW_LABEL="Default View" -COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_DESCRIPTION="if view uses Access,
should default be public." COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_EDIT="Editing the Component Site Views" COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ERROR_UNIQUE_ALIAS="Another Component Site Views has the same alias." COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ID="Id" COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT="Joomla Component" COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_DESCRIPTION="Select a Joomla Component" COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_LABEL="Component" -COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_LABEL="Public Access" COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_MENU_DESCRIPTION="Select if the view should show have a menu link." COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_MENU_LABEL="Add Menu" COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_METADATA_DESCRIPTION="Select if this view should have metadata." @@ -2135,6 +2133,8 @@ COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_NOTE_ON_SITE_VIEWS_DESCRIPTION="Do not COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_NOTE_ON_SITE_VIEWS_LABEL="Setting Site Views" COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ORDERING_LABEL="Ordering" COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PERMISSION="Permissions" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PUBLIC_ACCESS_DESCRIPTION="if view uses Access,
should default be public." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PUBLIC_ACCESS_LABEL="Public Access" COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PUBLISHING="Publishing" COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Component Site Views to customise the alias." COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_SITEVIEW="Siteview" diff --git a/admin/models/forms/component_site_views.xml b/admin/models/forms/component_site_views.xml index c897eb9ac..7a2f87ec0 100644 --- a/admin/models/forms/component_site_views.xml +++ b/admin/models/forms/component_site_views.xml @@ -152,13 +152,13 @@ required="false" description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ACCESS_DESCRIPTION" class="inputbox" /> - +