From 302328c92a9c360597340b119c232ff3846b4074 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Thu, 26 Nov 2020 19:33:39 +0200 Subject: [PATCH] Add getFieldsetXML and getFieldXMLString method to build fields in compiler gh-378. Refactoring the compiler to use camelcase for view code names. --- README.md | 6 +- admin/README.txt | 6 +- admin/compiler/joomla_3/JViewLegacy_list.php | 2 +- admin/controllers/joomla_components.php | 2 +- admin/helpers/compiler/c_Fields.php | 872 ++++--- admin/helpers/compiler/e_Interpretation.php | 2152 +++++++++-------- admin/helpers/compiler/f_Infusion.php | 472 ++-- .../en-GB/en-GB.com_componentbuilder.ini | 2 +- admin/sql/install.mysql.utf8.sql | 2 +- admin/views/admin_views/tmpl/default_body.php | 7 +- admin/views/admin_views/tmpl/default_head.php | 12 +- admin/views/admin_views/view.html.php | 158 +- .../views/admins_custom_tabs/tmpl/default.php | 3 +- .../admins_custom_tabs/tmpl/default_body.php | 7 +- .../admins_custom_tabs/tmpl/default_head.php | 2 +- admin/views/admins_custom_tabs/view.html.php | 4 +- admin/views/admins_fields/tmpl/default.php | 3 +- .../views/admins_fields/tmpl/default_body.php | 7 +- .../views/admins_fields/tmpl/default_head.php | 2 +- admin/views/admins_fields/view.html.php | 4 +- .../admins_fields_conditions/tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../admins_fields_conditions/view.html.php | 4 +- .../admins_fields_relations/tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../admins_fields_relations/view.html.php | 4 +- admin/views/class_extendings/tmpl/default.php | 3 +- .../class_extendings/tmpl/default_body.php | 7 +- .../class_extendings/tmpl/default_head.php | 2 +- admin/views/class_extendings/view.html.php | 4 +- admin/views/class_methods/tmpl/default.php | 3 +- .../views/class_methods/tmpl/default_body.php | 7 +- .../views/class_methods/tmpl/default_head.php | 2 +- admin/views/class_methods/view.html.php | 4 +- admin/views/class_properties/tmpl/default.php | 3 +- .../class_properties/tmpl/default_body.php | 7 +- .../class_properties/tmpl/default_head.php | 2 +- admin/views/class_properties/view.html.php | 4 +- .../components_admin_views/tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../components_admin_views/view.html.php | 4 +- .../views/components_config/tmpl/default.php | 3 +- .../components_config/tmpl/default_body.php | 7 +- .../components_config/tmpl/default_head.php | 2 +- admin/views/components_config/view.html.php | 4 +- .../tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../view.html.php | 4 +- .../tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../view.html.php | 4 +- .../components_dashboard/tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../views/components_dashboard/view.html.php | 4 +- .../components_files_folders/tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../components_files_folders/view.html.php | 4 +- .../views/components_modules/tmpl/default.php | 3 +- .../components_modules/tmpl/default_body.php | 7 +- .../components_modules/tmpl/default_head.php | 2 +- admin/views/components_modules/view.html.php | 4 +- .../components_mysql_tweaks/tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../components_mysql_tweaks/view.html.php | 4 +- .../components_placeholders/tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../components_placeholders/view.html.php | 4 +- .../views/components_plugins/tmpl/default.php | 3 +- .../components_plugins/tmpl/default_body.php | 7 +- .../components_plugins/tmpl/default_head.php | 2 +- admin/views/components_plugins/view.html.php | 4 +- .../components_site_views/tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../views/components_site_views/view.html.php | 4 +- .../views/components_updates/tmpl/default.php | 3 +- .../components_updates/tmpl/default_body.php | 7 +- .../components_updates/tmpl/default_head.php | 2 +- admin/views/components_updates/view.html.php | 4 +- .../views/custom_admin_views/tmpl/default.php | 3 +- .../custom_admin_views/tmpl/default_body.php | 7 +- .../custom_admin_views/tmpl/default_head.php | 2 +- admin/views/custom_admin_views/view.html.php | 4 +- .../views/custom_codes/tmpl/default_body.php | 7 +- .../views/custom_codes/tmpl/default_head.php | 2 +- admin/views/custom_codes/view.html.php | 4 +- .../views/dynamic_gets/tmpl/default_body.php | 7 +- .../views/dynamic_gets/tmpl/default_head.php | 2 +- admin/views/dynamic_gets/view.html.php | 4 +- admin/views/fields/tmpl/default_body.php | 7 +- admin/views/fields/tmpl/default_head.php | 2 +- admin/views/fields/view.html.php | 4 +- admin/views/fieldtypes/tmpl/default.php | 3 +- admin/views/fieldtypes/tmpl/default_body.php | 7 +- admin/views/fieldtypes/tmpl/default_head.php | 2 +- admin/views/fieldtypes/view.html.php | 4 +- admin/views/help_documents/tmpl/default.php | 3 +- .../help_documents/tmpl/default_body.php | 7 +- .../help_documents/tmpl/default_head.php | 2 +- admin/views/help_documents/view.html.php | 4 +- .../joomla_components/tmpl/default_body.php | 7 +- .../joomla_components/tmpl/default_head.php | 2 +- admin/views/joomla_components/view.html.php | 4 +- .../joomla_modules/tmpl/default_body.php | 7 +- .../joomla_modules/tmpl/default_head.php | 2 +- admin/views/joomla_modules/view.html.php | 4 +- .../tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../view.html.php | 4 +- .../joomla_modules_updates/tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../joomla_modules_updates/view.html.php | 4 +- .../joomla_plugin_groups/tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../views/joomla_plugin_groups/view.html.php | 4 +- .../joomla_plugins/tmpl/default_body.php | 7 +- .../joomla_plugins/tmpl/default_head.php | 2 +- admin/views/joomla_plugins/view.html.php | 4 +- .../tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../view.html.php | 4 +- .../joomla_plugins_updates/tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../joomla_plugins_updates/view.html.php | 4 +- .../language_translations/tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../views/language_translations/view.html.php | 4 +- admin/views/languages/tmpl/default_body.php | 7 +- admin/views/languages/tmpl/default_head.php | 2 +- admin/views/languages/view.html.php | 4 +- admin/views/layouts/tmpl/default_body.php | 7 +- admin/views/layouts/tmpl/default_head.php | 2 +- admin/views/layouts/view.html.php | 4 +- admin/views/libraries/tmpl/default.php | 3 +- admin/views/libraries/tmpl/default_body.php | 7 +- admin/views/libraries/tmpl/default_head.php | 2 +- admin/views/libraries/view.html.php | 4 +- admin/views/libraries_config/tmpl/default.php | 3 +- .../libraries_config/tmpl/default_body.php | 7 +- .../libraries_config/tmpl/default_head.php | 2 +- admin/views/libraries_config/view.html.php | 4 +- .../tmpl/default.php | 3 +- .../tmpl/default_body.php | 7 +- .../tmpl/default_head.php | 2 +- .../view.html.php | 4 +- admin/views/placeholders/tmpl/default.php | 3 +- .../views/placeholders/tmpl/default_body.php | 7 +- .../views/placeholders/tmpl/default_head.php | 2 +- admin/views/placeholders/view.html.php | 4 +- admin/views/servers/tmpl/default.php | 3 +- admin/views/servers/tmpl/default_body.php | 7 +- admin/views/servers/tmpl/default_head.php | 2 +- admin/views/servers/view.html.php | 4 +- admin/views/site_views/tmpl/default.php | 3 +- admin/views/site_views/tmpl/default_body.php | 7 +- admin/views/site_views/tmpl/default_head.php | 2 +- admin/views/site_views/view.html.php | 4 +- admin/views/snippet_types/tmpl/default.php | 3 +- .../views/snippet_types/tmpl/default_body.php | 7 +- .../views/snippet_types/tmpl/default_head.php | 2 +- admin/views/snippet_types/view.html.php | 4 +- admin/views/snippets/tmpl/default.php | 3 +- admin/views/snippets/tmpl/default_body.php | 7 +- admin/views/snippets/tmpl/default_head.php | 2 +- admin/views/snippets/view.html.php | 4 +- admin/views/templates/tmpl/default_body.php | 7 +- admin/views/templates/tmpl/default_head.php | 2 +- admin/views/templates/view.html.php | 4 +- admin/views/validation_rules/tmpl/default.php | 3 +- .../validation_rules/tmpl/default_body.php | 7 +- .../validation_rules/tmpl/default_head.php | 2 +- admin/views/validation_rules/view.html.php | 4 +- componentbuilder.xml | 4 +- site/controllers/api.php | 2 +- .../en-GB/en-GB.com_componentbuilder.ini | 2 +- 190 files changed, 2186 insertions(+), 2224 deletions(-) diff --git a/README.md b/README.md index fba3b9200..99086cb7a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This is a [Joomla 3.x](https://extensions.joomla.org/extension/component-builder The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. -Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! +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 [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.11.7) with **ALL** its features and **ALL** concepts totally open-source and free! @@ -144,11 +144,11 @@ 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*: 21st November, 2020 ++ *Last Build*: 24th November, 2020 + *Version*: 2.11.7 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **284083** ++ *Line count*: **283833** + *Field count*: **1537** + *File count*: **1799** + *Folder count*: **304** diff --git a/admin/README.txt b/admin/README.txt index fba3b9200..99086cb7a 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -10,7 +10,7 @@ This is a [Joomla 3.x](https://extensions.joomla.org/extension/component-builder The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. -Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! +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 [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.11.7) with **ALL** its features and **ALL** concepts totally open-source and free! @@ -144,11 +144,11 @@ 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*: 21st November, 2020 ++ *Last Build*: 24th November, 2020 + *Version*: 2.11.7 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **284083** ++ *Line count*: **283833** + *Field count*: **1537** + *File count*: **1799** + *Folder count*: **304** diff --git a/admin/compiler/joomla_3/JViewLegacy_list.php b/admin/compiler/joomla_3/JViewLegacy_list.php index e05449944..0f819adde 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list.php +++ b/admin/compiler/joomla_3/JViewLegacy_list.php @@ -39,7 +39,7 @@ class ###Component###View###Views### extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser();###ADMIN_DIPLAY_METHOD### - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php index 6dae9b775..b6268f976 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -391,7 +391,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin $subject = JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY'); // email the message componentbuilderEmail::send($email, $subject, componentbuilderEmail::setTableBody($message, $subject), $plainText, 1); - $backupNotice[] = JText::_('COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND'); + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SENT'); } else { diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 934f70b9e..306ec094e 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -375,16 +375,16 @@ class Fields extends Structure /** * set the Field set of a view * - * @param array $view The view data - * @param string $component The component name - * @param string $view_name_single The single view name - * @param string $view_name_list The list view name + * @param array $view The view data + * @param string $component The component name + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name * * @return string The fields set in xml * */ - public function setFieldSet($view, $component, $view_name_single, - $view_name_list + public function setFieldSet($view, $component, $nameSingleCode, + $nameListCode ) { // setup the fieldset of this view if (isset($view['settings']->fields) @@ -393,12 +393,12 @@ class Fields extends Structure // add metadata to the view if (isset($view['metadata']) && $view['metadata']) { - $this->metadataBuilder[$view_name_single] = $view_name_single; + $this->metadataBuilder[$nameSingleCode] = $nameSingleCode; } // add access to the view if (isset($view['access']) && $view['access']) { - $this->accessBuilder[$view_name_single] = $view_name_single; + $this->accessBuilder[$nameSingleCode] = $nameSingleCode; } // main lang prefix $langView = $this->langPrefix . '_' @@ -560,7 +560,7 @@ class Fields extends Structure { // build field set using string manipulation return $this->stringFieldSet( - $view, $component, $view_name_single, $view_name_list, + $view, $component, $nameSingleCode, $nameListCode, $langView, $langViews ); } @@ -568,7 +568,7 @@ class Fields extends Structure { // build field set with simpleXMLElement class return $this->simpleXMLFieldSet( - $view, $component, $view_name_single, $view_name_list, + $view, $component, $nameSingleCode, $nameListCode, $langView, $langViews ); } @@ -580,18 +580,18 @@ class Fields extends Structure /** * build field set using string manipulation * - * @param array $view The view data - * @param string $component The component name - * @param string $view_name_single The single view name - * @param string $view_name_list The list view name - * @param string $langView The language string of the view - * @param string $langViews The language string of the views + * @param array $view The view data + * @param string $component The component name + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param string $langView The language string of the view + * @param string $langViews The language string of the views * * @return string The fields set in xml * */ - protected function stringFieldSet($view, $component, $view_name_single, - $view_name_list, $langView, $langViews + protected function stringFieldSet($view, $component, $nameSingleCode, + $nameListCode, $langView, $langViews ) { // set the read only $readOnly = false; @@ -609,8 +609,8 @@ class Fields extends Structure $this->triggerEvent( 'jcb_ce_onBeforeBuildFields', array(&$this->componentContext, &$dynamicFields, &$readOnly, - &$dbkey, &$view, &$component, &$view_name_single, - &$view_name_list, &$this->placeholders, &$langView, + &$dbkey, &$view, &$component, &$nameSingleCode, + &$nameListCode, &$this->placeholders, &$langView, &$langViews) ); // TODO we should add the global and local view switch if field for front end @@ -618,7 +618,7 @@ class Fields extends Structure { $dynamicFields .= $this->setDynamicField( $field, $view, $view['settings']->type, $langView, - $view_name_single, $view_name_list, $this->placeholders, $dbkey, + $nameSingleCode, $nameListCode, $this->placeholders, $dbkey, true ); } @@ -626,8 +626,8 @@ class Fields extends Structure $this->triggerEvent( 'jcb_ce_onAfterBuildFields', array(&$this->componentContext, &$dynamicFields, &$readOnly, - &$dbkey, &$view, &$component, &$view_name_single, - &$view_name_list, &$this->placeholders, &$langView, + &$dbkey, &$view, &$component, &$nameSingleCode, + &$nameListCode, &$this->placeholders, &$langView, &$langViews) ); // set the default fields @@ -638,7 +638,7 @@ class Fields extends Structure $fieldSet[] = $this->_t(2) . ""; // if id is not set - if (!isset($this->fieldsNames[$view_name_single]['id'])) + if (!isset($this->fieldsNames[$nameSingleCode]['id'])) { $fieldSet[] = $this->_t(2) . "_t(3) . "name=" . '"id"'; @@ -652,7 +652,7 @@ class Fields extends Structure $this->fieldCount++; } // if created is not set - if (!isset($this->fieldsNames[$view_name_single]['created'])) + if (!isset($this->fieldsNames[$nameSingleCode]['created'])) { $fieldSet[] = $this->_t(2) . ""; @@ -675,7 +675,7 @@ class Fields extends Structure $this->fieldCount++; } // if created_by is not set - if (!isset($this->fieldsNames[$view_name_single]['created_by'])) + if (!isset($this->fieldsNames[$nameSingleCode]['created_by'])) { $fieldSet[] = $this->_t(2) . ""; @@ -695,7 +695,7 @@ class Fields extends Structure $this->fieldCount++; } // if published is not set - if (!isset($this->fieldsNames[$view_name_single]['published'])) + if (!isset($this->fieldsNames[$nameSingleCode]['published'])) { $fieldSet[] = $this->_t(2) . ""; @@ -722,7 +722,7 @@ class Fields extends Structure $this->fieldCount++; } // if modified is not set - if (!isset($this->fieldsNames[$view_name_single]['modified'])) + if (!isset($this->fieldsNames[$nameSingleCode]['modified'])) { $fieldSet[] = $this->_t(2) . ""; @@ -737,7 +737,7 @@ class Fields extends Structure $this->fieldCount++; } // if modified_by is not set - if (!isset($this->fieldsNames[$view_name_single]['modified_by'])) + if (!isset($this->fieldsNames[$nameSingleCode]['modified_by'])) { $fieldSet[] = $this->_t(2) . ""; @@ -755,11 +755,11 @@ class Fields extends Structure $this->fieldCount++; } // check if view has access - if (isset($this->accessBuilder[$view_name_single]) + if (isset($this->accessBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkString( - $this->accessBuilder[$view_name_single] + $this->accessBuilder[$nameSingleCode] ) - && !isset($this->fieldsNames[$view_name_single]['access'])) + && !isset($this->fieldsNames[$nameSingleCode]['access'])) { $fieldSet[] = $this->_t(2) . ""; @@ -778,7 +778,7 @@ class Fields extends Structure $this->fieldCount++; } // if ordering is not set - if (!isset($this->fieldsNames[$view_name_single]['ordering'])) + if (!isset($this->fieldsNames[$nameSingleCode]['ordering'])) { $fieldSet[] = $this->_t(2) . ""; @@ -801,7 +801,7 @@ class Fields extends Structure $this->fieldCount++; } // if version is not set - if (!isset($this->fieldsNames[$view_name_single]['version'])) + if (!isset($this->fieldsNames[$nameSingleCode]['version'])) { $fieldSet[] = $this->_t(2) . ""; @@ -821,13 +821,13 @@ class Fields extends Structure $this->fieldCount++; } // check if metadata is added to this view - if (isset($this->metadataBuilder[$view_name_single]) + if (isset($this->metadataBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkString( - $this->metadataBuilder[$view_name_single] + $this->metadataBuilder[$nameSingleCode] )) { // metakey - if (!isset($this->fieldsNames[$view_name_single]['metakey'])) + if (!isset($this->fieldsNames[$nameSingleCode]['metakey'])) { $fieldSet[] = $this->_t(2) . ""; @@ -845,7 +845,7 @@ class Fields extends Structure $this->fieldCount++; } // metadesc - if (!isset($this->fieldsNames[$view_name_single]['metadesc'])) + if (!isset($this->fieldsNames[$nameSingleCode]['metadesc'])) { $fieldSet[] = $this->_t(2) . ""; @@ -872,14 +872,14 @@ class Fields extends Structure // close fieldset $fieldSet[] = $this->_t(1) . ""; // check if metadata is added to this view - if (isset($this->metadataBuilder[$view_name_single]) + if (isset($this->metadataBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkString( - $this->metadataBuilder[$view_name_single] + $this->metadataBuilder[$nameSingleCode] )) { - if (!isset($this->fieldsNames[$view_name_single]['robots']) - || !isset($this->fieldsNames[$view_name_single]['rights']) - || !isset($this->fieldsNames[$view_name_single]['author'])) + if (!isset($this->fieldsNames[$nameSingleCode]['robots']) + || !isset($this->fieldsNames[$nameSingleCode]['rights']) + || !isset($this->fieldsNames[$nameSingleCode]['author'])) { $fieldSet[] = PHP_EOL . $this->_t(1) . "' . PHP_EOL + . $this->_t(1) . $this->xmlPrettyPrint( + $xmlField, 'field' + ); + } + } + + // return the string + return $xmlField; + } + /** * set a field * - * @param string $setType The set of fields type - * @param array $fieldAttributes The field values - * @param string $name The field name - * @param string $typeName The field type - * @param string $langView The language string of the view - * @param string $view_name_single The single view name - * @param string $view_name_list The list view name - * @param array $placeholders The place holder and replace values - * @param string $optionArray The option bucket array used to set the field options if needed. - * @param array $custom Used when field is from config - * @param string $taber The tabs to add in layout (only in string manipulation) + * @param string $setType The set of fields type + * @param array $fieldAttributes The field values + * @param string $name The field name + * @param string $typeName The field type + * @param string $langView The language string of the view + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param array $placeholders The place holder and replace values + * @param string $optionArray The option bucket array used to set the field options if needed. + * @param array $custom Used when field is from config + * @param string $taber The tabs to add in layout (only in string manipulation) * * @return SimpleXMLElement The field in xml * */ private function setField($setType, &$fieldAttributes, &$name, &$typeName, - &$langView, &$view_name_single, &$view_name_list, $placeholders, + &$langView, &$nameSingleCode, &$nameListCode, $placeholders, &$optionArray, $custom = null, $taber = '' ) { // count the dynamic fields created @@ -1605,7 +1725,7 @@ class Fields extends Structure // build field set using string manipulation return $this->stringSetField( $setType, $fieldAttributes, $name, $typeName, $langView, - $view_name_single, $view_name_list, $placeholders, $optionArray, + $nameSingleCode, $nameListCode, $placeholders, $optionArray, $custom, $taber ); } @@ -1614,7 +1734,7 @@ class Fields extends Structure // build field set with simpleXMLElement class return $this->simpleXMLSetField( $setType, $fieldAttributes, $name, $typeName, $langView, - $view_name_single, $view_name_list, $placeholders, $optionArray, + $nameSingleCode, $nameListCode, $placeholders, $optionArray, $custom ); } @@ -1623,23 +1743,23 @@ class Fields extends Structure /** * set a field using string manipulation * - * @param string $setType The set of fields type - * @param array $fieldAttributes The field values - * @param string $name The field name - * @param string $typeName The field type - * @param string $langView The language string of the view - * @param string $view_name_single The single view name - * @param string $view_name_list The list view name - * @param array $placeholders The place holder and replace values - * @param string $optionArray The option bucket array used to set the field options if needed. - * @param array $custom Used when field is from config - * @param string $taber The tabs to add in layout + * @param string $setType The set of fields type + * @param array $fieldAttributes The field values + * @param string $name The field name + * @param string $typeName The field type + * @param string $langView The language string of the view + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param array $placeholders The place holder and replace values + * @param string $optionArray The option bucket array used to set the field options if needed. + * @param array $custom Used when field is from config + * @param string $taber The tabs to add in layout * * @return SimpleXMLElement The field in xml * */ protected function stringSetField($setType, &$fieldAttributes, &$name, - &$typeName, &$langView, &$view_name_single, &$view_name_list, + &$typeName, &$langView, &$nameSingleCode, &$nameListCode, $placeholders, &$optionArray, $custom = null, $taber = '' ) { $field = ''; @@ -2013,14 +2133,14 @@ class Fields extends Structure // load the field data $fieldsSets = array_map( function ($id) use ( - $view_name_single, $view_name_list, $_resolverKey + $nameSingleCode, $nameListCode, $_resolverKey ) { // start field $field = array(); $field['field'] = $id; // set the field details $this->setFieldDetails( - $field, $view_name_single, $view_name_list, + $field, $nameSingleCode, $nameListCode, $_resolverKey ); @@ -2037,7 +2157,7 @@ class Fields extends Structure )) { $r_name = $this->getFieldName( - $fieldData, $view_name_list, $_resolverKey + $fieldData, $nameListCode, $_resolverKey ); $r_typeName = $this->getFieldType($fieldData); $r_multiple = false; @@ -2048,7 +2168,7 @@ class Fields extends Structure $r_fieldValues = $this->setFieldAttributes( $fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, - $view_name_list, $view_name_single, + $nameListCode, $nameSingleCode, $placeholders, true ); // check if values were set @@ -2066,7 +2186,7 @@ class Fields extends Structure $field .= $this->setField( 'option', $r_fieldValues, $r_name, $r_typeName, $langView, - $view_name_single, $view_name_list, + $nameSingleCode, $nameListCode, $placeholders, $r_optionArray, null, $r_taber ); @@ -2083,7 +2203,7 @@ class Fields extends Structure $field .= $this->setField( 'custom', $r_fieldValues, $r_name, $r_typeName, $langView, - $view_name_single, $view_name_list, + $nameSingleCode, $nameListCode, $placeholders, $r_optionArray, null, $r_taber ); @@ -2113,8 +2233,8 @@ class Fields extends Structure 'custom' => $custom); // set the custom field file $this->setCustomFieldTypeFile( - $data, $view_name_list, - $view_name_single + $data, $nameListCode, + $nameSingleCode ); } else @@ -2123,7 +2243,7 @@ class Fields extends Structure $field .= $this->setField( 'plain', $r_fieldValues, $r_name, $r_typeName, $langView, - $view_name_single, $view_name_list, + $nameSingleCode, $nameListCode, $placeholders, $r_optionArray, null, $r_taber ); @@ -2179,14 +2299,14 @@ class Fields extends Structure // load the field data $fieldsSets = array_map( function ($id) use ( - $view_name_single, $view_name_list, $_resolverKey + $nameSingleCode, $nameListCode, $_resolverKey ) { // start field $field = array(); $field['field'] = $id; // set the field details $this->setFieldDetails( - $field, $view_name_single, $view_name_list, + $field, $nameSingleCode, $nameListCode, $_resolverKey ); @@ -2203,7 +2323,7 @@ class Fields extends Structure )) { $r_name = $this->getFieldName( - $fieldData, $view_name_list, $_resolverKey + $fieldData, $nameListCode, $_resolverKey ); $r_typeName = $this->getFieldType($fieldData); $r_multiple = false; @@ -2214,7 +2334,7 @@ class Fields extends Structure $r_fieldValues = $this->setFieldAttributes( $fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, - $view_name_list, $view_name_single, + $nameListCode, $nameSingleCode, $placeholders, true ); // check if values were set @@ -2232,7 +2352,7 @@ class Fields extends Structure $field .= $this->setField( 'option', $r_fieldValues, $r_name, $r_typeName, $langView, - $view_name_single, $view_name_list, + $nameSingleCode, $nameListCode, $placeholders, $r_optionArray, null, $r_taber ); @@ -2256,7 +2376,7 @@ class Fields extends Structure $field .= $this->setField( 'special', $r_fieldValues, $r_name, $r_typeName, $langView, - $view_name_single, $view_name_list, + $nameSingleCode, $nameListCode, $placeholders, $r_optionArray, null, $r_taber ); @@ -2274,7 +2394,7 @@ class Fields extends Structure $field .= $this->setField( 'custom', $r_fieldValues, $r_name, $r_typeName, $langView, - $view_name_single, $view_name_list, + $nameSingleCode, $nameListCode, $placeholders, $r_optionArray, null, $r_taber ); @@ -2304,8 +2424,8 @@ class Fields extends Structure 'custom' => $custom); // set the custom field file $this->setCustomFieldTypeFile( - $data, $view_name_list, - $view_name_single + $data, $nameListCode, + $nameSingleCode ); } else @@ -2314,7 +2434,7 @@ class Fields extends Structure $field .= $this->setField( 'plain', $r_fieldValues, $r_name, $r_typeName, $langView, - $view_name_single, $view_name_list, + $nameSingleCode, $nameListCode, $placeholders, $r_optionArray, null, $r_taber ); @@ -2614,10 +2734,10 @@ 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' === $nameSingleCode && 'configs' === $nameListCode + || (strpos($nameSingleCode, 'P|uG!n') !== false || strpos( - $view_name_single, 'M0dU|3' + $nameSingleCode, 'M0dU|3' ) !== false)) { // set lang (just incase) @@ -2628,7 +2748,7 @@ class Fields extends Structure 'lang' => $listLangName, 'custom' => $custom); // set the custom field file $this->setCustomFieldTypeFile( - $data, $view_name_list, $view_name_single + $data, $nameListCode, $nameSingleCode ); } } @@ -2640,22 +2760,22 @@ class Fields extends Structure /** * set a field with simpleXMLElement class * - * @param string $setType The set of fields type - * @param array $fieldAttributes The field values - * @param string $name The field name - * @param string $typeName The field type - * @param string $langView The language string of the view - * @param string $view_name_single The single view name - * @param string $view_name_list The list view name - * @param array $placeholders The place holder and replace values - * @param string $optionArray The option bucket array used to set the field options if needed. - * @param array $custom Used when field is from config + * @param string $setType The set of fields type + * @param array $fieldAttributes The field values + * @param string $name The field name + * @param string $typeName The field type + * @param string $langView The language string of the view + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param array $placeholders The place holder and replace values + * @param string $optionArray The option bucket array used to set the field options if needed. + * @param array $custom Used when field is from config * * @return SimpleXMLElement The field in xml * */ protected function simpleXMLSetField($setType, &$fieldAttributes, &$name, - &$typeName, &$langView, &$view_name_single, &$view_name_list, + &$typeName, &$langView, &$nameSingleCode, &$nameListCode, $placeholders, &$optionArray, $custom = null ) { $field = new stdClass(); @@ -3009,14 +3129,14 @@ class Fields extends Structure // load the field data $fieldsSets = array_map( function ($id) use ( - $view_name_single, $view_name_list, $_resolverKey + $nameSingleCode, $nameListCode, $_resolverKey ) { // start field $field = array(); $field['field'] = $id; // set the field details $this->setFieldDetails( - $field, $view_name_single, $view_name_list, + $field, $nameSingleCode, $nameListCode, $_resolverKey ); @@ -3033,7 +3153,7 @@ class Fields extends Structure )) { $r_name = $this->getFieldName( - $fieldData, $view_name_list, $_resolverKey + $fieldData, $nameListCode, $_resolverKey ); $r_typeName = $this->getFieldType($fieldData); $r_multiple = false; @@ -3042,7 +3162,7 @@ class Fields extends Structure $r_fieldValues = $this->setFieldAttributes( $fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, - $view_name_list, $view_name_single, + $nameListCode, $nameSingleCode, $placeholders, true ); // check if values were set @@ -3061,7 +3181,7 @@ class Fields extends Structure $fieldSetXML, $this->setField( 'option', $r_fieldValues, $r_name, $r_typeName, $langView, - $view_name_single, $view_name_list, + $nameSingleCode, $nameListCode, $placeholders, $r_optionArray ) ); @@ -3079,7 +3199,7 @@ class Fields extends Structure $fieldSetXML, $this->setField( 'custom', $r_fieldValues, $r_name, $r_typeName, $langView, - $view_name_single, $view_name_list, + $nameSingleCode, $nameListCode, $placeholders, $r_optionArray ) ); @@ -3109,8 +3229,8 @@ class Fields extends Structure 'custom' => $custom); // set the custom field file $this->setCustomFieldTypeFile( - $data, $view_name_list, - $view_name_single + $data, $nameListCode, + $nameSingleCode ); } else @@ -3120,7 +3240,7 @@ class Fields extends Structure $fieldSetXML, $this->setField( 'plain', $r_fieldValues, $r_name, $r_typeName, $langView, - $view_name_single, $view_name_list, + $nameSingleCode, $nameListCode, $placeholders, $r_optionArray ) ); @@ -3192,7 +3312,7 @@ class Fields extends Structure // load the field data $fieldsSets = array_map( function ($id) use ( - $view_name_single, $view_name_list, + $nameSingleCode, $nameListCode, $_resolverKey ) { // start field @@ -3200,7 +3320,7 @@ class Fields extends Structure $field['field'] = $id; // set the field details $this->setFieldDetails( - $field, $view_name_single, $view_name_list, + $field, $nameSingleCode, $nameListCode, $_resolverKey ); @@ -3217,7 +3337,7 @@ class Fields extends Structure )) { $r_name = $this->getFieldName( - $fieldData, $view_name_list, $_resolverKey + $fieldData, $nameListCode, $_resolverKey ); $r_typeName = $this->getFieldType($fieldData); $r_multiple = false; @@ -3226,7 +3346,7 @@ class Fields extends Structure $r_fieldValues = $this->setFieldAttributes( $fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, - $view_name_list, $view_name_single, + $nameListCode, $nameSingleCode, $placeholders, true ); // check if values were set @@ -3245,7 +3365,7 @@ class Fields extends Structure $form, $this->setField( 'option', $r_fieldValues, $r_name, $r_typeName, $langView, - $view_name_single, $view_name_list, + $nameSingleCode, $nameListCode, $placeholders, $r_optionArray ) ); @@ -3271,8 +3391,8 @@ class Fields extends Structure $form, $this->setField( 'special', $r_fieldValues, $r_name, $r_typeName, $langView, - $view_name_single, - $view_name_list, $placeholders, + $nameSingleCode, + $nameListCode, $placeholders, $r_optionArray ) ); @@ -3292,7 +3412,7 @@ class Fields extends Structure $form, $this->setField( 'custom', $r_fieldValues, $r_name, $r_typeName, $langView, - $view_name_single, $view_name_list, + $nameSingleCode, $nameListCode, $placeholders, $r_optionArray ) ); @@ -3322,8 +3442,8 @@ class Fields extends Structure 'custom' => $custom); // set the custom field file $this->setCustomFieldTypeFile( - $data, $view_name_list, - $view_name_single + $data, $nameListCode, + $nameSingleCode ); } else @@ -3333,7 +3453,7 @@ class Fields extends Structure $form, $this->setField( 'plain', $r_fieldValues, $r_name, $r_typeName, $langView, - $view_name_single, $view_name_list, + $nameSingleCode, $nameListCode, $placeholders, $r_optionArray ) ); @@ -3599,11 +3719,11 @@ 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 + if (('config' === $nameSingleCode + && 'configs' === $nameListCode) + || (strpos($nameSingleCode, 'P|uG!n') !== false || strpos( - $view_name_single, 'M0dU|3' + $nameSingleCode, 'M0dU|3' ) !== false)) { // set lang (just incase) @@ -3614,7 +3734,7 @@ class Fields extends Structure 'lang' => $listLangName, 'custom' => $custom); // set the custom field file $this->setCustomFieldTypeFile( - $data, $view_name_list, $view_name_single + $data, $nameListCode, $nameSingleCode ); } } @@ -3625,15 +3745,15 @@ class Fields extends Structure /** * set the layout builder * - * @param string $view_name_single The single edit view code name - * @param string $tabName The tab code name - * @param string $name The field code name - * @param array $field The field details + * @param string $nameSingleCode The single edit view code name + * @param string $tabName The tab code name + * @param string $name The field code name + * @param array $field The field details * * @return void * */ - public function setLayoutBuilder(&$view_name_single, &$tabName, &$name, + public function setLayoutBuilder(&$nameSingleCode, &$tabName, &$name, &$field ) { // first fix the zero order @@ -3641,100 +3761,100 @@ class Fields extends Structure // as zero is expected to behave if ($field['order_edit'] == 0) { - if (!isset($this->zeroOrderFix[$view_name_single])) + if (!isset($this->zeroOrderFix[$nameSingleCode])) { - $this->zeroOrderFix[$view_name_single] = array(); + $this->zeroOrderFix[$nameSingleCode] = array(); } - if (!isset($this->zeroOrderFix[$view_name_single][(int) $field['tab']])) + if (!isset($this->zeroOrderFix[$nameSingleCode][(int) $field['tab']])) { - $this->zeroOrderFix[$view_name_single][(int) $field['tab']] + $this->zeroOrderFix[$nameSingleCode][(int) $field['tab']] = -999; } else { - $this->zeroOrderFix[$view_name_single][(int) $field['tab']]++; + $this->zeroOrderFix[$nameSingleCode][(int) $field['tab']]++; } $field['order_edit'] - = $this->zeroOrderFix[$view_name_single][(int) $field['tab']]; + = $this->zeroOrderFix[$nameSingleCode][(int) $field['tab']]; } // now build the layout if (ComponentbuilderHelper::checkString($tabName) && $tabName != 'publishing') { - $this->tabCounter[$view_name_single][(int) $field['tab']] + $this->tabCounter[$nameSingleCode][(int) $field['tab']] = $tabName; - if (isset($this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']][(int) $field['order_edit']])) + if (isset($this->layoutBuilder[$nameSingleCode][$tabName][(int) $field['alignment']][(int) $field['order_edit']])) { $size = (int) count( - (array) $this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']] + (array) $this->layoutBuilder[$nameSingleCode][$tabName][(int) $field['alignment']] ) + 1; - while (isset($this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']][$size])) + while (isset($this->layoutBuilder[$nameSingleCode][$tabName][(int) $field['alignment']][$size])) { $size++; } - $this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']][$size] + $this->layoutBuilder[$nameSingleCode][$tabName][(int) $field['alignment']][$size] = $name; } else { - $this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']][(int) $field['order_edit']] + $this->layoutBuilder[$nameSingleCode][$tabName][(int) $field['alignment']][(int) $field['order_edit']] = $name; } // check if default fields were over written if (in_array($name, $this->defaultFields)) { // just to eliminate - $this->movedPublishingFields[$view_name_single][$name] = $name; + $this->movedPublishingFields[$nameSingleCode][$name] = $name; } } elseif ($tabName === 'publishing' || $tabName === 'Publishing') { if (!in_array($name, $this->defaultFields)) { - if (isset($this->newPublishingFields[$view_name_single][(int) $field['alignment']][(int) $field['order_edit']])) + if (isset($this->newPublishingFields[$nameSingleCode][(int) $field['alignment']][(int) $field['order_edit']])) { $size = (int) count( - (array) $this->newPublishingFields[$view_name_single][(int) $field['alignment']] + (array) $this->newPublishingFields[$nameSingleCode][(int) $field['alignment']] ) + 1; - while (isset($this->newPublishingFields[$view_name_single][(int) $field['alignment']][$size])) + while (isset($this->newPublishingFields[$nameSingleCode][(int) $field['alignment']][$size])) { $size++; } - $this->newPublishingFields[$view_name_single][(int) $field['alignment']][$size] + $this->newPublishingFields[$nameSingleCode][(int) $field['alignment']][$size] = $name; } else { - $this->newPublishingFields[$view_name_single][(int) $field['alignment']][(int) $field['order_edit']] + $this->newPublishingFields[$nameSingleCode][(int) $field['alignment']][(int) $field['order_edit']] = $name; } } } else { - $this->tabCounter[$view_name_single][1] = 'Details'; - if (isset($this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']][(int) $field['order_edit']])) + $this->tabCounter[$nameSingleCode][1] = 'Details'; + if (isset($this->layoutBuilder[$nameSingleCode]['Details'][(int) $field['alignment']][(int) $field['order_edit']])) { $size = (int) count( - (array) $this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']] + (array) $this->layoutBuilder[$nameSingleCode]['Details'][(int) $field['alignment']] ) + 1; - while (isset($this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']][$size])) + while (isset($this->layoutBuilder[$nameSingleCode]['Details'][(int) $field['alignment']][$size])) { $size++; } - $this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']][$size] + $this->layoutBuilder[$nameSingleCode]['Details'][(int) $field['alignment']][$size] = $name; } else { - $this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']][(int) $field['order_edit']] + $this->layoutBuilder[$nameSingleCode]['Details'][(int) $field['alignment']][(int) $field['order_edit']] = $name; } // check if default fields were over written if (in_array($name, $this->defaultFields)) { // just to eliminate - $this->movedPublishingFields[$view_name_single][$name] = $name; + $this->movedPublishingFields[$nameSingleCode][$name] = $name; } } } @@ -3812,23 +3932,23 @@ class Fields extends Structure /** * set field attributes * - * @param array $field The field data - * @param int $viewType The view type - * @param string $name The field name - * @param string $typeName The field type - * @param boolean $multiple The switch to set multiple selection option - * @param string $langLabel The language string for field label - * @param string $langView The language string of the view - * @param string $view_name_list The list view name - * @param string $view_name_single The single view name - * @param array $placeholders The place holder and replace values - * @param boolean $repeatable The repeatable field switch + * @param array $field The field data + * @param int $viewType The view type + * @param string $name The field name + * @param string $typeName The field type + * @param boolean $multiple The switch to set multiple selection option + * @param string $langLabel The language string for field label + * @param string $langView The language string of the view + * @param string $nameListCode The list view name + * @param string $nameSingleCode The single view name + * @param array $placeholders The place holder and replace values + * @param boolean $repeatable The repeatable field switch * * @return array The field attributes * */ private function setFieldAttributes(&$field, &$viewType, &$name, &$typeName, - &$multiple, &$langLabel, $langView, $view_name_list, $view_name_single, + &$multiple, &$langLabel, $langView, $nameListCode, $nameSingleCode, $placeholders, $repeatable = false ) { // reset array @@ -4098,11 +4218,11 @@ class Fields extends Structure if ($property['name'] === 'label') { if (isset($fieldAttributes['name']) - && isset($this->uniqueNames[$view_name_list]['names'][$fieldAttributes['name']])) + && isset($this->uniqueNames[$nameListCode]['names'][$fieldAttributes['name']])) { $xmlValue .= ' (' . ComponentbuilderHelper::safeString( - $this->uniqueNames[$view_name_list]['names'][$fieldAttributes['name']] + $this->uniqueNames[$nameListCode]['names'][$fieldAttributes['name']] ) . ')'; } } @@ -4226,7 +4346,7 @@ class Fields extends Structure ); if (ComponentbuilderHelper::checkString($listclass)) { - $this->listFieldClass[$view_name_list][$fieldAttributes['name']] + $this->listFieldClass[$nameListCode][$fieldAttributes['name']] = $listclass; } // check if we find reason to remove this field from being escaped @@ -4235,7 +4355,7 @@ class Fields extends Structure ); if (ComponentbuilderHelper::checkString($escaped)) { - $this->doNotEscape[$view_name_list][] + $this->doNotEscape[$nameListCode][] = $fieldAttributes['name']; } // check if we have display switch for dynamic placment @@ -4275,23 +4395,23 @@ class Fields extends Structure /** * set Builders * - * @param string $langLabel The language string for field label - * @param string $langView The language string of the view - * @param string $view_name_single The single view name - * @param string $view_name_list The list view name - * @param string $name The field name - * @param array $view The view data - * @param array $field The field data - * @param string $typeName The field type - * @param boolean $multiple The switch to set multiple selection option - * @param boolean $custom The custom field switch - * @param boolean $options The options switch + * @param string $langLabel The language string for field label + * @param string $langView The language string of the view + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param string $name The field name + * @param array $view The view data + * @param array $field The field data + * @param string $typeName The field type + * @param boolean $multiple The switch to set multiple selection option + * @param boolean $custom The custom field switch + * @param boolean $options The options switch * * @return void * */ - public function setBuilders($langLabel, $langView, $view_name_single, - $view_name_list, $name, $view, $field, $typeName, $multiple, + public function setBuilders($langLabel, $langView, $nameSingleCode, + $nameListCode, $name, $view, $field, $typeName, $multiple, $custom = false, $options = false ) { // dbSwitch @@ -4304,7 +4424,7 @@ class Fields extends Structure elseif ($typeName === 'tag') { // set tags for this view but don't load to DB - $this->tagsBuilder[$view_name_single] = $view_name_single; + $this->tagsBuilder[$nameSingleCode] = $nameSingleCode; } elseif (isset($field['settings']->datatype)) { @@ -4315,7 +4435,7 @@ class Fields extends Structure $textKeys = array('TEXT', 'TINYTEXT', 'MEDIUMTEXT', 'LONGTEXT', 'BLOB', 'TINYBLOB', 'MEDIUMBLOB', 'LONGBLOB'); // build the query values - $this->queryBuilder[$view_name_single][$name]['type'] + $this->queryBuilder[$nameSingleCode][$name]['type'] = $field['settings']->datatype; // check if this is a number if (in_array($field['settings']->datatype, $numberKeys)) @@ -4346,25 +4466,25 @@ class Fields extends Structure // check if this is not text if (!in_array($field['settings']->datatype, $textKeys)) { - $this->queryBuilder[$view_name_single][$name]['lenght'] + $this->queryBuilder[$nameSingleCode][$name]['lenght'] = $field['settings']->datalenght; - $this->queryBuilder[$view_name_single][$name]['lenght_other'] + $this->queryBuilder[$nameSingleCode][$name]['lenght_other'] = $field['settings']->datalenght_other; - $this->queryBuilder[$view_name_single][$name]['default'] + $this->queryBuilder[$nameSingleCode][$name]['default'] = $field['settings']->datadefault; - $this->queryBuilder[$view_name_single][$name]['other'] + $this->queryBuilder[$nameSingleCode][$name]['other'] = $field['settings']->datadefault_other; } // fall back unto EMPTY for text else { - $this->queryBuilder[$view_name_single][$name]['default'] + $this->queryBuilder[$nameSingleCode][$name]['default'] = 'EMPTY'; } // to identify the field - $this->queryBuilder[$view_name_single][$name]['ID'] + $this->queryBuilder[$nameSingleCode][$name]['ID'] = $field['settings']->id; - $this->queryBuilder[$view_name_single][$name]['null_switch'] + $this->queryBuilder[$nameSingleCode][$name]['null_switch'] = $field['settings']->null_switch; // set index types $_guid = true; @@ -4374,7 +4494,7 @@ class Fields extends Structure )) { // build unique keys of this view for db - $this->dbUniqueKeys[$view_name_single][] = $name; + $this->dbUniqueKeys[$nameSingleCode][] = $name; // prevent guid from being added twice if ('guid' === $name) { @@ -4389,12 +4509,12 @@ class Fields extends Structure && !in_array($field['settings']->datatype, $textKeys)) { // build keys of this view for db - $this->dbKeys[$view_name_single][] = $name; + $this->dbKeys[$nameSingleCode][] = $name; } // special treatment for GUID if ('guid' === $name && $_guid) { - $this->dbUniqueGuid[$view_name_single] = true; + $this->dbUniqueGuid[$nameSingleCode] = true; } } // set list switch @@ -4404,37 +4524,37 @@ class Fields extends Structure || $field['list'] == 4)); // set list join $listJoin - = (isset($this->listJoinBuilder[$view_name_list][(int) $field['field']])); + = (isset($this->listJoinBuilder[$nameListCode][(int) $field['field']])); // add history to this view if (isset($view['history']) && $view['history']) { - $this->historyBuilder[$view_name_single] = $view_name_single; + $this->historyBuilder[$nameSingleCode] = $nameSingleCode; } // set Alias (only one title per view) if ($dbSwitch && isset($field['alias']) && $field['alias'] - && !isset($this->aliasBuilder[$view_name_single])) + && !isset($this->aliasBuilder[$nameSingleCode])) { - $this->aliasBuilder[$view_name_single] = $name; + $this->aliasBuilder[$nameSingleCode] = $name; } // set Titles (only one title per view) if ($dbSwitch && isset($field['title']) && $field['title'] - && !isset($this->titleBuilder[$view_name_single])) + && !isset($this->titleBuilder[$nameSingleCode])) { - $this->titleBuilder[$view_name_single] = $name; + $this->titleBuilder[$nameSingleCode] = $name; } // category name fix if ($typeName === 'category') { - if (isset($this->catOtherName[$view_name_list]) + if (isset($this->catOtherName[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->catOtherName[$view_name_list] + $this->catOtherName[$nameListCode] )) { - $tempName = $this->catOtherName[$view_name_list]['name']; + $tempName = $this->catOtherName[$nameListCode]['name']; } else { - $tempName = $view_name_list . ' categories'; + $tempName = $nameListCode . ' categories'; } // set lang $listLangName = $langView . '_' @@ -4468,7 +4588,7 @@ class Fields extends Structure // load to list builder if ($listSwitch) { - $this->listBuilder[$view_name_list][] = array( + $this->listBuilder[$nameListCode][] = array( 'id' => (int) $field['field'], 'type' => $typeName, 'code' => $name, @@ -4489,13 +4609,13 @@ class Fields extends Structure // build custom builder list if ($listSwitch || $listJoin) { - $this->customBuilderList[$view_name_list][] = $name; + $this->customBuilderList[$nameListCode][] = $name; } } // load the list join builder if ($listJoin) { - $this->listJoinBuilder[$view_name_list][(int) $field['field']] + $this->listJoinBuilder[$nameListCode][(int) $field['field']] = array( 'type' => $typeName, 'code' => $name, @@ -4513,14 +4633,14 @@ class Fields extends Structure 'options' => $options); } // update the field relations - if (isset($this->fieldRelations[$view_name_list]) - && isset($this->fieldRelations[$view_name_list][(int) $field['field']]) + if (isset($this->fieldRelations[$nameListCode]) + && isset($this->fieldRelations[$nameListCode][(int) $field['field']]) && ComponentbuilderHelper::checkArray( - $this->fieldRelations[$view_name_list][(int) $field['field']] + $this->fieldRelations[$nameListCode][(int) $field['field']] )) { foreach ( - $this->fieldRelations[$view_name_list][(int) $field['field']] as + $this->fieldRelations[$nameListCode][(int) $field['field']] as $area => &$field_values ) { @@ -4532,11 +4652,11 @@ class Fields extends Structure // set the hidden field of this view if ($typeName === 'hidden') { - if (!isset($this->hiddenFieldsBuilder[$view_name_single])) + if (!isset($this->hiddenFieldsBuilder[$nameSingleCode])) { - $this->hiddenFieldsBuilder[$view_name_single] = ''; + $this->hiddenFieldsBuilder[$nameSingleCode] = ''; } - $this->hiddenFieldsBuilder[$view_name_single] .= ',"' . $name . '"'; + $this->hiddenFieldsBuilder[$nameSingleCode] .= ',"' . $name . '"'; } // set all int fields of this view if ($dbSwitch && isset($field['settings']->datatype) @@ -4544,32 +4664,32 @@ class Fields extends Structure || $field['settings']->datatype === 'TINYINT' || $field['settings']->datatype === 'BIGINT')) { - if (!isset($this->intFieldsBuilder[$view_name_single])) + if (!isset($this->intFieldsBuilder[$nameSingleCode])) { - $this->intFieldsBuilder[$view_name_single] = ''; + $this->intFieldsBuilder[$nameSingleCode] = ''; } - $this->intFieldsBuilder[$view_name_single] .= ',"' . $name . '"'; + $this->intFieldsBuilder[$nameSingleCode] .= ',"' . $name . '"'; } // set all dynamic field of this view if ($typeName != 'category' && $typeName != 'repeatable' && $typeName != 'subform' && !in_array($name, $this->defaultFields)) { - if (!isset($this->dynamicfieldsBuilder[$view_name_single])) + if (!isset($this->dynamicfieldsBuilder[$nameSingleCode])) { - $this->dynamicfieldsBuilder[$view_name_single] = ''; + $this->dynamicfieldsBuilder[$nameSingleCode] = ''; } - if (isset($this->dynamicfieldsBuilder[$view_name_single]) + if (isset($this->dynamicfieldsBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkString( - $this->dynamicfieldsBuilder[$view_name_single] + $this->dynamicfieldsBuilder[$nameSingleCode] )) { - $this->dynamicfieldsBuilder[$view_name_single] .= ',"' . $name + $this->dynamicfieldsBuilder[$nameSingleCode] .= ',"' . $name . '":"' . $name . '"'; } else { - $this->dynamicfieldsBuilder[$view_name_single] .= '"' . $name + $this->dynamicfieldsBuilder[$nameSingleCode] .= '"' . $name . '":"' . $name . '"'; } } @@ -4577,12 +4697,12 @@ class Fields extends Structure // set the main(biggest) text field of this view if ($dbSwitch && $typeName === 'editor') { - if (!isset($this->maintextBuilder[$view_name_single]) + if (!isset($this->maintextBuilder[$nameSingleCode]) || !ComponentbuilderHelper::checkString( - $this->maintextBuilder[$view_name_single] + $this->maintextBuilder[$nameSingleCode] )) { - $this->maintextBuilder[$view_name_single] = $name; + $this->maintextBuilder[$nameSingleCode] = $name; } } // set the custom builder @@ -4591,15 +4711,15 @@ class Fields extends Structure && $typeName != 'repeatable' && $typeName != 'subform') { - $this->customBuilder[$view_name_list][] = array('type' => $typeName, - 'code' => $name, - 'lang' => $listLangName, - 'custom' => $custom, - 'method' => $field['settings']->store); + $this->customBuilder[$nameListCode][] = array('type' => $typeName, + 'code' => $name, + 'lang' => $listLangName, + 'custom' => $custom, + 'method' => $field['settings']->store); // set the custom fields needed in content type data - if (!isset($this->customFieldLinksBuilder[$view_name_single])) + if (!isset($this->customFieldLinksBuilder[$nameSingleCode])) { - $this->customFieldLinksBuilder[$view_name_single] = ''; + $this->customFieldLinksBuilder[$nameSingleCode] = ''; } // only load this if table is set if (isset($custom['table']) @@ -4607,7 +4727,7 @@ class Fields extends Structure $custom['table'] )) { - $this->customFieldLinksBuilder[$view_name_single] .= ',{"sourceColumn": "' + $this->customFieldLinksBuilder[$nameSingleCode] .= ',{"sourceColumn": "' . $name . '","targetTable": "' . $custom['table'] . '","targetColumn": "' . $custom['id'] . '","displayColumn": "' . $custom['text'] . '"}'; @@ -4625,18 +4745,18 @@ class Fields extends Structure // setup category for this view if ($dbSwitch && $typeName === 'category') { - if (isset($this->catOtherName[$view_name_list]) + if (isset($this->catOtherName[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->catOtherName[$view_name_list] + $this->catOtherName[$nameListCode] )) { - $otherViews = $this->catOtherName[$view_name_list]['views']; - $otherView = $this->catOtherName[$view_name_list]['view']; + $otherViews = $this->catOtherName[$nameListCode]['views']; + $otherView = $this->catOtherName[$nameListCode]['view']; } else { - $otherViews = $view_name_list; - $otherView = $view_name_single; + $otherViews = $nameListCode; + $otherView = $nameSingleCode; } // get the xml extension name $_extension = $this->setPlaceholders( @@ -4672,20 +4792,20 @@ class Fields extends Structure
Please watch this tutorial before proceeding!!!, code fix

', - $field['field'], $view_name_single, $_extension, + $field['field'], $nameSingleCode, $_extension, $field['field'], $correction ), 'Error' ); } } // load the category builder - TODO must move all to single view - $this->categoryBuilder[$view_name_list] = array('code' => $name, - 'name' => $listLangName, - 'extension' => $_extension); + $this->categoryBuilder[$nameListCode] = array('code' => $name, + 'name' => $listLangName, + 'extension' => $_extension); // also set code name for title alias fix - $this->catCodeBuilder[$view_name_single] = array('code' => $name, - 'views' => $otherViews, - 'view' => $otherView); + $this->catCodeBuilder[$nameSingleCode] = array('code' => $name, + 'views' => $otherViews, + 'view' => $otherView); } // setup checkbox for this view if ($dbSwitch @@ -4694,7 +4814,7 @@ class Fields extends Structure && isset($custom['extends']) && $custom['extends'] === 'checkboxes'))) { - $this->checkboxBuilder[$view_name_single][] = $name; + $this->checkboxBuilder[$nameSingleCode][] = $name; } // setup checkboxes and other json items for this view // if we have advance field modeling and the field is not being set in the DB @@ -4710,42 +4830,42 @@ class Fields extends Structure { case 1: // JSON_STRING_ENCODE - $this->jsonStringBuilder[$view_name_single][] = $name; + $this->jsonStringBuilder[$nameSingleCode][] = $name; // Site settings of each field if needed $this->buildSiteFieldData( - $view_name_single, $name, 'json', $typeName + $nameSingleCode, $name, 'json', $typeName ); break; case 2: // BASE_SIXTY_FOUR - $this->base64Builder[$view_name_single][] = $name; + $this->base64Builder[$nameSingleCode][] = $name; // Site settings of each field if needed $this->buildSiteFieldData( - $view_name_single, $name, 'base64', $typeName + $nameSingleCode, $name, 'base64', $typeName ); break; case 3: // BASIC_ENCRYPTION_LOCALKEY - $this->basicFieldModeling[$view_name_single][] = $name; + $this->basicFieldModeling[$nameSingleCode][] = $name; // Site settings of each field if needed $this->buildSiteFieldData( - $view_name_single, $name, 'basic_encryption', $typeName + $nameSingleCode, $name, 'basic_encryption', $typeName ); break; case 4: // WHMCS_ENCRYPTION_VDMKEY - $this->whmcsFieldModeling[$view_name_single][] = $name; + $this->whmcsFieldModeling[$nameSingleCode][] = $name; // Site settings of each field if needed $this->buildSiteFieldData( - $view_name_single, $name, 'whmcs_encryption', $typeName + $nameSingleCode, $name, 'whmcs_encryption', $typeName ); break; case 5: // MEDIUM_ENCRYPTION_LOCALFILE - $this->mediumFieldModeling[$view_name_single][] = $name; + $this->mediumFieldModeling[$nameSingleCode][] = $name; // Site settings of each field if needed $this->buildSiteFieldData( - $view_name_single, $name, 'medium_encryption', $typeName + $nameSingleCode, $name, 'medium_encryption', $typeName ); break; case 6: @@ -4754,28 +4874,28 @@ class Fields extends Structure { if (isset($field['settings']->initiator_save_key)) { - $this->expertFieldModelInitiator[$view_name_single]['save'][$field['settings']->initiator_save_key] + $this->expertFieldModelInitiator[$nameSingleCode]['save'][$field['settings']->initiator_save_key] = $field['settings']->initiator_save; } if (isset($field['settings']->initiator_get_key)) { - $this->expertFieldModelInitiator[$view_name_single]['get'][$field['settings']->initiator_get_key] + $this->expertFieldModelInitiator[$nameSingleCode]['get'][$field['settings']->initiator_get_key] = $field['settings']->initiator_get; } - $this->expertFieldModeling[$view_name_single][$name] + $this->expertFieldModeling[$nameSingleCode][$name] = $field['settings']->model_field; // Site settings of each field if needed $this->buildSiteFieldData( - $view_name_single, $name, 'expert_mode', $typeName + $nameSingleCode, $name, 'expert_mode', $typeName ); } break; default: // JSON_ARRAY_ENCODE - $this->jsonItemBuilder[$view_name_single][] = $name; + $this->jsonItemBuilder[$nameSingleCode][] = $name; // Site settings of each field if needed $this->buildSiteFieldData( - $view_name_single, $name, 'json', $typeName + $nameSingleCode, $name, 'json', $typeName ); // no londer add the json again (already added) $subformJsonSwitch = false; @@ -4785,7 +4905,7 @@ class Fields extends Structure if ($typeName === 'usergroup') { $this->buildSiteFieldData( - $view_name_single, $name, 'json', $typeName + $nameSingleCode, $name, 'json', $typeName ); } @@ -4797,14 +4917,14 @@ class Fields extends Structure { if (ComponentbuilderHelper::checkArray($options)) { - $this->getItemsMethodListStringFixBuilder[$view_name_single][] + $this->getItemsMethodListStringFixBuilder[$nameSingleCode][] = array('name' => $name, 'type' => $typeName, 'translation' => true, 'custom' => $custom, 'method' => $field['settings']->store); } else { - $this->getItemsMethodListStringFixBuilder[$view_name_single][] + $this->getItemsMethodListStringFixBuilder[$nameSingleCode][] = array('name' => $name, 'type' => $typeName, 'translation' => false, 'custom' => $custom, 'method' => $field['settings']->store); @@ -4815,15 +4935,15 @@ class Fields extends Structure if ('subform' === $typeName && $field['settings']->store != 6) { // the values must revert to array - $this->jsonItemBuilderArray[$view_name_single][] = $name; + $this->jsonItemBuilderArray[$nameSingleCode][] = $name; // should the json builder still be added if ($subformJsonSwitch) { // and insure the if is converted to json - $this->jsonItemBuilder[$view_name_single][] = $name; + $this->jsonItemBuilder[$nameSingleCode][] = $name; // Site settings of each field if needed $this->buildSiteFieldData( - $view_name_single, $name, 'json', $typeName + $nameSingleCode, $name, 'json', $typeName ); } } @@ -4834,13 +4954,13 @@ class Fields extends Structure || $field['settings']->store != 0) && !ComponentbuilderHelper::checkArray($options))) { - $this->getItemsMethodEximportStringFixBuilder[$view_name_single][] + $this->getItemsMethodEximportStringFixBuilder[$nameSingleCode][] = array('name' => $name, 'type' => $typeName, 'translation' => false, 'custom' => $custom, 'method' => $field['settings']->store); } // check if field should be added to uikit - $this->buildSiteFieldData($view_name_single, $name, 'uikit', $typeName); + $this->buildSiteFieldData($nameSingleCode, $name, 'uikit', $typeName); // load the selection translation fix if (ComponentbuilderHelper::checkArray($options) && ($listSwitch @@ -4848,7 +4968,7 @@ class Fields extends Structure && $typeName != 'repeatable' && $typeName != 'subform') { - $this->selectionTranslationFixBuilder[$view_name_list][$name] + $this->selectionTranslationFixBuilder[$nameListCode][$name] = $options; } // build the sort values @@ -4859,21 +4979,21 @@ class Fields extends Structure && $typeName != 'repeatable' && $typeName != 'subform')) { - $this->sortBuilder[$view_name_list][] = array('type' => $typeName, - 'code' => $name, - 'lang' => $listLangName, - 'custom' => $custom, - 'options' => $options); + $this->sortBuilder[$nameListCode][] = array('type' => $typeName, + 'code' => $name, + 'lang' => $listLangName, + 'custom' => $custom, + 'options' => $options); } // build the search values if ($dbSwitch && isset($field['search']) && $field['search'] == 1) { - $_list = (isset($field['list'])) + $_list = (isset($field['list'])) ? $field['list'] : 0; - $this->searchBuilder[$view_name_list][] = array('type' => $typeName, - 'code' => $name, - 'custom' => $custom, - 'list' => $_list); + $this->searchBuilder[$nameListCode][] = array('type' => $typeName, + 'code' => $name, + 'custom' => $custom, + 'list' => $_list); } // build the filter values if ($dbSwitch && (isset($field['filter']) && $field['filter'] >= 1) @@ -4883,16 +5003,16 @@ class Fields extends Structure && $typeName != 'repeatable' && $typeName != 'subform')) { - $this->filterBuilder[$view_name_list][] = array('type' => $typeName, - 'multi' => $field['filter'], - 'code' => $name, - 'lang' => $listLangName, - 'database' => $view_name_single, - 'function' => ComponentbuilderHelper::safeString( - $name, 'F' - ), - 'custom' => $custom, - 'options' => $options); + $this->filterBuilder[$nameListCode][] = array('type' => $typeName, + 'multi' => $field['filter'], + 'code' => $name, + 'lang' => $listLangName, + 'database' => $nameSingleCode, + 'function' => ComponentbuilderHelper::safeString( + $name, 'F' + ), + 'custom' => $custom, + 'options' => $options); } // build the layout @@ -4907,21 +5027,21 @@ class Fields extends Structure // set to publishing tab $tabName = 'publishing'; } - $this->setLayoutBuilder($view_name_single, $tabName, $name, $field); + $this->setLayoutBuilder($nameSingleCode, $tabName, $name, $field); } /** * set Custom Field Type File * - * @param array $data The field complete data set - * @param string $view_name_list The list view code name - * @param string $view_name_single The single view code name + * @param array $data The field complete data set + * @param string $nameListCode The list view code name + * @param string $nameSingleCode The single view code name * * @return void * */ - public function setCustomFieldTypeFile($data, $view_name_list, - $view_name_single + public function setCustomFieldTypeFile($data, $nameListCode, + $nameSingleCode ) { // make sure it is not already been build or if it is prime if (isset($data['custom']) && isset($data['custom']['extends']) @@ -4972,7 +5092,7 @@ class Fields extends Structure ? $data['code'] . '_' . $data['custom']['text'] : '', $this->bbb . 'CODE' . $this->ddd => (isset($data['code'])) ? $data['code'] : '', - $this->bbb . 'view_type' . $this->ddd => $view_name_single + $this->bbb . 'view_type' . $this->ddd => $nameSingleCode . '_' . $data['type'], $this->bbb . 'type' . $this->ddd => (isset($data['type'])) ? $data['type'] : '', @@ -4995,14 +5115,14 @@ class Fields extends Structure $data['custom']['view'] )) ? ComponentbuilderHelper::safeString( $data['custom']['view'] - ) : $view_name_single, + ) : $nameSingleCode, $this->bbb . 'views' . $this->ddd => (isset($data['custom']['views']) && ComponentbuilderHelper::checkString( $data['custom']['views'] )) ? ComponentbuilderHelper::safeString( $data['custom']['views'] - ) : $view_name_list + ) : $nameListCode ); // now set the ###PLACEHOLDER### options foreach ($replace as $replacekey => $replacevalue) @@ -5282,9 +5402,9 @@ 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($nameSingleCode, 'P|uG!n') !== false || strpos( - $view_name_single, 'M0dU|3' + $nameSingleCode, 'M0dU|3' ) !== false) && isset($data['custom']) && isset($data['custom']['type'])) diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 06dcfdfc8..3e5905a2f 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -1453,9 +1453,9 @@ class Interpretation extends Fields return implode(PHP_EOL, $help); } - public function checkHelp($viewName_single) + public function checkHelp($nameSingleCode) { - if ($viewName_single == "help_document") + if ($nameSingleCode == "help_document") { // set help file into admin place $target = array('admin' => 'help'); @@ -2198,17 +2198,18 @@ class Interpretation extends Fields return ''; } - public function setAdminViewMenu(&$viewName_single, &$view) + public function setAdminViewMenu(&$nameSingleCode, &$view) { $xml = ''; // build the file target values - $target = array('site' => $viewName_single); + $target = array('site' => $nameSingleCode); // build the edit.xml file if ($this->buildDynamique($target, 'admin_menu')) { // set the lang $lang = ComponentbuilderHelper::safeString( - 'com_' . $this->componentCodeName . '_menu_' . $viewName_single, + 'com_' . $this->componentCodeName . '_menu_' + . $nameSingleCode, 'U' ); $this->setLangContent( @@ -2239,7 +2240,7 @@ class Interpretation extends Fields $this->app->enqueueMessage( JText::sprintf( '

Site menu for %s was not build.

', - $viewName_single + $nameSingleCode ), 'Warning' ); } @@ -5092,23 +5093,49 @@ class Interpretation extends Fields return $script . $getItem; } - public function setAdminViewDisplayMethod($viewName_list) + /** + * build code for the admin view display method + * + * @param string $nameListCode The list view name + * + * @return string The php to place in view.html.php + * + */ + public function setAdminViewDisplayMethod($nameListCode) { $script = ''; - if (isset($this->viewsDefaultOrdering[$viewName_list]) - && $this->viewsDefaultOrdering[$viewName_list]['add_admin_ordering'] + // add the the new filter methods for the search toolbar above the list view + if (isset($this->adminFilterType[$nameListCode]) + && $this->adminFilterType[$nameListCode] == 2) + { + $script .= PHP_EOL . $this->_t(2) . "//" + . $this->setLine( + __LINE__ + ) . " Load the filter form from xml."; + $script .= PHP_EOL . $this->_t(2) . "\$this->filterForm " + . "= \$this->get('FilterForm');"; + $script .= PHP_EOL . $this->_t(2) . "//" + . $this->setLine( + __LINE__ + ) . " Load the active filters."; + $script .= PHP_EOL . $this->_t(2) . "\$this->activeFilters " + . "= \$this->get('ActiveFilters');"; + } + // add the custom ordering if set + if (isset($this->viewsDefaultOrdering[$nameListCode]) + && $this->viewsDefaultOrdering[$nameListCode]['add_admin_ordering'] == 1) { // the first is from the state $order_first = true; foreach ( - $this->viewsDefaultOrdering[$viewName_list]['admin_ordering_fields'] + $this->viewsDefaultOrdering[$nameListCode]['admin_ordering_fields'] as $order_field ) { if ($order_first && ($order_field_name = $this->getFieldDatabaseName( - $viewName_list, $order_field['field'] + $nameListCode, $order_field['field'] )) !== false) { // just the first field is based on state @@ -5546,38 +5573,32 @@ class Interpretation extends Fields { if (1 == $type) { - $viewName = $view['settings']->code; + $viewCodeName = $view['settings']->code; } if (2 == $type) { - $viewName = ComponentbuilderHelper::safeString( - $view['settings']->name_single - ); + $viewCodeName = $view['settings']->name_single_code; } // set the custom buttons CUSTOM_BUTTONS_CONTROLLER - $this->fileContentDynamic[$viewName][$this->hhh . $TARGET + $this->fileContentDynamic[$viewCodeName][$this->hhh . $TARGET . '_CUSTOM_BUTTONS_CONTROLLER' . $this->hhh] = ''; // set the custom buttons CUSTOM_BUTTONS_METHOD - $this->fileContentDynamic[$viewName][$this->hhh . $TARGET + $this->fileContentDynamic[$viewCodeName][$this->hhh . $TARGET . '_CUSTOM_BUTTONS_METHOD' . $this->hhh] = ''; } elseif (3 == $type) { // set the names - $viewName = ComponentbuilderHelper::safeString( - $view['settings']->name_single - ); - $viewsName = ComponentbuilderHelper::safeString( - $view['settings']->name_list - ); + $viewCodeName = $view['settings']->name_single_code; + $viewsCodeName = $view['settings']->name_list_code; // set the custom buttons CUSTOM_BUTTONS_CONTROLLER_LIST - $this->fileContentDynamic[$viewsName][$this->hhh . $TARGET + $this->fileContentDynamic[$viewsCodeName][$this->hhh . $TARGET . '_CUSTOM_BUTTONS_CONTROLLER_LIST' . $this->hhh] = ''; // set the custom buttons CUSTOM_BUTTONS_METHOD_LIST - $this->fileContentDynamic[$viewsName][$this->hhh . $TARGET + $this->fileContentDynamic[$viewsCodeName][$this->hhh . $TARGET . '_CUSTOM_BUTTONS_METHOD_LIST' . $this->hhh] = ''; // validate selection @@ -5589,11 +5610,12 @@ class Interpretation extends Fields if ($this->target === 'site') { // set the custom buttons SITE_TOP_BUTTON - $this->fileContentDynamic[$viewName][$this->hhh . 'SITE_TOP_BUTTON' + $this->fileContentDynamic[$viewCodeName][$this->hhh + . 'SITE_TOP_BUTTON' . $this->hhh] = ''; // set the custom buttons SITE_BOTTOM_BUTTON - $this->fileContentDynamic[$viewName][$this->hhh + $this->fileContentDynamic[$viewCodeName][$this->hhh . 'SITE_BOTTOM_BUTTON' . $this->hhh] = ''; // load into place @@ -5601,25 +5623,25 @@ class Interpretation extends Fields { case 1: // set buttons to top right of the view - $this->fileContentDynamic[$viewName][$this->hhh + $this->fileContentDynamic[$viewCodeName][$this->hhh . 'SITE_TOP_BUTTON' . $this->hhh] = '
toolbar->render(); ?>
'; break; case 2: // set buttons to top left of the view - $this->fileContentDynamic[$viewName][$this->hhh + $this->fileContentDynamic[$viewCodeName][$this->hhh . 'SITE_TOP_BUTTON' . $this->hhh] = 'toolbar->render(); ?>'; break; case 3: // set buttons to buttom right of the view - $this->fileContentDynamic[$viewName][$this->hhh + $this->fileContentDynamic[$viewCodeName][$this->hhh . 'SITE_BOTTOM_BUTTON' . $this->hhh] = '
toolbar->render(); ?>
'; break; case 4: // set buttons to buttom left of the view - $this->fileContentDynamic[$viewName][$this->hhh + $this->fileContentDynamic[$viewCodeName][$this->hhh . 'SITE_BOTTOM_BUTTON' . $this->hhh] = 'toolbar->render(); ?>'; break; @@ -5637,12 +5659,12 @@ class Interpretation extends Fields // add this button only if this is not the default view if ($this->dynamicDashboardType !== 'custom_admin_views' || ($this->dynamicDashboardType === 'custom_admin_views' - && $this->dynamicDashboard !== $viewName)) + && $this->dynamicDashboard !== $viewCodeName)) { $buttons[] = $tab . $this->_t(2) . "//" . $this->setLine(__LINE__) . " add cpanel button"; $buttons[] = $tab . $this->_t(2) - . "JToolBarHelper::custom('" . $viewName . "." + . "JToolBarHelper::custom('" . $viewCodeName . "." . "dashboard', 'grid-2', '', 'COM_" . $this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] @@ -5683,14 +5705,16 @@ class Interpretation extends Fields || $this->target === 'site') { $buttons[] = $this->_t(1) . $tab . $this->_t(1) - . "if (\$this->user->authorise('" . $viewName + . "if (\$this->user->authorise('" + . $viewCodeName . "." . $keyCode . "', 'com_" . $this->componentCodeName . "'))"; } else { $buttons[] = $this->_t(1) . $tab . $this->_t(1) - . "if (\$this->canDo->get('" . $viewName . "." + . "if (\$this->canDo->get('" . $viewCodeName + . "." . $keyCode . "'))"; } $buttons[] = $this->_t(1) . $tab . $this->_t(1) . "{"; @@ -5698,7 +5722,7 @@ class Interpretation extends Fields . $this->setLine(__LINE__) . " add " . $custom_button['name'] . " button."; $buttons[] = $this->_t(1) . $tab . $this->_t(2) - . "JToolBarHelper::custom('" . $viewName . "." + . "JToolBarHelper::custom('" . $viewCodeName . "." . $custom_button['method'] . "', '" . $custom_button['icomoon'] . " custom-button-" . strtolower($custom_button['method']) . "', '', '" @@ -5713,41 +5737,49 @@ class Interpretation extends Fields if (isset($custom_button['type']) && $custom_button['type'] == 2) { - if (!isset($this->onlyFunctionButton[$viewsName])) + if (!isset($this->onlyFunctionButton[$viewsCodeName])) { - $this->onlyFunctionButton[$viewsName] = array(); + $this->onlyFunctionButton[$viewsCodeName] + = array(); } - $this->onlyFunctionButton[$viewsName][] = $this->_t( + $this->onlyFunctionButton[$viewsCodeName][] + = $this->_t( 1 ) . $tab . "if (\$this->user->authorise('" - . $viewName . "." . $keyCode . "', 'com_" + . $viewCodeName . "." . $keyCode . "', 'com_" . $this->componentCodeName . "'))"; - $this->onlyFunctionButton[$viewsName][] = $this->_t( + $this->onlyFunctionButton[$viewsCodeName][] + = $this->_t( 1 ) . $tab . "{"; - $this->onlyFunctionButton[$viewsName][] = $this->_t( + $this->onlyFunctionButton[$viewsCodeName][] + = $this->_t( 1 ) . $tab . $this->_t(1) . "//" . $this->setLine( __LINE__ ) . " add " . $custom_button['name'] . " button."; - $this->onlyFunctionButton[$viewsName][] = $this->_t( + $this->onlyFunctionButton[$viewsCodeName][] + = $this->_t( 1 ) . $tab . $this->_t(1) - . "JToolBarHelper::custom('" . $viewsName . "." + . "JToolBarHelper::custom('" . $viewsCodeName + . "." . $custom_button['method'] . "', '" . $custom_button['icomoon'] . " custom-button-" . strtolower($custom_button['method']) . "', '', '" . $keyLang . "', false);"; - $this->onlyFunctionButton[$viewsName][] = $this->_t( + $this->onlyFunctionButton[$viewsCodeName][] + = $this->_t( 1 ) . $tab . "}"; } else { $buttons[] = $this->_t(1) . $tab . $this->_t(1) - . "if (\$this->user->authorise('" . $viewName + . "if (\$this->user->authorise('" + . $viewCodeName . "." . $keyCode . "', 'com_" . $this->componentCodeName . "'))"; $buttons[] = $this->_t(1) . $tab . $this->_t(1) @@ -5756,7 +5788,8 @@ class Interpretation extends Fields . "//" . $this->setLine(__LINE__) . " add " . $custom_button['name'] . " button."; $buttons[] = $this->_t(1) . $tab . $this->_t(2) - . "JToolBarHelper::custom('" . $viewsName . "." + . "JToolBarHelper::custom('" . $viewsCodeName + . "." . $custom_button['method'] . "', '" . $custom_button['icomoon'] . " custom-button-" . strtolower($custom_button['method']) @@ -5780,7 +5813,8 @@ class Interpretation extends Fields && $view['settings']->php_controller_list != '//') { // set the custom buttons CUSTOM_BUTTONS_CONTROLLER - $this->fileContentDynamic[$viewsName][$this->hhh . $TARGET + $this->fileContentDynamic[$viewsCodeName][$this->hhh + . $TARGET . '_CUSTOM_BUTTONS_CONTROLLER_LIST' . $this->hhh] = PHP_EOL . PHP_EOL . $this->setPlaceholders( $view['settings']->php_controller_list, @@ -5795,7 +5829,8 @@ class Interpretation extends Fields && $view['settings']->php_model_list != '//') { // set the custom buttons CUSTOM_BUTTONS_METHOD - $this->fileContentDynamic[$viewsName][$this->hhh . $TARGET + $this->fileContentDynamic[$viewsCodeName][$this->hhh + . $TARGET . '_CUSTOM_BUTTONS_METHOD_LIST' . $this->hhh] = PHP_EOL . PHP_EOL . $this->setPlaceholders( $view['settings']->php_model_list, @@ -5812,7 +5847,8 @@ class Interpretation extends Fields && $view['settings']->php_controller != '//') { // set the custom buttons CUSTOM_BUTTONS_CONTROLLER - $this->fileContentDynamic[$viewName][$this->hhh . $TARGET + $this->fileContentDynamic[$viewCodeName][$this->hhh + . $TARGET . '_CUSTOM_BUTTONS_CONTROLLER' . $this->hhh] = PHP_EOL . PHP_EOL . $this->setPlaceholders( $view['settings']->php_controller, @@ -5822,7 +5858,7 @@ class Interpretation extends Fields { // add the controller for this view // build the file - $target = array($this->target => $viewName); + $target = array($this->target => $viewCodeName); $this->buildDynamique($target, 'custom_form'); // GET_FORM_CUSTOM } @@ -5834,7 +5870,8 @@ class Interpretation extends Fields && $view['settings']->php_model != '//') { // set the custom buttons CUSTOM_BUTTONS_METHOD - $this->fileContentDynamic[$viewName][$this->hhh . $TARGET + $this->fileContentDynamic[$viewCodeName][$this->hhh + . $TARGET . '_CUSTOM_BUTTONS_METHOD' . $this->hhh] = PHP_EOL . PHP_EOL . $this->setPlaceholders( $view['settings']->php_model, $this->placeholders @@ -5887,16 +5924,16 @@ class Interpretation extends Fields return PHP_EOL . implode(PHP_EOL, $script); } - public function setFunctionOnlyButtons($viewName_list) + public function setFunctionOnlyButtons($nameListCode) { // return buttons if they were build - if (isset($this->onlyFunctionButton[$viewName_list]) + if (isset($this->onlyFunctionButton[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->onlyFunctionButton[$viewName_list] + $this->onlyFunctionButton[$nameListCode] )) { return PHP_EOL . implode( - PHP_EOL, $this->onlyFunctionButton[$viewName_list] + PHP_EOL, $this->onlyFunctionButton[$nameListCode] ); } @@ -8091,14 +8128,16 @@ class Interpretation extends Fields ) . " Get The Database object"; $script .= PHP_EOL . $this->_t(2) . "\$db = JFactory::getDbo();"; - foreach ($this->uninstallScriptBuilder as $viewName => $typeAlias) + foreach ( + $this->uninstallScriptBuilder as $viewsCodeName => $typeAlias + ) { // set a var value - $view = ComponentbuilderHelper::safeString($viewName); + $view = ComponentbuilderHelper::safeString($viewsCodeName); // check if it has field relations if (isset($this->uninstallScriptFields) - && isset($this->uninstallScriptFields[$viewName])) + && isset($this->uninstallScriptFields[$viewsCodeName])) { // First check if data is till in table $script .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" @@ -8115,7 +8154,7 @@ class Interpretation extends Fields . "\$query->from(\$db->quoteName('#__fields'));"; $script .= PHP_EOL . $this->_t(2) . "//" . $this->setLine( __LINE__ - ) . " Where " . $viewName . " context is found"; + ) . " Where " . $viewsCodeName . " context is found"; $script .= PHP_EOL . $this->_t(2) . "\$query->where( \$db->quoteName('context') . ' = '. \$db->quote('" . $typeAlias . "') );"; @@ -8143,7 +8182,8 @@ class Interpretation extends Fields // Now remove the actual type entry $script .= PHP_EOL . $this->_t(3) . "//" . $this->setLine( __LINE__ - ) . " Remove " . $viewName . " from the field table"; + ) . " Remove " . $viewsCodeName + . " from the field table"; $script .= PHP_EOL . $this->_t(3) . "\$" . $view . "_condition = array( \$db->quoteName('context') . ' = '. \$db->quote('" . $typeAlias . "') );"; @@ -8160,7 +8200,7 @@ class Interpretation extends Fields . "\$db->setQuery(\$query);"; $script .= PHP_EOL . $this->_t(3) . "//" . $this->setLine( __LINE__ - ) . " Execute the query to remove " . $viewName + ) . " Execute the query to remove " . $viewsCodeName . " items"; $script .= PHP_EOL . $this->_t(3) . "\$" . $view . "_done = \$db->execute();"; @@ -8169,7 +8209,7 @@ class Interpretation extends Fields $script .= PHP_EOL . $this->_t(3) . "{"; $script .= PHP_EOL . $this->_t(4) . "//" . $this->setLine( __LINE__ - ) . " If succesfully remove " . $viewName + ) . " If succesfully remove " . $viewsCodeName . " add queued success message."; // TODO lang is not translated $script .= PHP_EOL . $this->_t(4) @@ -8179,7 +8219,7 @@ class Interpretation extends Fields $script .= PHP_EOL . $this->_t(3) . "}"; $script .= PHP_EOL . $this->_t(3) . "//" . $this->setLine( __LINE__ - ) . " Also Remove " . $viewName . " field values"; + ) . " Also Remove " . $viewsCodeName . " field values"; $script .= PHP_EOL . $this->_t(3) . "\$" . $view . "_condition = array( \$db->quoteName('field_id') . ' IN ('. implode(',', \$" . $view . "_field_ids) .')');"; @@ -8196,7 +8236,7 @@ class Interpretation extends Fields . "\$db->setQuery(\$query);"; $script .= PHP_EOL . $this->_t(3) . "//" . $this->setLine( __LINE__ - ) . " Execute the query to remove " . $viewName + ) . " Execute the query to remove " . $viewsCodeName . " field values"; $script .= PHP_EOL . $this->_t(3) . "\$" . $view . "_done = \$db->execute();"; @@ -8205,12 +8245,12 @@ class Interpretation extends Fields $script .= PHP_EOL . $this->_t(3) . "{"; $script .= PHP_EOL . $this->_t(4) . "//" . $this->setLine( __LINE__ - ) . " If succesfully remove " . $viewName + ) . " If succesfully remove " . $viewsCodeName . " add queued success message."; // TODO lang is not translated $script .= PHP_EOL . $this->_t(4) . "\$app->enqueueMessage(JText:" - . ":_('The fields values for " . $viewName + . ":_('The fields values for " . $viewsCodeName . " was removed from the #__fields_values table'));"; $script .= PHP_EOL . $this->_t(3) . "}"; $script .= PHP_EOL . $this->_t(2) . "}"; @@ -8230,7 +8270,7 @@ class Interpretation extends Fields . "\$query->from(\$db->quoteName('#__fields_groups'));"; $script .= PHP_EOL . $this->_t(2) . "//" . $this->setLine( __LINE__ - ) . " Where " . $viewName . " context is found"; + ) . " Where " . $viewsCodeName . " context is found"; $script .= PHP_EOL . $this->_t(2) . "\$query->where( \$db->quoteName('context') . ' = '. \$db->quote('" . $typeAlias . "') );"; @@ -8252,7 +8292,7 @@ class Interpretation extends Fields // Now remove the actual type entry $script .= PHP_EOL . $this->_t(3) . "//" . $this->setLine( __LINE__ - ) . " Remove " . $viewName + ) . " Remove " . $viewsCodeName . " from the field groups table"; $script .= PHP_EOL . $this->_t(3) . "\$" . $view . "_condition = array( \$db->quoteName('context') . ' = '. \$db->quote('" @@ -8270,7 +8310,7 @@ class Interpretation extends Fields . "\$db->setQuery(\$query);"; $script .= PHP_EOL . $this->_t(3) . "//" . $this->setLine( __LINE__ - ) . " Execute the query to remove " . $viewName + ) . " Execute the query to remove " . $viewsCodeName . " items"; $script .= PHP_EOL . $this->_t(3) . "\$" . $view . "_done = \$db->execute();"; @@ -8279,7 +8319,7 @@ class Interpretation extends Fields $script .= PHP_EOL . $this->_t(3) . "{"; $script .= PHP_EOL . $this->_t(4) . "//" . $this->setLine( __LINE__ - ) . " If succesfully remove " . $viewName + ) . " If succesfully remove " . $viewsCodeName . " add queued success message."; // TODO lang is not translated $script .= PHP_EOL . $this->_t(4) @@ -8303,7 +8343,7 @@ class Interpretation extends Fields . "\$query->from(\$db->quoteName('#__content_types'));"; $script .= PHP_EOL . $this->_t(2) . "//" . $this->setLine( __LINE__ - ) . " Where " . $viewName . " alias is found"; + ) . " Where " . $viewsCodeName . " alias is found"; $script .= PHP_EOL . $this->_t(2) . "\$query->where( \$db->quoteName('type_alias') . ' = '. \$db->quote('" . $typeAlias . "') );"; @@ -8330,7 +8370,8 @@ class Interpretation extends Fields // Now remove the actual type entry $script .= PHP_EOL . $this->_t(3) . "//" . $this->setLine( __LINE__ - ) . " Remove " . $viewName . " from the content type table"; + ) . " Remove " . $viewsCodeName + . " from the content type table"; $script .= PHP_EOL . $this->_t(3) . "\$" . $view . "_condition = array( \$db->quoteName('type_alias') . ' = '. \$db->quote('" . $typeAlias . "') );"; @@ -8346,14 +8387,15 @@ class Interpretation extends Fields $script .= PHP_EOL . $this->_t(3) . "\$db->setQuery(\$query);"; $script .= PHP_EOL . $this->_t(3) . "//" . $this->setLine( __LINE__ - ) . " Execute the query to remove " . $viewName . " items"; + ) . " Execute the query to remove " . $viewsCodeName + . " items"; $script .= PHP_EOL . $this->_t(3) . "\$" . $view . "_done = \$db->execute();"; $script .= PHP_EOL . $this->_t(3) . "if (\$" . $view . "_done)"; $script .= PHP_EOL . $this->_t(3) . "{"; $script .= PHP_EOL . $this->_t(4) . "//" . $this->setLine( __LINE__ - ) . " If succesfully remove " . $viewName + ) . " If succesfully remove " . $viewsCodeName . " add queued success message."; // TODO lang is not translated $script .= PHP_EOL . $this->_t(4) @@ -8363,7 +8405,7 @@ class Interpretation extends Fields // Now remove the related items from contentitem tag map table $script .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" - . $this->setLine(__LINE__) . " Remove " . $viewName + . $this->setLine(__LINE__) . " Remove " . $viewsCodeName . " items from the contentitem tag map table"; $script .= PHP_EOL . $this->_t(3) . "\$" . $view . "_condition = array( \$db->quoteName('type_alias') . ' = '. \$db->quote('" @@ -8380,14 +8422,15 @@ class Interpretation extends Fields $script .= PHP_EOL . $this->_t(3) . "\$db->setQuery(\$query);"; $script .= PHP_EOL . $this->_t(3) . "//" . $this->setLine( __LINE__ - ) . " Execute the query to remove " . $viewName . " items"; + ) . " Execute the query to remove " . $viewsCodeName + . " items"; $script .= PHP_EOL . $this->_t(3) . "\$" . $view . "_done = \$db->execute();"; $script .= PHP_EOL . $this->_t(3) . "if (\$" . $view . "_done)"; $script .= PHP_EOL . $this->_t(3) . "{"; $script .= PHP_EOL . $this->_t(4) . "//" . $this->setLine( __LINE__ - ) . " If succesfully remove " . $viewName + ) . " If succesfully remove " . $viewsCodeName . " add queued success message."; // TODO lang is not translated $script .= PHP_EOL . $this->_t(4) @@ -8397,7 +8440,7 @@ class Interpretation extends Fields // Now remove the related items from ucm content table $script .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" - . $this->setLine(__LINE__) . " Remove " . $viewName + . $this->setLine(__LINE__) . " Remove " . $viewsCodeName . " items from the ucm content table"; $script .= PHP_EOL . $this->_t(3) . "\$" . $view . "_condition = array( \$db->quoteName('core_type_alias') . ' = ' . \$db->quote('" @@ -8414,14 +8457,15 @@ class Interpretation extends Fields $script .= PHP_EOL . $this->_t(3) . "\$db->setQuery(\$query);"; $script .= PHP_EOL . $this->_t(3) . "//" . $this->setLine( __LINE__ - ) . " Execute the query to remove " . $viewName . " items"; + ) . " Execute the query to remove " . $viewsCodeName + . " items"; $script .= PHP_EOL . $this->_t(3) . "\$" . $view . "_done = \$db->execute();"; $script .= PHP_EOL . $this->_t(3) . "if (\$" . $view . "_done)"; $script .= PHP_EOL . $this->_t(3) . "{"; $script .= PHP_EOL . $this->_t(4) . "//" . $this->setLine( __LINE__ - ) . " If succesfully remove " . $viewName + ) . " If succesfully remove " . $viewsCodeName . " add queued success message."; // TODO lang is not translated $script .= PHP_EOL . $this->_t(4) @@ -8432,7 +8476,7 @@ class Interpretation extends Fields // setup the foreach loop of ids $script .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Make sure that all the " - . $viewName . " items are cleared from DB"; + . $viewsCodeName . " items are cleared from DB"; $script .= PHP_EOL . $this->_t(3) . "foreach (\$" . $view . "_ids as \$" . $view . "_id)"; $script .= PHP_EOL . $this->_t(3) . "{"; @@ -8440,7 +8484,7 @@ class Interpretation extends Fields // Now remove the related items from ucm base table $script .= PHP_EOL . $this->_t(4) . "//" . $this->setLine( __LINE__ - ) . " Remove " . $viewName + ) . " Remove " . $viewsCodeName . " items from the ucm base table"; $script .= PHP_EOL . $this->_t(4) . "\$" . $view . "_condition = array( \$db->quoteName('ucm_type_id') . ' = ' . \$" @@ -8457,12 +8501,13 @@ class Interpretation extends Fields $script .= PHP_EOL . $this->_t(4) . "\$db->setQuery(\$query);"; $script .= PHP_EOL . $this->_t(4) . "//" . $this->setLine( __LINE__ - ) . " Execute the query to remove " . $viewName . " items"; + ) . " Execute the query to remove " . $viewsCodeName + . " items"; $script .= PHP_EOL . $this->_t(4) . "\$db->execute();"; // Now remove the related items from ucm history table $script .= PHP_EOL . PHP_EOL . $this->_t(4) . "//" - . $this->setLine(__LINE__) . " Remove " . $viewName + . $this->setLine(__LINE__) . " Remove " . $viewsCodeName . " items from the ucm history table"; $script .= PHP_EOL . $this->_t(4) . "\$" . $view . "_condition = array( \$db->quoteName('ucm_type_id') . ' = ' . \$" @@ -8479,7 +8524,8 @@ class Interpretation extends Fields $script .= PHP_EOL . $this->_t(4) . "\$db->setQuery(\$query);"; $script .= PHP_EOL . $this->_t(4) . "//" . $this->setLine( __LINE__ - ) . " Execute the query to remove " . $viewName . " items"; + ) . " Execute the query to remove " . $viewsCodeName + . " items"; $script .= PHP_EOL . $this->_t(4) . "\$db->execute();"; $script .= PHP_EOL . $this->_t(3) . "}"; @@ -8779,30 +8825,30 @@ class Interpretation extends Fields return $array; } - public function setRouterHelp($viewName_single, $viewName_list, + public function setRouterHelp($nameSingleCode, $nameListCode, $front = false ) { // add if tags is added, also for all front item views - if (((isset($this->tagsBuilder[$viewName_single]) + if (((isset($this->tagsBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkString( - $this->tagsBuilder[$viewName_single] + $this->tagsBuilder[$nameSingleCode] )) || $front) - && (!in_array($viewName_single, $this->setRouterHelpDone))) + && (!in_array($nameSingleCode, $this->setRouterHelpDone))) { // insure we load a view only once - $this->setRouterHelpDone[] = $viewName_single; + $this->setRouterHelpDone[] = $nameSingleCode; // build view route helper $View = ComponentbuilderHelper::safeString( - $viewName_single, 'F' + $nameSingleCode, 'F' ); $routeHelper = array(); $routeHelper[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**"; $routeHelper[] = $this->_t(1) . " * @param int The route of the " . $View; $routeHelper[] = $this->_t(1) . " */"; - if ('category' === $viewName_single - || 'categories' === $viewName_single) + if ('category' === $nameSingleCode + || 'categories' === $nameSingleCode) { $routeHelper[] = $this->_t(1) . "public static function get" . $View . "Route(\$id = 0)"; @@ -8818,13 +8864,13 @@ class Interpretation extends Fields $routeHelper[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Initialize the needel array."; $routeHelper[] = $this->_t(3) . "\$needles = array("; - $routeHelper[] = $this->_t(4) . "'" . $viewName_single + $routeHelper[] = $this->_t(4) . "'" . $nameSingleCode . "' => array((int) \$id)"; $routeHelper[] = $this->_t(3) . ");"; $routeHelper[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Create the link"; $routeHelper[] = $this->_t(3) . "\$link = 'index.php?option=com_" - . $this->componentCodeName . "&view=" . $viewName_single + . $this->componentCodeName . "&view=" . $nameSingleCode . "&id='. \$id;"; $routeHelper[] = $this->_t(2) . "}"; $routeHelper[] = $this->_t(2) . "else"; @@ -8832,22 +8878,23 @@ class Interpretation extends Fields $routeHelper[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Initialize the needel array."; $routeHelper[] = $this->_t(3) . "\$needles = array("; - $routeHelper[] = $this->_t(4) . "'" . $viewName_single + $routeHelper[] = $this->_t(4) . "'" . $nameSingleCode . "' => array()"; $routeHelper[] = $this->_t(3) . ");"; $routeHelper[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Create the link but don't add the id."; $routeHelper[] = $this->_t(3) . "\$link = 'index.php?option=com_" - . $this->componentCodeName . "&view=" . $viewName_single . "';"; + . $this->componentCodeName . "&view=" . $nameSingleCode + . "';"; $routeHelper[] = $this->_t(2) . "}"; - if ('category' != $viewName_single - && 'categories' != $viewName_single) + if ('category' != $nameSingleCode + && 'categories' != $nameSingleCode) { $routeHelper[] = $this->_t(2) . "if (\$catid > 1)"; $routeHelper[] = $this->_t(2) . "{"; $routeHelper[] = $this->_t(3) . "\$categories = JCategories::getInstance('" - . $this->componentCodeName . "." . $viewName_list . "');"; + . $this->componentCodeName . "." . $nameListCode . "');"; $routeHelper[] = $this->_t(3) . "\$category = \$categories->get(\$catid);"; $routeHelper[] = $this->_t(3) . "if (\$category)"; @@ -8860,11 +8907,11 @@ class Interpretation extends Fields $routeHelper[] = $this->_t(3) . "}"; $routeHelper[] = $this->_t(2) . "}"; } - if (isset($this->hasMenuGlobal[$viewName_single])) + if (isset($this->hasMenuGlobal[$nameSingleCode])) { $routeHelper[] = PHP_EOL . $this->_t(2) . "if (\$item = self::_findItem(\$needles, '" - . $viewName_single . "'))"; + . $nameSingleCode . "'))"; } else { @@ -9029,30 +9076,30 @@ class Interpretation extends Fields } } - public function setBatchMove($viewName_single) + public function setBatchMove($nameSingleCode) { // set needed defaults $category = false; $batchmove = array(); - $VIEW = ComponentbuilderHelper::safeString($viewName_single, 'U'); + $VIEW = ComponentbuilderHelper::safeString($nameSingleCode, 'U'); // component helper name $Helper = $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . 'Helper'; // setup correct core target $coreLoad = false; - if (isset($this->permissionCore[$viewName_single])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$viewName_single]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } // only load category if set in this view - if (array_key_exists($viewName_single, $this->catCodeBuilder)) + if (array_key_exists($nameSingleCode, $this->catCodeBuilder)) { - $category = $this->catCodeBuilder[$viewName_single]['code']; + $category = $this->catCodeBuilder[$nameSingleCode]['code']; } // prepare custom script $customScript = $this->getCustomScriptBuilder( - 'php_batchmove', $viewName_single, PHP_EOL . PHP_EOL, null, true + 'php_batchmove', $nameSingleCode, PHP_EOL . PHP_EOL, null, true ); $batchmove[] = PHP_EOL . $this->_t(1) . "/**"; @@ -9084,7 +9131,7 @@ class Interpretation extends Fields $batchmove[] = $this->_t(3) . "\$this->tableClassName = get_class(\$this->table);"; $batchmove[] = $this->_t(3) . "\$this->canDo = " . $Helper - . "::getActions('" . $viewName_single . "');"; + . "::getActions('" . $nameSingleCode . "');"; $batchmove[] = $this->_t(2) . "}"; if ($coreLoad && isset($core['core.edit']) @@ -9093,7 +9140,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit']] )) { @@ -9120,7 +9167,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit.state']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit.state']] )) { @@ -9174,7 +9221,7 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.edit']] ) && in_array( - $viewName_single, $this->permissionBuilder[$core['core.edit']] + $nameSingleCode, $this->permissionBuilder[$core['core.edit']] )) { $batchmove[] = $this->_t(3) . "if (!\$this->user->authorise('" @@ -9274,7 +9321,7 @@ class Interpretation extends Fields return PHP_EOL . implode(PHP_EOL, $batchmove); } - public function setBatchCopy($viewName_single) + public function setBatchCopy($nameSingleCode) { // set needed defaults $title = false; @@ -9282,37 +9329,39 @@ class Interpretation extends Fields $alias = false; $category = false; $batchcopy = array(); - $VIEW = ComponentbuilderHelper::safeString($viewName_single, 'U'); + $VIEW = ComponentbuilderHelper::safeString($nameSingleCode, 'U'); // component helper name $Helper = $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . 'Helper'; // setup correct core target $coreLoad = false; - if (isset($this->permissionCore[$viewName_single])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$viewName_single]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } // only load category if set in this view - if (array_key_exists($viewName_single, $this->catCodeBuilder)) + if (array_key_exists($nameSingleCode, $this->catCodeBuilder)) { - $category = $this->catCodeBuilder[$viewName_single]['code']; + $category = $this->catCodeBuilder[$nameSingleCode]['code']; } // only load alias if set in this view - if (array_key_exists($viewName_single, $this->aliasBuilder)) + if (array_key_exists($nameSingleCode, $this->aliasBuilder)) { - $alias = $this->aliasBuilder[$viewName_single]; + $alias = $this->aliasBuilder[$nameSingleCode]; } // only load title if set in this view - if (isset($this->customAliasBuilder[$viewName_single])) + if (isset($this->customAliasBuilder[$nameSingleCode])) { - $titles = array_values($this->customAliasBuilder[$viewName_single]); + $titles = array_values( + $this->customAliasBuilder[$nameSingleCode] + ); $title = true; } - elseif (array_key_exists($viewName_single, $this->titleBuilder)) + elseif (array_key_exists($nameSingleCode, $this->titleBuilder)) { - $titles = array($this->titleBuilder[$viewName_single]); + $titles = array($this->titleBuilder[$nameSingleCode]); $title = true; } // se the dynamic title @@ -9328,7 +9377,7 @@ class Interpretation extends Fields } // prepare custom script $customScript = $this->getCustomScriptBuilder( - 'php_batchcopy', $viewName_single, PHP_EOL . PHP_EOL, null, true + 'php_batchcopy', $nameSingleCode, PHP_EOL . PHP_EOL, null, true ); $batchcopy[] = PHP_EOL . $this->_t(1) . "/**"; @@ -9362,7 +9411,7 @@ class Interpretation extends Fields $batchcopy[] = $this->_t(3) . "\$this->tableClassName = get_class(\$this->table);"; $batchcopy[] = $this->_t(3) . "\$this->canDo = " . $Helper - . "::getActions('" . $viewName_single . "');"; + . "::getActions('" . $nameSingleCode . "');"; $batchcopy[] = $this->_t(2) . "}"; if ($coreLoad && isset($core['core.create']) && isset($this->permissionBuilder['global'][$core['core.create']]) @@ -9370,7 +9419,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.create']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.create']] )) { @@ -9407,7 +9456,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit.state']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit.state']] )) { @@ -9467,7 +9516,7 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.edit']] ) && in_array( - $viewName_single, $this->permissionBuilder[$core['core.edit']] + $nameSingleCode, $this->permissionBuilder[$core['core.edit']] )) { $batchcopy[] = $this->_t(3) . "if (!\$this->user->authorise('" @@ -9668,39 +9717,39 @@ class Interpretation extends Fields return PHP_EOL . implode(PHP_EOL, $batchcopy); } - public function setAliasTitleFix($viewName_single) + public function setAliasTitleFix($nameSingleCode) { $fixUnique = array(); // only load this if these two items are set - if (array_key_exists($viewName_single, $this->aliasBuilder) - && (array_key_exists($viewName_single, $this->titleBuilder) - || isset($this->customAliasBuilder[$viewName_single]))) + if (array_key_exists($nameSingleCode, $this->aliasBuilder) + && (array_key_exists($nameSingleCode, $this->titleBuilder) + || isset($this->customAliasBuilder[$nameSingleCode]))) { // set needed defaults $setCategory = false; - $alias = $this->aliasBuilder[$viewName_single]; + $alias = $this->aliasBuilder[$nameSingleCode]; $VIEW = ComponentbuilderHelper::safeString( - $viewName_single, 'U' + $nameSingleCode, 'U' ); - if (array_key_exists($viewName_single, $this->catCodeBuilder)) + if (array_key_exists($nameSingleCode, $this->catCodeBuilder)) { - $category = $this->catCodeBuilder[$viewName_single]['code']; + $category = $this->catCodeBuilder[$nameSingleCode]['code']; $setCategory = true; } // set the title stuff - if (isset($this->customAliasBuilder[$viewName_single])) + if (isset($this->customAliasBuilder[$nameSingleCode])) { $titles = array_values( - $this->customAliasBuilder[$viewName_single] + $this->customAliasBuilder[$nameSingleCode] ); - if (isset($this->titleBuilder[$viewName_single])) + if (isset($this->titleBuilder[$nameSingleCode])) { - // $titles[] = $this->titleBuilder[$viewName_single]; // TODO this may be unexpected + // $titles[] = $this->titleBuilder[$nameSingleCode]; // TODO this may be unexpected } } else { - $titles = array($this->titleBuilder[$viewName_single]); + $titles = array($this->titleBuilder[$nameSingleCode]); } // start building the fix $fixUnique[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine( @@ -9796,7 +9845,7 @@ class Interpretation extends Fields ) . ");"; $fixUnique[] = $this->_t(4) . "}"; $fixUnique[] = PHP_EOL . $this->_t(4) - . "\$table = JTable::getInstance('" . $viewName_single . "', '" + . "\$table = JTable::getInstance('" . $nameSingleCode . "', '" . $this->componentCodeName . "Table');"; if ($setCategory && count($titles) == 1) { @@ -9880,12 +9929,12 @@ class Interpretation extends Fields return PHP_EOL . implode(PHP_EOL, $fixUnique); } - public function setGenerateNewTitle($viewName_single) + public function setGenerateNewTitle($nameSingleCode) { // if category is added to this view then do nothing - if (array_key_exists($viewName_single, $this->aliasBuilder) - && (array_key_exists($viewName_single, $this->titleBuilder) - || isset($this->customAliasBuilder[$viewName_single]))) + if (array_key_exists($nameSingleCode, $this->aliasBuilder) + && (array_key_exists($nameSingleCode, $this->titleBuilder) + || isset($this->customAliasBuilder[$nameSingleCode]))) { // get component name $Component = $this->fileContentStatic[$this->hhh . 'Component' @@ -9958,7 +10007,7 @@ class Interpretation extends Fields return implode(PHP_EOL, $newFunction); } - elseif (array_key_exists($viewName_single, $this->titleBuilder)) + elseif (array_key_exists($nameSingleCode, $this->titleBuilder)) { $newFunction = array(); $newFunction[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**"; @@ -9993,21 +10042,21 @@ class Interpretation extends Fields return ''; } - public function setGenerateNewAlias($viewName_single) + public function setGenerateNewAlias($nameSingleCode) { // make sure this view has an alias - if (isset($this->aliasBuilder[$viewName_single])) + if (isset($this->aliasBuilder[$nameSingleCode])) { // set the title stuff - if (isset($this->customAliasBuilder[$viewName_single])) + if (isset($this->customAliasBuilder[$nameSingleCode])) { $titles = array_values( - $this->customAliasBuilder[$viewName_single] + $this->customAliasBuilder[$nameSingleCode] ); } - elseif (isset($this->titleBuilder[$viewName_single])) + elseif (isset($this->titleBuilder[$nameSingleCode])) { - $titles = array($this->titleBuilder[$viewName_single]); + $titles = array($this->titleBuilder[$nameSingleCode]); } // reset the bucket $titleData = array(); @@ -11012,7 +11061,7 @@ class Interpretation extends Fields return false; } - public function setCustomAdminViewListLink($view, $viewName_list) + public function setCustomAdminViewListLink($view, $nameListCode) { if (isset($this->componentData->custom_admin_views) && ComponentbuilderHelper::checkArray( @@ -11061,7 +11110,7 @@ class Interpretation extends Fields if ($setId) { // now load it to the global object for items list - $this->customAdminViewListLink[$viewName_list][] + $this->customAdminViewListLink[$nameListCode][] = $set; // add to set id for list view if needed $this->customAdminViewListId[$custom_admin_view['settings']->code] @@ -11070,7 +11119,7 @@ class Interpretation extends Fields else { // now load it to the global object for tool bar - $this->customAdminDynamicButtons[$viewName_list][] + $this->customAdminDynamicButtons[$nameListCode][] = $set; } // log that it has been added already @@ -11086,16 +11135,16 @@ class Interpretation extends Fields /** * set the list body * - * @param string $viewName_single - * @param string $viewName_list + * @param string $nameSingleCode + * @param string $nameListCode * * @return string */ - public function setListBody($viewName_single, $viewName_list) + public function setListBody($nameSingleCode, $nameListCode) { - if (isset($this->listBuilder[$viewName_list]) + if (isset($this->listBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->listBuilder[$viewName_list] + $this->listBuilder[$nameListCode] )) { // component helper name @@ -11104,9 +11153,9 @@ class Interpretation extends Fields // setup correct core target $coreLoad = false; $core = null; - if (isset($this->permissionCore[$viewName_single])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$viewName_single]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } // make sure the custom links are only added once @@ -11119,13 +11168,13 @@ class Interpretation extends Fields $body .= PHP_EOL . $this->_t(2) . "\$userChkOut = JFactory::getUser(\$item->checked_out);"; $body .= PHP_EOL . $this->_t(2) . "\$canDo = " . $Helper - . "::getActions('" . $viewName_single . "',\$item,'" - . $viewName_list . "');"; + . "::getActions('" . $nameSingleCode . "',\$item,'" + . $nameListCode . "');"; $body .= PHP_EOL . $this->_t(1) . "?>"; $body .= PHP_EOL . $this->_t(1) . ''; // only load if not over written - if (!isset($this->fieldsNames[$viewName_single]['ordering'])) + if (!isset($this->fieldsNames[$nameSingleCode]['ordering'])) { $body .= PHP_EOL . $this->_t(2) . ''; @@ -11136,7 +11185,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit.state']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit.state']] )) { @@ -11149,11 +11198,8 @@ class Interpretation extends Fields . "get('core.edit.state')): ?>"; } $body .= PHP_EOL . $this->_t(3) . "_t(4) . "if (\$this->saveOrder)"; - $body .= PHP_EOL . $this->_t(4) . "{"; - $body .= PHP_EOL . $this->_t(5) . "\$iconClass = ' inactive';"; - $body .= PHP_EOL . $this->_t(4) . "}"; - $body .= PHP_EOL . $this->_t(4) . "else"; + $body .= PHP_EOL . $this->_t(4) . "\$iconClass = '';"; + $body .= PHP_EOL . $this->_t(4) . "if (!\$this->saveOrder)"; $body .= PHP_EOL . $this->_t(4) . "{"; $body .= PHP_EOL . $this->_t(5) . "\$iconClass = ' inactive tip-top" @@ -11185,7 +11231,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit']] )) { @@ -11215,12 +11261,12 @@ class Interpretation extends Fields $body .= PHP_EOL . $this->_t(2) . ""; // check if this view has fields that should not be escaped $doNotEscape = false; - if (isset($this->doNotEscape[$viewName_list])) + if (isset($this->doNotEscape[$nameListCode])) { $doNotEscape = true; } // start adding the dynamic - foreach ($this->listBuilder[$viewName_list] as $item) + foreach ($this->listBuilder[$nameListCode] as $item) { // check if target is admin list if (1 == $item['target'] || 3 == $item['target']) @@ -11231,7 +11277,7 @@ class Interpretation extends Fields $itemClass = 'hidden-phone'; // set the item row $itemRow = $this->getListItemBuilder( - $item, $viewName_single, $viewName_list, $itemClass, + $item, $nameSingleCode, $nameListCode, $itemClass, $doNotEscape, $coreLoad, $core ); // check if buttons was aready added @@ -11239,14 +11285,14 @@ class Interpretation extends Fields { // get custom admin view buttons $customAdminViewButtons - = $this->getCustomAdminViewButtons($viewName_list); + = $this->getCustomAdminViewButtons($nameListCode); // make sure the custom admin view buttons are only added once $firstTimeBeingAdded = false; } // add row to body $body .= PHP_EOL . $this->_t(2) . "getListFieldClass( - $item['code'], $viewName_list, $itemClass + $item['code'], $nameListCode, $itemClass ) . "\">"; $body .= $itemRow; $body .= $customAdminViewButtons; @@ -11254,7 +11300,7 @@ class Interpretation extends Fields } } // add the defaults - if (!isset($this->fieldsNames[$viewName_single]['published'])) + if (!isset($this->fieldsNames[$nameSingleCode]['published'])) { $body .= PHP_EOL . $this->_t(2) . ''; // check if the item has permissions. @@ -11264,7 +11310,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit.state']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit.state']] )) { @@ -11282,29 +11328,29 @@ class Interpretation extends Fields . ""; $body .= PHP_EOL . $this->_t(6) . "published, \$i, '" - . $viewName_list . ".', true, 'cb'); ?>"; + . $nameListCode . ".', true, 'cb'); ?>"; $body .= PHP_EOL . $this->_t(5) . ""; $body .= PHP_EOL . $this->_t(6) . "published, \$i, '" - . $viewName_list . ".', false, 'cb'); ?>"; + . $nameListCode . ".', false, 'cb'); ?>"; $body .= PHP_EOL . $this->_t(5) . ""; $body .= PHP_EOL . $this->_t(4) . ""; $body .= PHP_EOL . $this->_t(5) . "published, \$i, '" - . $viewName_list . ".', true, 'cb'); ?>"; + . $nameListCode . ".', true, 'cb'); ?>"; $body .= PHP_EOL . $this->_t(4) . ""; $body .= PHP_EOL . $this->_t(2) . ""; $body .= PHP_EOL . $this->_t(3) . "published, \$i, '" - . $viewName_list . ".', false, 'cb'); ?>"; + . $nameListCode . ".', false, 'cb'); ?>"; $body .= PHP_EOL . $this->_t(2) . ""; $body .= PHP_EOL . $this->_t(2) . ""; } - if (!isset($this->fieldsNames[$viewName_single]['id'])) + if (!isset($this->fieldsNames[$nameSingleCode]['id'])) { $body .= PHP_EOL . $this->_t(2) . ''; $body .= PHP_EOL . $this->_t(3) . "id; ?>"; @@ -11323,46 +11369,46 @@ class Interpretation extends Fields /** * Get the list item dynamic row * - * @param array $item The item array - * @param string $viewName_single The single view code name - * @param string $viewName_list The list view code name - * @param string $itemClass The table row default class - * @param bool $doNotEscape The do not escape global switch - * @param bool $coreLoad The core permission loader switch - * @param array $core The core permission values - * @param bool $class The dive class adding switch - * @param string $ref The link referral string - * @param string $escape The escape code name - * @param string $user The user code name - * @param string $refview The override of the referral view code name + * @param array $item The item array + * @param string $nameSingleCode The single view code name + * @param string $nameListCode The list view code name + * @param string $itemClass The table row default class + * @param bool $doNotEscape The do not escape global switch + * @param bool $coreLoad The core permission loader switch + * @param array $core The core permission values + * @param bool $class The dive class adding switch + * @param string $ref The link referral string + * @param string $escape The escape code name + * @param string $user The user code name + * @param string $refview The override of the referral view code name * * @return string of the completer item value for the table row * */ - protected function getListItemBuilder($item, $viewName_single, - $viewName_list, &$itemClass, $doNotEscape, $coreLoad, $core, + protected function getListItemBuilder($item, $nameSingleCode, + $nameListCode, &$itemClass, $doNotEscape, $coreLoad, $core, $class = true, $ref = null, $escape = '$this->escape', $user = '$this->user', $refview = null ) { // check if we have relation fields - if (isset($this->fieldRelations[$viewName_list]) - && isset($this->fieldRelations[$viewName_list][(int) $item['id']]) - && isset($this->fieldRelations[$viewName_list][(int) $item['id']][2])) + if (isset($this->fieldRelations[$nameListCode]) + && isset($this->fieldRelations[$nameListCode][(int) $item['id']]) + && isset($this->fieldRelations[$nameListCode][(int) $item['id']][2])) { // set the fields array $field = array(); // use custom code $useCustomCode - = (isset($this->fieldRelations[$viewName_list][(int) $item['id']][2]['join_type']) - && $this->fieldRelations[$viewName_list][(int) $item['id']][2]['join_type'] + = (isset($this->fieldRelations[$nameListCode][(int) $item['id']][2]['join_type']) + && $this->fieldRelations[$nameListCode][(int) $item['id']][2]['join_type'] == 2 - && isset($this->fieldRelations[$viewName_list][(int) $item['id']][2]['set']) + && isset($this->fieldRelations[$nameListCode][(int) $item['id']][2]['set']) && ComponentbuilderHelper::checkString( - $this->fieldRelations[$viewName_list][(int) $item['id']][2]['set'] + $this->fieldRelations[$nameListCode][(int) $item['id']][2]['set'] )); // load the main list view field $field['[field=' . (int) $item['id'] . ']'] = $this->getListItem( - $item, $viewName_single, $viewName_list, $itemClass, + $item, $nameSingleCode, $nameListCode, $itemClass, $doNotEscape, $coreLoad, $core, false, $ref, $escape, $user, $refview ); @@ -11373,34 +11419,34 @@ class Interpretation extends Fields . $item['code']; } // now load the relations - if (isset($this->fieldRelations[$viewName_list][(int) $item['id']][2]['joinfields']) + if (isset($this->fieldRelations[$nameListCode][(int) $item['id']][2]['joinfields']) && ComponentbuilderHelper::checkArray( - $this->fieldRelations[$viewName_list][(int) $item['id']][2]['joinfields'] + $this->fieldRelations[$nameListCode][(int) $item['id']][2]['joinfields'] )) { foreach ( - $this->fieldRelations[$viewName_list][(int) $item['id']][2]['joinfields'] + $this->fieldRelations[$nameListCode][(int) $item['id']][2]['joinfields'] as $join ) { $blankClass = ''; - if (isset($this->listJoinBuilder[$viewName_list]) - && isset($this->listJoinBuilder[$viewName_list][(int) $join])) + if (isset($this->listJoinBuilder[$nameListCode]) + && isset($this->listJoinBuilder[$nameListCode][(int) $join])) { // code block $field['[field=' . (int) $join . ']'] = $this->getListItem( - $this->listJoinBuilder[$viewName_list][(int) $join], - $viewName_single, $viewName_list, $blankClass, + $this->listJoinBuilder[$nameListCode][(int) $join], + $nameSingleCode, $nameListCode, $blankClass, $doNotEscape, $coreLoad, $core, false, $ref, $escape, $user, $refview ); // code name - if (isset($this->listJoinBuilder[$viewName_list][(int) $join]['code']) + if (isset($this->listJoinBuilder[$nameListCode][(int) $join]['code']) && $useCustomCode) { $field['$item->{' . (int) $join . '}'] = '$item->' - . $this->listJoinBuilder[$viewName_list][(int) $join]['code']; + . $this->listJoinBuilder[$nameListCode][(int) $join]['code']; } } } @@ -11413,18 +11459,18 @@ class Interpretation extends Fields . $this->setPlaceholders( str_replace( array_keys($field), array_values($field), - $this->fieldRelations[$viewName_list][(int) $item['id']][2]['set'] + $this->fieldRelations[$nameListCode][(int) $item['id']][2]['set'] ), $this->placeholders ) . PHP_EOL . $this->_t(3) . ""; } - elseif (isset($this->fieldRelations[$viewName_list][(int) $item['id']]['set']) + elseif (isset($this->fieldRelations[$nameListCode][(int) $item['id']]['set']) && ComponentbuilderHelper::checkString( - $this->fieldRelations[$viewName_list][(int) $item['id']][2]['set'] + $this->fieldRelations[$nameListCode][(int) $item['id']][2]['set'] )) { // concatenate return PHP_EOL . $this->_t(3) . "
" . implode( - $this->fieldRelations[$viewName_list][(int) $item['id']][2]['set'], + $this->fieldRelations[$nameListCode][(int) $item['id']][2]['set'], $field ) . PHP_EOL . $this->_t(3) . "
"; } @@ -11435,7 +11481,7 @@ class Interpretation extends Fields } return $this->getListItem( - $item, $viewName_single, $viewName_list, $itemClass, $doNotEscape, + $item, $nameSingleCode, $nameListCode, $itemClass, $doNotEscape, $coreLoad, $core, $class, $ref, $escape, $user, $refview ); } @@ -11443,29 +11489,29 @@ class Interpretation extends Fields /** * Get the list item row value * - * @param array $item The item array - * @param string $viewName_single The single view code name - * @param string $viewName_list The list view code name - * @param string $itemClass The table row default class - * @param bool $doNotEscape The do not escape global switch - * @param bool $coreLoad The core permission loader switch - * @param array $core The core permission values - * @param bool $class The dive class adding switch - * @param string $ref The link referral string - * @param string $escape The escape code name - * @param string $user The user code name - * @param string $refview The override of the referral view code name + * @param array $item The item array + * @param string $nameSingleCode The single view code name + * @param string $nameListCode The list view code name + * @param string $itemClass The table row default class + * @param bool $doNotEscape The do not escape global switch + * @param bool $coreLoad The core permission loader switch + * @param array $core The core permission values + * @param bool $class The dive class adding switch + * @param string $ref The link referral string + * @param string $escape The escape code name + * @param string $user The user code name + * @param string $refview The override of the referral view code name * * @return string of the single item value for the table row * */ - protected function getListItem($item, $viewName_single, $viewName_list, + protected function getListItem($item, $nameSingleCode, $nameListCode, &$itemClass, $doNotEscape, $coreLoad, $core, $class = true, $ref = null, $escape = '$this->escape', $user = '$this->user', $refview = null ) { // get list item code $itemCode = $this->getListItemCode( - $item, $viewName_list, $doNotEscape, $escape + $item, $nameListCode, $doNotEscape, $escape ); // add default links $defaultLink = true; @@ -11490,16 +11536,17 @@ class Interpretation extends Fields $itemClass = 'nowrap'; // get list item link $itemLink = $this->getListItemLink( - $item, $checkoutTriger, $viewName_single, $viewName_list, $ref + $item, $checkoutTriger, $nameSingleCode, $nameListCode, $ref ); // get list item link authority $itemLinkAuthority = $this->getListItemLinkAuthority( - $item, $viewName_single, $viewName_list, $coreLoad, $core, $user + $item, $nameSingleCode, $nameListCode, $coreLoad, $core, + $user ); // set item row return $this->getListItemLinkLogic( - $itemCode, $itemLink, $itemLinkAuthority, $viewName_list, + $itemCode, $itemLink, $itemLinkAuthority, $nameListCode, $checkoutTriger, $class ); } @@ -11514,7 +11561,7 @@ class Interpretation extends Fields * @param string $itemCode The item code string * @param string $itemLink The item link string * @param string $itemLinkAuthority The link authority string - * @param string $viewName_list The list view code name + * @param string $nameListCode The list view code name * @param bool $checkoutTriger The check out trigger * @param bool $class The dive class adding switch * @@ -11522,7 +11569,7 @@ class Interpretation extends Fields * */ protected function getListItemLinkLogic($itemCode, $itemLink, - $itemLinkAuthority, $viewName_list, $checkoutTriger, $class = true + $itemLinkAuthority, $nameListCode, $checkoutTriger, $class = true ) { // build link $link = ''; @@ -11544,7 +11591,7 @@ class Interpretation extends Fields . "checked_out): ?>"; $link .= PHP_EOL . $tab . $this->_t(5) . "name, \$item->checked_out_time, '" - . $viewName_list . ".', \$canCheckin); ?>"; + . $nameListCode . ".', \$canCheckin); ?>"; $link .= PHP_EOL . $tab . $this->_t(4) . ""; } $link .= PHP_EOL . $tab . $this->_t(3) . ""; @@ -11564,26 +11611,26 @@ class Interpretation extends Fields /** * Get the custom admin view buttons * - * @param string $viewName_list The list view code name - * @param string $ref The link referral string + * @param string $nameListCode The list view code name + * @param string $ref The link referral string * * @return string of the custom admin view buttons * */ - protected function getCustomAdminViewButtons($viewName_list, $ref = '') + protected function getCustomAdminViewButtons($nameListCode, $ref = '') { $customAdminViewButton = ''; // check if custom links should be added to this list views - if (isset($this->customAdminViewListLink[$viewName_list]) + if (isset($this->customAdminViewListLink[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->customAdminViewListLink[$viewName_list] + $this->customAdminViewListLink[$nameListCode] )) { // start building the links $customAdminViewButton .= PHP_EOL . $this->_t(3) . '
'; foreach ( - $this->customAdminViewListLink[$viewName_list] as + $this->customAdminViewListLink[$nameListCode] as $customLinkView ) { @@ -11619,15 +11666,15 @@ class Interpretation extends Fields /** * Get the list item code value * - * @param array $item The item array - * @param string $viewName_list The list view code name - * @param bool $doNotEscape The do not escape global switch - * @param string $escape The escape code name + * @param array $item The item array + * @param string $nameListCode The list view code name + * @param bool $doNotEscape The do not escape global switch + * @param string $escape The escape code name * * @return string of the single item code * */ - protected function getListItemCode(&$item, $viewName_list, $doNotEscape, + protected function getListItemCode(&$item, $nameListCode, $doNotEscape, $escape = '$this->escape' ) { // first update the code id needed @@ -11666,13 +11713,13 @@ class Interpretation extends Fields . ')->name'; } // check if translated value is used - elseif (isset($this->selectionTranslationFixBuilder[$viewName_list]) + elseif (isset($this->selectionTranslationFixBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->selectionTranslationFixBuilder[$viewName_list] + $this->selectionTranslationFixBuilder[$nameListCode] ) && array_key_exists( $item['code'], - $this->selectionTranslationFixBuilder[$viewName_list] + $this->selectionTranslationFixBuilder[$nameListCode] )) { return 'JText:' . ':_($item->' . $item['code'] . ')'; @@ -11687,7 +11734,7 @@ class Interpretation extends Fields } elseif ($doNotEscape) { - if (in_array($item['code'], $this->doNotEscape[$viewName_list])) + if (in_array($item['code'], $this->doNotEscape[$nameListCode])) { return '$item->' . $item['code']; } @@ -11700,17 +11747,17 @@ class Interpretation extends Fields /** * Get the list item link * - * @param array $item The item array - * @param bool $checkoutTriger The checkout trigger switch - * @param string $viewName_single The single view code name - * @param string $viewName_list The list view code name - * @param string $ref The link referral string + * @param array $item The item array + * @param bool $checkoutTriger The checkout trigger switch + * @param string $nameSingleCode The single view code name + * @param string $nameListCode The list view code name + * @param string $ref The link referral string * * @return string of the single item link * */ protected function getListItemLink($item, &$checkoutTriger, - $viewName_single, $viewName_list, $ref = null + $nameSingleCode, $nameListCode, $ref = null ) { // set referal if not set $referal = ''; @@ -11729,7 +11776,7 @@ class Interpretation extends Fields // return the link to category return 'index.php?option=com_categories&task=category.edit&id=' . $item['code'] . '; ?>&extension=' - . $this->categoryBuilder[$viewName_list]['extension']; + . $this->categoryBuilder[$nameListCode]['extension']; } elseif ($item['type'] === 'user' && !$item['title']) { @@ -11773,24 +11820,24 @@ class Interpretation extends Fields /** * Get the list item authority * - * @param array $item The item array - * @param string $viewName_single The single view code name - * @param string $viewName_list The list view code name - * @param bool $coreLoad The core permission loader switch - * @param array $core The core permission values - * @param string $user The user code name + * @param array $item The item array + * @param string $nameSingleCode The single view code name + * @param string $nameListCode The list view code name + * @param bool $coreLoad The core permission loader switch + * @param array $core The core permission values + * @param string $user The user code name * * @return string of the single item link authority * */ - protected function getListItemLinkAuthority($item, $viewName_single, - $viewName_list, $coreLoad, $core, $user = '$this->user' + protected function getListItemLinkAuthority($item, $nameSingleCode, + $nameListCode, $coreLoad, $core, $user = '$this->user' ) { // if to be linked if ($item['type'] === 'category' && !$item['title']) { // get the other view - $otherView = $this->catCodeBuilder[$viewName_single]['view']; + $otherView = $this->catCodeBuilder[$nameSingleCode]['view']; // return the authority to category return $user . "->authorise('core.edit', 'com_" @@ -11858,7 +11905,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit']] )) { @@ -11874,37 +11921,49 @@ class Interpretation extends Fields * Get the list field class * * @param string $name The field code name - * @param string $listViewName The list view code name + * @param string $nameListCode The list view code name * @param string $default The default * * @return string The list field class * */ - protected function getListFieldClass($name, $listViewName, $default = '') + protected function getListFieldClass($name, $nameListCode, $default = '') { - return (isset($this->listFieldClass[$listViewName]) - && isset($this->listFieldClass[$listViewName][$name])) - ? $this->listFieldClass[$listViewName][$name] : $default; + return (isset($this->listFieldClass[$nameListCode]) + && isset($this->listFieldClass[$nameListCode][$name])) + ? $this->listFieldClass[$nameListCode][$name] : $default; } /** * set the list body table head * - * @param string $viewName_single - * @param string $viewName_list + * @param string $nameSingleCode + * @param string $nameListCode * * @return string */ - public function setListHead($viewName_single, $viewName_list) + public function setListHead($nameSingleCode, $nameListCode) { - if (isset($this->listBuilder[$viewName_list]) + if (isset($this->listBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->listBuilder[$viewName_list] + $this->listBuilder[$nameListCode] )) { + // set the JHtml values based on filter type + $jhtml_sort = "grid.sort"; + $jhtml_sort_icon = ""; + $jhtml_sort_icon_2 = ""; + // for the new filter + if (isset($this->adminFilterType[$nameListCode]) + && $this->adminFilterType[$nameListCode] == 2) + { + $jhtml_sort = "searchtools.sort"; + $jhtml_sort_icon = ""; + $jhtml_sort_icon_2 = ", 'icon-menu-2'"; + } // main lang prefix $langView = $this->langPrefix . '_' - . ComponentbuilderHelper::safeString($viewName_single, 'U'); + . ComponentbuilderHelper::safeString($nameSingleCode, 'U'); // set status lang $statusLangName = $langView . '_STATUS'; // set id lang @@ -11917,14 +11976,15 @@ class Interpretation extends Fields $head = ''; $head .= PHP_EOL . $this->_t(1) . "canEdit&& \$this->canState): ?>"; - if (!isset($this->fieldsNames[$viewName_single]['ordering'])) + if (!isset($this->fieldsNames[$nameSingleCode]['ordering'])) { $head .= PHP_EOL . $this->_t(2) . ''; $head .= PHP_EOL . $this->_t(3) - . "' - . "', 'ordering', \$this->listDirn, \$this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>"; + . "listDirn, \$this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'" + . $jhtml_sort_icon_2 . "); ?>"; $head .= PHP_EOL . $this->_t(2) . ""; } $head .= PHP_EOL . $this->_t(2) @@ -11943,22 +12003,22 @@ class Interpretation extends Fields $head .= PHP_EOL . $this->_t(2) . ""; $head .= PHP_EOL . $this->_t(1) . ""; // set footer Column number - $this->listColnrBuilder[$viewName_list] = 4; + $this->listColnrBuilder[$nameListCode] = 4; // build the dynamic fields - foreach ($this->listBuilder[$viewName_list] as $item) + foreach ($this->listBuilder[$nameListCode] as $item) { // check if target is admin list if (1 == $item['target'] || 3 == $item['target']) { // check if we have an over-ride - if (isset($this->listHeadOverRide[$viewName_list]) + if (isset($this->listHeadOverRide[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->listHeadOverRide[$viewName_list] + $this->listHeadOverRide[$nameListCode] ) - && isset($this->listHeadOverRide[$viewName_list][$item['id']])) + && isset($this->listHeadOverRide[$nameListCode][$item['id']])) { $item['lang'] - = $this->listHeadOverRide[$viewName_list][$item['id']]; + = $this->listHeadOverRide[$nameListCode][$item['id']]; } $class = 'nowrap hidden-phone'; if ($item['link']) @@ -11972,7 +12032,8 @@ class Interpretation extends Fields if ($item['type'] === 'category') { // only one category per/view allowed at this point - $title = "listDirn, \$this->listOrder); ?>"; } @@ -11982,14 +12043,16 @@ class Interpretation extends Fields )) { // keep an eye on this - $title = "listDirn, \$this->listOrder); ?>"; } else { - $title = "listDirn, \$this->listOrder); ?>"; } @@ -12003,18 +12066,19 @@ class Interpretation extends Fields . '" >'; $head .= PHP_EOL . $this->_t(3) . $title; $head .= PHP_EOL . $this->_t(1) . ""; - $this->listColnrBuilder[$viewName_list]++; + $this->listColnrBuilder[$nameListCode]++; } } // set default - if (!isset($this->fieldsNames[$viewName_single]['published'])) + if (!isset($this->fieldsNames[$nameSingleCode]['published'])) { $head .= PHP_EOL . $this->_t(1) . "canState): ?>"; $head .= PHP_EOL . $this->_t(2) . ''; $head .= PHP_EOL . $this->_t(3) - . "listDirn, \$this->listOrder); ?>"; $head .= PHP_EOL . $this->_t(2) . ""; $head .= PHP_EOL . $this->_t(1) . ""; @@ -12025,12 +12089,13 @@ class Interpretation extends Fields $head .= PHP_EOL . $this->_t(2) . ""; $head .= PHP_EOL . $this->_t(1) . ""; } - if (!isset($this->fieldsNames[$viewName_single]['id'])) + if (!isset($this->fieldsNames[$nameSingleCode]['id'])) { $head .= PHP_EOL . $this->_t(1) . ''; $head .= PHP_EOL . $this->_t(3) - . "listDirn, \$this->listOrder); ?>"; $head .= PHP_EOL . $this->_t(1) . ""; } @@ -12042,11 +12107,11 @@ class Interpretation extends Fields return ''; } - public function setListColnr($viewName_list) + public function setListColnr($nameListCode) { - if (isset($this->listColnrBuilder[$viewName_list])) + if (isset($this->listColnrBuilder[$nameListCode])) { - return $this->listColnrBuilder[$viewName_list]; + return $this->listColnrBuilder[$nameListCode]; } return ''; @@ -12055,22 +12120,22 @@ class Interpretation extends Fields /** * set Tabs Layouts Fields Array * - * @param string $view_name_single The single view name + * @param string $nameSingleCode The single view name * * @return string The array * */ - public function getTabLayoutFieldsArray($view_name_single) + public function getTabLayoutFieldsArray($nameSingleCode) { // check if the load build is set for this view - if (isset($this->layoutBuilder[$view_name_single]) + if (isset($this->layoutBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkArray( - $this->layoutBuilder[$view_name_single] + $this->layoutBuilder[$nameSingleCode] )) { $layoutArray = array(); foreach ( - $this->layoutBuilder[$view_name_single] as $layout => + $this->layoutBuilder[$nameSingleCode] as $layout => $alignments ) { @@ -12120,16 +12185,16 @@ class Interpretation extends Fields public function setEditBody(&$view) { // set view name - $view_name_single = ComponentbuilderHelper::safeString( + $nameSingleCode = ComponentbuilderHelper::safeString( $view['settings']->name_single ); // main lang prefix $langView = $this->langPrefix . '_' - . ComponentbuilderHelper::safeString($view_name_single, 'U'); + . ComponentbuilderHelper::safeString($nameSingleCode, 'U'); // check if the load build is set for this view - if (isset($this->layoutBuilder[$view_name_single]) + if (isset($this->layoutBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkArray( - $this->layoutBuilder[$view_name_single] + $this->layoutBuilder[$nameSingleCode] )) { // reset the linked keys @@ -12137,7 +12202,7 @@ class Interpretation extends Fields $linkedViewIdentifier = array(); // set the linked view tabs $linkedTab = $this->getEditBodyLinkedAdminViewsTabs( - $view, $view_name_single, $keys, $linkedViewIdentifier + $view, $nameSingleCode, $keys, $linkedViewIdentifier ); // custom tab searching array $searchTabs = array(); @@ -12150,7 +12215,7 @@ class Interpretation extends Fields $sidewidth = 0; // get the tabs with positions $tabBucket = $this->getEditBodyTabs( - $view_name_single, $langView, $linkedTab, $keys, + $nameSingleCode, $langView, $linkedTab, $keys, $linkedViewIdentifier, $searchTabs, $leftside, $rightside, $footer, $header, $mainwidth, $sidewidth ); @@ -12184,12 +12249,12 @@ class Interpretation extends Fields { $body .= PHP_EOL . PHP_EOL . $this->_t(1) . " '" + . $nameSingleCode . "Tab', array('active' => '" . $tabCodeName . "')); ?>"; } // check if custom tab must be added if (($_customTabHTML = $this->addCustomTabs( - $searchTabs[$tabCodeName], $view_name_single, 1 + $searchTabs[$tabCodeName], $nameSingleCode, 1 )) !== false) { $body .= $_customTabHTML; @@ -12244,7 +12309,7 @@ class Interpretation extends Fields // start addtab body $body .= PHP_EOL . $this->_t(1) . ""; // add the main $body .= PHP_EOL . $this->_t(2) @@ -12270,7 +12335,7 @@ class Interpretation extends Fields } // check if custom tab must be added if (($_customTabHTML = $this->addCustomTabs( - $searchTabs[$tabCodeName], $view_name_single, 2 + $searchTabs[$tabCodeName], $nameSingleCode, 2 )) !== false) { $body .= $_customTabHTML; @@ -12282,19 +12347,19 @@ class Interpretation extends Fields $body .= PHP_EOL . PHP_EOL . $this->_t(1) . "ignore_fieldsets = array('details','metadata','vdmmetadata','accesscontrol'); ?>"; $body .= PHP_EOL . $this->_t(1) . "tab_name = '" - . $view_name_single . "Tab'; ?>"; + . $nameSingleCode . "Tab'; ?>"; $body .= PHP_EOL . $this->_t(1) . ""; // add the publish and meta data tabs $body .= $this->getEditBodyPublishMetaTabs( - $view_name_single, $langView + $nameSingleCode, $langView ); // end the tab set $body .= PHP_EOL . PHP_EOL . $this->_t(1) . ""; $body .= PHP_EOL . PHP_EOL . $this->_t(1) . "
"; $body .= PHP_EOL . $this->_t(2) - . ''; $body .= PHP_EOL . $this->_t(2) . ""; @@ -12337,7 +12402,7 @@ class Interpretation extends Fields * get Edit Body Linked Admin Views * * @param array $view The view data - * @param string $view_name_single The single view name + * @param string $nameSingleCode The single view name * @param array $keys The tabs to add in layout * @param array $linkedViewIdentifier The linked view identifier * @@ -12345,22 +12410,22 @@ class Interpretation extends Fields * */ protected function getEditBodyLinkedAdminViewsTabs(&$view, - &$view_name_single, &$keys, &$linkedViewIdentifier + &$nameSingleCode, &$keys, &$linkedViewIdentifier ) { // start linked tabs bucket $linkedTab = array(); // check if the view has linked admin view - if (isset($this->linkedAdminViews[$view_name_single]) + if (isset($this->linkedAdminViews[$nameSingleCode]) && ComponentbuilderHelper::checkArray( - $this->linkedAdminViews[$view_name_single] + $this->linkedAdminViews[$nameSingleCode] )) { - foreach ($this->linkedAdminViews[$view_name_single] as $linkedView) + foreach ($this->linkedAdminViews[$nameSingleCode] as $linkedView) { // get the tab name $tabName = $view['settings']->tabs[(int) $linkedView['tab']]; // update the tab counter - $this->tabCounter[$view_name_single][$linkedView['tab']] + $this->tabCounter[$nameSingleCode][$linkedView['tab']] = $tabName; // add the linked view $linkedTab[$linkedView['adminview']] = $linkedView['tab']; @@ -12398,7 +12463,7 @@ class Interpretation extends Fields /** * get Edit Body Tabs * - * @param string $view_name_single The single view name + * @param string $nameSingleCode The single view name * @param string $langView The main lang prefix * @param array $linkedTab The linked admin view tabs * @param array $keys The tabs to add in layout @@ -12414,16 +12479,16 @@ class Interpretation extends Fields * @return array The linked tabs * */ - protected function getEditBodyTabs(&$view_name_single, &$langView, + protected function getEditBodyTabs(&$nameSingleCode, &$langView, &$linkedTab, &$keys, &$linkedViewIdentifier, &$searchTabs, &$leftside, &$rightside, &$footer, &$header, &$mainwidth, &$sidewidth ) { // start tabs $tabs = array(); // sort the tabs based on key order - ksort($this->tabCounter[$view_name_single]); + ksort($this->tabCounter[$nameSingleCode]); // start tab builinging loop - foreach ($this->tabCounter[$view_name_single] as $tabNr => $tabName) + foreach ($this->tabCounter[$nameSingleCode] as $tabNr => $tabName) { $tabWidth = 12; $lrCounter = 0; @@ -12453,7 +12518,7 @@ class Interpretation extends Fields if ($buildLayout) { // sort to make sure it loads left first - $alignments = $this->layoutBuilder[$view_name_single][$tabName]; + $alignments = $this->layoutBuilder[$nameSingleCode][$tabName]; ksort($alignments); foreach ($alignments as $alignment => $names) { @@ -12488,7 +12553,7 @@ class Interpretation extends Fields $lrCounter++; // set as items layout $this->setLayout( - $view_name_single, $layoutCodeName, $items, + $nameSingleCode, $layoutCodeName, $items, 'layoutitems' ); // set the lang to tab @@ -12499,13 +12564,13 @@ class Interpretation extends Fields $tabs[$tabCodeName][(int) $alignment] = ''; } $tabs[$tabCodeName][(int) $alignment] .= ""; break; case 3: // fullwidth // set as items layout $this->setLayout( - $view_name_single, $layoutCodeName, $items, + $nameSingleCode, $layoutCodeName, $items, 'layoutfull' ); // set the lang to tab @@ -12516,58 +12581,58 @@ class Interpretation extends Fields $tabs[$tabCodeName][(int) $alignment] = ''; } $tabs[$tabCodeName][(int) $alignment] .= ""; break; case 4: // above // set as title layout $this->setLayout( - $view_name_single, $layoutCodeName, $items, + $nameSingleCode, $layoutCodeName, $items, 'layouttitle' ); // load to header $header .= PHP_EOL . $this->_t(1) . ""; break; case 5: // under // set as title layout $this->setLayout( - $view_name_single, $layoutCodeName, $items, + $nameSingleCode, $layoutCodeName, $items, 'layouttitle' ); // load to footer $footer .= PHP_EOL . PHP_EOL . "
" . PHP_EOL . ""; break; case 6: // left side $tabWidth = $tabWidth - 2; // set as items layout $this->setLayout( - $view_name_single, $layoutCodeName, $items, + $nameSingleCode, $layoutCodeName, $items, 'layoutitems' ); // load the body $leftside .= PHP_EOL . $this->_t(1) . ""; break; case 7: // right side $tabWidth = $tabWidth - 2; // set as items layout $this->setLayout( - $view_name_single, $layoutCodeName, $items, + $nameSingleCode, $layoutCodeName, $items, 'layoutitems' ); // load the body $rightside .= PHP_EOL . $this->_t(1) . ""; break; } @@ -12585,27 +12650,27 @@ class Interpretation extends Fields ); // set as items layout $this->setLayout( - $view_name_single, $layoutCodeName, $codeName, + $nameSingleCode, $layoutCodeName, $codeName, 'layoutlinkedview' ); // set the lang to tab $tabs[$tabCodeName]['lang'] = $tabLangName; // set all the linked view stuff $this->secondRunAdmin['setLinkedView'][] = array( - 'viewId' => $linkedViewId, - 'view_name_single' => $view_name_single, - 'codeName' => $codeName, - 'layoutCodeName' => $layoutCodeName, - 'key' => $keys[$linkedViewId]['key'], - 'parentKey' => $keys[$linkedViewId]['parentKey'], - 'addNewButon' => $keys[$linkedViewId]['addNewButton']); + 'viewId' => $linkedViewId, + 'nameSingleCode' => $nameSingleCode, + 'codeName' => $codeName, + 'layoutCodeName' => $layoutCodeName, + 'key' => $keys[$linkedViewId]['key'], + 'parentKey' => $keys[$linkedViewId]['parentKey'], + 'addNewButon' => $keys[$linkedViewId]['addNewButton']); // load the body if (!isset($tabs[$tabCodeName][3])) { $tabs[$tabCodeName][3] = ''; } $tabs[$tabCodeName][3] .= ""; } // width calculator :) @@ -12680,13 +12745,13 @@ class Interpretation extends Fields /** * get Edit Body Publish and Meta Tab * - * @param string $view_name_single The single view name - * @param string $langView The main lang prefix + * @param string $nameSingleCode The single view name + * @param string $langView The main lang prefix * * @return string The published and Meta Data Tabs * */ - protected function getEditBodyPublishMetaTabs(&$view_name_single, &$langView + protected function getEditBodyPublishMetaTabs(&$nameSingleCode, &$langView ) { // build the two tabs $tabs = ''; @@ -12699,10 +12764,10 @@ class Interpretation extends Fields // Setup the default (custom) fields // only load (1 => 'left', 2 => 'right') $fieldsAddedRight = false; - if (isset($this->newPublishingFields[$view_name_single])) + if (isset($this->newPublishingFields[$nameSingleCode])) { foreach ( - $this->newPublishingFields[$view_name_single] as $df_alignment + $this->newPublishingFields[$nameSingleCode] as $df_alignment => $df_items ) { @@ -12723,7 +12788,7 @@ class Interpretation extends Fields 'Your %s field could not be added, since the %s alignment position is not available in the %s (publishing) tab. Please only target Left or right in the publishing tab.', $df_name, $this->alignmentOptions[$df_alignment], - $view_name_single + $nameSingleCode ), 'Warning' ); } @@ -12746,16 +12811,16 @@ class Interpretation extends Fields { foreach ($defaultFields as $defaultField) { - if (!isset($this->movedPublishingFields[$view_name_single][$defaultField])) + if (!isset($this->movedPublishingFields[$nameSingleCode][$defaultField])) { if ($defaultField != 'access') { $items[$d_alignment][] = $defaultField; } elseif ($defaultField === 'access' - && isset($this->accessBuilder[$view_name_single]) + && isset($this->accessBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkString( - $this->accessBuilder[$view_name_single] + $this->accessBuilder[$nameSingleCode] )) { $items[$d_alignment][] = $defaultField; @@ -12764,9 +12829,9 @@ class Interpretation extends Fields } } // check if metadata is added to this view - if (isset($this->metadataBuilder[$view_name_single]) + if (isset($this->metadataBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkString( - $this->metadataBuilder[$view_name_single] + $this->metadataBuilder[$nameSingleCode] )) { // set default publishing tab code name @@ -12813,13 +12878,13 @@ class Interpretation extends Fields $this->app->enqueueMessage( JText::sprintf( 'Your field/s added to the right alignment position in the %s (publishing) tab was added to the left. Since we have metadata fields on the right. Fields can only be loaded to the right of the publishing tab if there is no metadata fields.', - $view_name_single + $nameSingleCode ), 'Notice' ); } // set the publishing layout $this->setLayout( - $view_name_single, $tabCodeNameLeft, $items_one, + $nameSingleCode, $tabCodeNameLeft, $items_one, 'layoutpublished' ); $items_one = true; @@ -12830,7 +12895,7 @@ class Interpretation extends Fields } // set the metadata layout $this->setLayout( - $view_name_single, $tabCodeNameRight, false, 'layoutmetadata' + $nameSingleCode, $tabCodeNameRight, false, 'layoutmetadata' ); $items_two = true; } @@ -12852,7 +12917,7 @@ class Interpretation extends Fields ) . "'"; // set the publishing layout $this->setLayout( - $view_name_single, $tabCodeNameLeft, $items_one, + $nameSingleCode, $tabCodeNameLeft, $items_one, 'layoutpublished' ); $items_one = true; @@ -12866,7 +12931,7 @@ class Interpretation extends Fields ) . "'"; // set the publishing layout $this->setLayout( - $view_name_single, $tabCodeNameRight, $items_two, + $nameSingleCode, $tabCodeNameRight, $items_two, 'layoutpublished' ); $items_two = true; @@ -12888,9 +12953,9 @@ class Interpretation extends Fields } // setup correct core target $coreLoad = false; - if (isset($this->permissionCore[$view_name_single])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$view_name_single]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } // only load this if needed @@ -12909,7 +12974,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core[$core_permission]] ) && in_array( - $view_name_single, + $nameSingleCode, $this->permissionBuilder['global'][$core[$core_permission]] )) { @@ -12935,7 +13000,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core[$core_permission]] ) && in_array( - $view_name_single, + $nameSingleCode, $this->permissionBuilder['global'][$core[$core_permission]] )) { @@ -12953,7 +13018,7 @@ class Interpretation extends Fields } // check if custom tab must be added if (($_customTabHTML = $this->addCustomTabs( - 15, $view_name_single, 1 + 15, $nameSingleCode, 1 )) !== false) { $tabs .= $_customTabHTML; @@ -12967,7 +13032,7 @@ class Interpretation extends Fields // set the default publishing tab $tabs .= PHP_EOL . $this->_t(1) . ""; $tabs .= PHP_EOL . $this->_t(2) . '
'; @@ -12976,7 +13041,7 @@ class Interpretation extends Fields $tabs .= PHP_EOL . $this->_t(3) . '
'; $tabs .= PHP_EOL . $this->_t(4) - . ""; $tabs .= PHP_EOL . $this->_t(3) . "
"; } @@ -12985,7 +13050,7 @@ class Interpretation extends Fields $tabs .= PHP_EOL . $this->_t(3) . '
'; $tabs .= PHP_EOL . $this->_t(4) - . ""; $tabs .= PHP_EOL . $this->_t(3) . "
"; } @@ -12995,7 +13060,7 @@ class Interpretation extends Fields $tabs .= PHP_EOL . $this->_t(1) . ""; // check if custom tab must be added if (($_customTabHTML = $this->addCustomTabs( - 15, $view_name_single, 2 + 15, $nameSingleCode, 2 )) !== false) { $tabs .= $_customTabHTML; @@ -13003,7 +13068,7 @@ class Interpretation extends Fields } // make sure we dont load it to a view with the name component (as this will cause conflict with Joomla conventions) - if ($view_name_single != 'component') + if ($nameSingleCode != 'component') { // set permissions tab lang $tabLangName = $langView . '_PERMISSION'; @@ -13016,7 +13081,7 @@ class Interpretation extends Fields . "canDo->get('core.admin')) : ?>"; $tabs .= PHP_EOL . $this->_t(1) . ""; $tabs .= PHP_EOL . $this->_t(2) . '
'; @@ -13124,33 +13189,33 @@ class Interpretation extends Fields } /** - * @param $viewName_single + * @param $nameSingleCode * @param $layoutName * @param $items * @param $type */ - public function setLayout($viewName_single, $layoutName, $items, $type) + public function setLayout($nameSingleCode, $layoutName, $items, $type) { // first build the layout file - $target = array('admin' => $viewName_single); + $target = array('admin' => $nameSingleCode); $this->buildDynamique($target, $type, $layoutName); // add to front if needed if ($this->lang === 'both') { - $target = array('site' => $viewName_single); + $target = array('site' => $nameSingleCode); $this->buildDynamique($target, $type, $layoutName); } if (ComponentbuilderHelper::checkString($items)) { // LAYOUTITEMS <<>> - $this->fileContentDynamic[$viewName_single . '_' + $this->fileContentDynamic[$nameSingleCode . '_' . $layoutName][$this->hhh . 'LAYOUTITEMS' . $this->hhh] = $items; } else { // LAYOUTITEMS <<>> - $this->fileContentDynamic[$viewName_single . '_' + $this->fileContentDynamic[$nameSingleCode . '_' . $layoutName][$this->hhh . 'bogus' . $this->hhh] = 'boom'; } @@ -13163,7 +13228,7 @@ class Interpretation extends Fields { /** * @var $viewId - * @var $view_name_single + * @var $nameSingleCode * @var $codeName * @var $layoutCodeName * @var $key @@ -13171,46 +13236,44 @@ class Interpretation extends Fields * @var $addNewButon */ extract($args, EXTR_PREFIX_SAME, "oops"); - $single = ''; - $list = ''; + $single = ''; + $name_list_code = ''; foreach ($this->componentData->admin_views as $array) { if ($array['adminview'] == $viewId) { - $single = ComponentbuilderHelper::safeString( - $array['settings']->name_single - ); - $list = ComponentbuilderHelper::safeString( - $array['settings']->name_list - ); + $name_single_code = $array['settings']->name_single_code; + $name_list_code = $array['settings']->name_list_code; break; } } - if (ComponentbuilderHelper::checkString($single) - && ComponentbuilderHelper::checkString($list)) + if (ComponentbuilderHelper::checkString($name_single_code) + && ComponentbuilderHelper::checkString($name_list_code)) { $head = $this->setListHeadLinked( - $single, $list, $addNewButon, $view_name_single + $name_single_code, $name_list_code, $addNewButon, + $nameSingleCode ); $body = $this->setListBodyLinked( - $single, $list, $view_name_single + $name_single_code, $name_list_code, $nameSingleCode ); $functionName = ComponentbuilderHelper::safeString($codeName, 'F'); // LAYOUTITEMSTABLE <<>> - $this->fileContentDynamic[$view_name_single . '_' + $this->fileContentDynamic[$nameSingleCode . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh] = $head . $body; // LAYOUTITEMSHEADER <<>> $headerscript = '//' . $this->setLine(__LINE__) . ' set the edit URL'; $headerscript .= PHP_EOL . '$edit = "index.php?option=com_' - . $this->componentCodeName . '&view=' . $list . '&task=' - . $single . '.edit";'; + . $this->componentCodeName . '&view=' . $name_list_code + . '&task=' + . $name_single_code . '.edit";'; $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' set a return value'; $headerscript .= PHP_EOL . '$return = ($id) ? "index.php?option=com_' - . $this->componentCodeName . '&view=' . $view_name_single + . $this->componentCodeName . '&view=' . $nameSingleCode . '&layout=edit&id=" . $id : "";'; $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' check for a return value'; @@ -13232,13 +13295,13 @@ class Interpretation extends Fields __LINE__ ) . ' set the referral values'; $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref=' - . $view_name_single + . $nameSingleCode . '&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));'; $headerscript .= PHP_EOL . '}'; $headerscript .= PHP_EOL . 'else'; $headerscript .= PHP_EOL . '{'; $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref=' - . $view_name_single . '&refid=" . $id : "";'; + . $nameSingleCode . '&refid=" . $id : "";'; $headerscript .= PHP_EOL . '}'; if ($addNewButon > 0) { @@ -13248,8 +13311,9 @@ class Interpretation extends Fields $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' set the create new URL'; $headerscript .= PHP_EOL . '$new = "index.php?option=com_' - . $this->componentCodeName . '&view=' . $list . '&task=' - . $single . '.edit" . $ref;'; + . $this->componentCodeName . '&view=' . $name_list_code + . '&task=' + . $name_single_code . '.edit" . $ref;'; } // and the link for close and new if ($addNewButon == 2 || $addNewButon == 3) @@ -13258,21 +13322,23 @@ class Interpretation extends Fields . ' set the create new and close URL'; $headerscript .= PHP_EOL . '$close_new = "index.php?option=com_' - . $this->componentCodeName . '&view=' . $list . '&task=' - . $single . '.edit";'; + . $this->componentCodeName . '&view=' . $name_list_code + . '&task=' + . $name_single_code . '.edit";'; } $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' load the action object'; $headerscript .= PHP_EOL . '$can = ' . $this->fileContentStatic[$this->hhh . 'Component' - . $this->hhh] . 'Helper::getActions(' . "'" . $single . "'" + . $this->hhh] . 'Helper::getActions(' . "'" + . $name_single_code . "'" . ');'; } - $this->fileContentDynamic[$view_name_single . '_' + $this->fileContentDynamic[$nameSingleCode . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh] = $headerscript; // LINKEDVIEWITEMS <<>> - $this->fileContentDynamic[$view_name_single][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'LINKEDVIEWITEMS' . $this->hhh] .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine( __LINE__ @@ -13280,7 +13346,7 @@ class Interpretation extends Fields . "\$this->" . $codeName . " = \$this->get('" . $functionName . "');"; // LINKEDVIEWTABLESCRIPTS <<>> - $this->fileContentDynamic[$view_name_single][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'LINKEDVIEWTABLESCRIPTS' . $this->hhh] = $this->setFootableScripts(); if (strpos($parentKey, '-R>') !== false @@ -13323,7 +13389,7 @@ class Interpretation extends Fields = ComponentbuilderHelper::safeString( $_key . $this->uniquekey(4) ); - $this->fileContentDynamic[$view_name_single][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey[$parent_key] . " = \$item->" . $parent_key @@ -13336,25 +13402,26 @@ class Interpretation extends Fields $globalKey = ComponentbuilderHelper::safeString( $_key . $this->uniquekey(4) ); - $this->fileContentDynamic[$view_name_single][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey . " = \$item->" . $parent_key . ";"; } // LINKEDVIEWMETHODS <<>> - $this->fileContentDynamic[$view_name_single][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'LINKEDVIEWMETHODS' . $this->hhh] .= $this->setListQueryLinked( - $single, $list, $functionName, $key, $_key, $parentKey, + $name_single_code, $name_list_code, $functionName, $key, $_key, + $parentKey, $parent_key, $globalKey ); } else { - $this->fileContentDynamic[$view_name_single . '_' + $this->fileContentDynamic[$nameSingleCode . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh] = 'oops! error.....'; - $this->fileContentDynamic[$view_name_single . '_' + $this->fileContentDynamic[$nameSingleCode . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh] = ''; } @@ -13492,17 +13559,18 @@ class Interpretation extends Fields /** * set the list body of the linked admin view * - * @param string $viewName_single - * @param string $viewName_list + * @param string $nameSingleCode + * @param string $nameListCode * @param string $refview * * @return string */ - public function setListBodyLinked($viewName_single, $viewName_list, $refview + public function setListBodyLinked($nameSingleCode, $nameListCode, + $refview ) { - if (isset($this->listBuilder[$viewName_list]) + if (isset($this->listBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->listBuilder[$viewName_list] + $this->listBuilder[$nameListCode] )) { // component helper name @@ -13513,9 +13581,9 @@ class Interpretation extends Fields // setup correct core target $coreLoad = false; $core = null; - if (isset($this->permissionCore[$viewName_single])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$viewName_single]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } $counter = 0; @@ -13528,18 +13596,18 @@ class Interpretation extends Fields $body .= PHP_EOL . $this->_t(2) . "\$userChkOut = JFactory::getUser(\$item->checked_out);"; $body .= PHP_EOL . $this->_t(2) . "\$canDo = " . $Helper - . "::getActions('" . $viewName_single . "',\$item,'" - . $viewName_list . "');"; + . "::getActions('" . $nameSingleCode . "',\$item,'" + . $nameListCode . "');"; $body .= PHP_EOL . $this->_t(1) . "?>"; $body .= PHP_EOL . $this->_t(1) . ''; // check if this view has fields that should not be escaped $doNotEscape = false; - if (isset($this->doNotEscape[$viewName_list])) + if (isset($this->doNotEscape[$nameListCode])) { $doNotEscape = true; } // start adding the dynamic - foreach ($this->listBuilder[$viewName_list] as $item) + foreach ($this->listBuilder[$nameListCode] as $item) { // check if target is linked list view if (1 == $item['target'] || 4 == $item['target']) @@ -13550,7 +13618,7 @@ class Interpretation extends Fields $customAdminViewButtons = ''; // set the item row $itemRow = $this->getListItemBuilder( - $item, $viewName_single, $viewName_list, $itemClass, + $item, $nameSingleCode, $nameListCode, $itemClass, $doNotEscape, $coreLoad, $core, false, $ref, '$displayData->escape', '$user', $refview ); @@ -13560,7 +13628,7 @@ class Interpretation extends Fields // get custom admin view buttons $customAdminViewButtons = $this->getCustomAdminViewButtons( - $viewName_list, $ref + $nameListCode, $ref ); // make sure the custom admin view buttons are only added once $firstTimeBeingAdded = false; @@ -13578,7 +13646,7 @@ class Interpretation extends Fields : 'data-value'; // add the defaults - if (!isset($this->fieldsNames[$viewName_single]['published'])) + if (!isset($this->fieldsNames[$nameSingleCode]['published'])) { $counter++; // add the defaults @@ -13641,7 +13709,7 @@ class Interpretation extends Fields } // add the defaults - if (!isset($this->fieldsNames[$viewName_single]['id'])) + if (!isset($this->fieldsNames[$nameSingleCode]['id'])) { $counter++; $body .= PHP_EOL . $this->_t(2) @@ -13683,19 +13751,19 @@ class Interpretation extends Fields /** * set the list body table head linked admin view * - * @param string $viewName_single - * @param string $viewName_list + * @param string $nameSingleCode + * @param string $nameListCode * @param bool $addNewButon * @param string $refview * * @return string */ - public function setListHeadLinked($viewName_single, $viewName_list, + public function setListHeadLinked($nameSingleCode, $nameListCode, $addNewButon, $refview ) { - if (isset($this->listBuilder[$viewName_list]) + if (isset($this->listBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->listBuilder[$viewName_list] + $this->listBuilder[$nameListCode] )) { // component helper name @@ -13707,9 +13775,9 @@ class Interpretation extends Fields { // setup correct core target $coreLoad = false; - if (isset($this->permissionCore[$viewName_single])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$viewName_single]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } // check if the item has permissions. @@ -13719,7 +13787,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.create']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.create']] )) { @@ -13777,18 +13845,18 @@ class Interpretation extends Fields ? ' data-show-toggle="true" data-toggle-column="first"' : ''; // set paging $paging = (2 == $this->footableVersion) - ? ' data-page-size="20" data-filter="#filter_' . $viewName_list + ? ' data-page-size="20" data-filter="#filter_' . $nameListCode . '"' : ' data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true"'; // add html fix for V3 $htmlFix = (3 == $this->footableVersion) ? ' data-type="html" data-sort-use="text"' : ''; $head .= PHP_EOL . ''; + . $nameListCode . $metro_blue . '"' . $toggle . $paging . '>'; $head .= PHP_EOL . ""; // main lang prefix $langView = $this->langPrefix . '_' - . ComponentbuilderHelper::safeString($viewName_single, 'U'); + . ComponentbuilderHelper::safeString($nameSingleCode, 'U'); // set status lang $statusLangName = $langView . '_STATUS'; // set id lang @@ -13803,20 +13871,20 @@ class Interpretation extends Fields // set controller for data hiding options $controller = 1; // build the dynamic fields - foreach ($this->listBuilder[$viewName_list] as $item) + foreach ($this->listBuilder[$nameListCode] as $item) { // check if target is linked list view if (1 == $item['target'] || 4 == $item['target']) { // check if we have an over-ride - if (isset($this->listHeadOverRide[$viewName_list]) + if (isset($this->listHeadOverRide[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->listHeadOverRide[$viewName_list] + $this->listHeadOverRide[$nameListCode] ) - && isset($this->listHeadOverRide[$viewName_list][$item['id']])) + && isset($this->listHeadOverRide[$nameListCode][$item['id']])) { $item['lang'] - = $this->listHeadOverRide[$viewName_list][$item['id']]; + = $this->listHeadOverRide[$nameListCode][$item['id']]; } $setin = (2 == $this->footableVersion) ? ' data-hide="phone"' : ' data-breakpoints="xs sm"'; @@ -13851,7 +13919,7 @@ class Interpretation extends Fields $data_hide = (2 == $this->footableVersion) ? 'data-hide="phone,tablet"' : 'data-breakpoints="xs sm md"'; // add the defaults - if (!isset($this->fieldsNames[$viewName_single]['published'])) + if (!isset($this->fieldsNames[$nameSingleCode]['published'])) { $head .= PHP_EOL . $this->_t(2) . 'canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/admin_views/view.html.php b/admin/views/admin_views/view.html.php index 4149d83cc..9d6d89594 100644 --- a/admin/views/admin_views/view.html.php +++ b/admin/views/admin_views/view.html.php @@ -34,10 +34,14 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -190,156 +194,6 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy 'batch[access]', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') ); - } - - // Set Add Fadein Selection - $this->add_fadeinOptions = $this->getTheAdd_fadeinSelections(); - // We do some sanitation for Add Fadein filter - if (ComponentbuilderHelper::checkArray($this->add_fadeinOptions) && - isset($this->add_fadeinOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->add_fadeinOptions[0]->value)) - { - unset($this->add_fadeinOptions[0]); - } - // Only load Add Fadein filter if it has values - if (ComponentbuilderHelper::checkArray($this->add_fadeinOptions)) - { - // Add Fadein Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_FADEIN_LABEL').' -', - 'filter_add_fadein', - JHtml::_('select.options', $this->add_fadeinOptions, 'value', 'text', $this->state->get('filter.add_fadein')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Add Fadein Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_FADEIN_LABEL').' -', - 'batch[add_fadein]', - JHtml::_('select.options', $this->add_fadeinOptions, 'value', 'text') - ); - } - } - - // Set Type Selection - $this->typeOptions = $this->getTheTypeSelections(); - // We do some sanitation for Type filter - if (ComponentbuilderHelper::checkArray($this->typeOptions) && - isset($this->typeOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->typeOptions[0]->value)) - { - unset($this->typeOptions[0]); - } - // Only load Type filter if it has values - if (ComponentbuilderHelper::checkArray($this->typeOptions)) - { - // Type Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL').' -', - 'filter_type', - JHtml::_('select.options', $this->typeOptions, 'value', 'text', $this->state->get('filter.type')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Type Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL').' -', - 'batch[type]', - JHtml::_('select.options', $this->typeOptions, 'value', 'text') - ); - } - } - - // Set Add Custom Button Selection - $this->add_custom_buttonOptions = $this->getTheAdd_custom_buttonSelections(); - // We do some sanitation for Add Custom Button filter - if (ComponentbuilderHelper::checkArray($this->add_custom_buttonOptions) && - isset($this->add_custom_buttonOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->add_custom_buttonOptions[0]->value)) - { - unset($this->add_custom_buttonOptions[0]); - } - // Only load Add Custom Button filter if it has values - if (ComponentbuilderHelper::checkArray($this->add_custom_buttonOptions)) - { - // Add Custom Button Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -', - 'filter_add_custom_button', - JHtml::_('select.options', $this->add_custom_buttonOptions, 'value', 'text', $this->state->get('filter.add_custom_button')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Add Custom Button Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -', - 'batch[add_custom_button]', - JHtml::_('select.options', $this->add_custom_buttonOptions, 'value', 'text') - ); - } - } - - // Set Add Php Ajax Selection - $this->add_php_ajaxOptions = $this->getTheAdd_php_ajaxSelections(); - // We do some sanitation for Add Php Ajax filter - if (ComponentbuilderHelper::checkArray($this->add_php_ajaxOptions) && - isset($this->add_php_ajaxOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->add_php_ajaxOptions[0]->value)) - { - unset($this->add_php_ajaxOptions[0]); - } - // Only load Add Php Ajax filter if it has values - if (ComponentbuilderHelper::checkArray($this->add_php_ajaxOptions)) - { - // Add Php Ajax Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AJAX_LABEL').' -', - 'filter_add_php_ajax', - JHtml::_('select.options', $this->add_php_ajaxOptions, 'value', 'text', $this->state->get('filter.add_php_ajax')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Add Php Ajax Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AJAX_LABEL').' -', - 'batch[add_php_ajax]', - JHtml::_('select.options', $this->add_php_ajaxOptions, 'value', 'text') - ); - } - } - - // Set Add Custom Import Selection - $this->add_custom_importOptions = $this->getTheAdd_custom_importSelections(); - // We do some sanitation for Add Custom Import filter - if (ComponentbuilderHelper::checkArray($this->add_custom_importOptions) && - isset($this->add_custom_importOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->add_custom_importOptions[0]->value)) - { - unset($this->add_custom_importOptions[0]); - } - // Only load Add Custom Import filter if it has values - if (ComponentbuilderHelper::checkArray($this->add_custom_importOptions)) - { - // Add Custom Import Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_LABEL').' -', - 'filter_add_custom_import', - JHtml::_('select.options', $this->add_custom_importOptions, 'value', 'text', $this->state->get('filter.add_custom_import')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Add Custom Import Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_LABEL').' -', - 'batch[add_custom_import]', - JHtml::_('select.options', $this->add_custom_importOptions, 'value', 'text') - ); - } } } @@ -384,7 +238,7 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.system_name' => JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_SYSTEM_NAME_LABEL'), 'a.name_single' => JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_SINGLE_LABEL'), diff --git a/admin/views/admins_custom_tabs/tmpl/default.php b/admin/views/admins_custom_tabs/tmpl/default.php index cbe0eb57a..aa8f02124 100644 --- a/admin/views/admins_custom_tabs/tmpl/default.php +++ b/admin/views/admins_custom_tabs/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/admins_custom_tabs/tmpl/default_body.php b/admin/views/admins_custom_tabs/tmpl/default_body.php index 6ee3388e5..bd8af1337 100644 --- a/admin/views/admins_custom_tabs/tmpl/default_body.php +++ b/admin/views/admins_custom_tabs/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=admins_custom_tabs&task=admi canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?> canEdit&& $this->canState): ?>
'; @@ -13861,7 +13929,7 @@ class Interpretation extends Fields } // add the defaults - if (!isset($this->fieldsNames[$viewName_single]['id'])) + if (!isset($this->fieldsNames[$nameSingleCode]['id'])) { $data_type = (2 == $this->footableVersion) ? 'data-type="numeric"' @@ -13884,8 +13952,8 @@ class Interpretation extends Fields } /** - * @param $viewName_single - * @param $viewName_list + * @param $nameSingleCode + * @param $nameListCode * @param $functionName * @param $key * @param $_key @@ -13895,16 +13963,16 @@ class Interpretation extends Fields * * @return string */ - public function setListQueryLinked($viewName_single, $viewName_list, + public function setListQueryLinked($nameSingleCode, $nameListCode, $functionName, $key, $_key, $parentKey, $parent_key, $globalKey ) { // check if this view has category added - if (isset($this->categoryBuilder[$viewName_list]) + if (isset($this->categoryBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->categoryBuilder[$viewName_list] + $this->categoryBuilder[$nameListCode] )) { - $categoryCodeName = $this->categoryBuilder[$viewName_list]['code']; + $categoryCodeName = $this->categoryBuilder[$nameListCode]['code']; $addCategory = true; } else @@ -13940,10 +14008,11 @@ class Interpretation extends Fields } $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine( __LINE__ - ) . " From the " . $this->componentCodeName . "_" . $viewName_single + ) . " From the " . $this->componentCodeName . "_" + . $nameSingleCode . " table"; $query .= PHP_EOL . $this->_t(2) . "\$query->from(\$db->quoteName('#__" - . $this->componentCodeName . "_" . $viewName_single . "', 'a'));"; + . $this->componentCodeName . "_" . $nameSingleCode . "', 'a'));"; // add the category if ($addCategory) { @@ -13954,10 +14023,10 @@ class Interpretation extends Fields } // add custom filtering php $query .= $this->getCustomScriptBuilder( - 'php_getlistquery', $viewName_single, PHP_EOL . PHP_EOL + 'php_getlistquery', $nameSingleCode, PHP_EOL . PHP_EOL ); // add the custom fields query - $query .= $this->setCustomQuery($viewName_list, $viewName_single); + $query .= $this->setCustomQuery($nameListCode, $nameSingleCode); if (ComponentbuilderHelper::checkString($globalKey) && $key && strpos( $key, '-R>' @@ -14047,9 +14116,9 @@ class Interpretation extends Fields $query .= PHP_EOL . $this->_t(2) . "}"; } } - if (isset($this->accessBuilder[$viewName_single]) + if (isset($this->accessBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkString( - $this->accessBuilder[$viewName_single] + $this->accessBuilder[$nameSingleCode] )) { $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine( @@ -14080,17 +14149,17 @@ class Interpretation extends Fields $query .= PHP_EOL . $this->_t(2) . "}"; } // add dynamic ordering (Linked view) - if (isset($this->viewsDefaultOrdering[$viewName_list]) - && $this->viewsDefaultOrdering[$viewName_list]['add_linked_ordering'] + if (isset($this->viewsDefaultOrdering[$nameListCode]) + && $this->viewsDefaultOrdering[$nameListCode]['add_linked_ordering'] == 1) { foreach ( - $this->viewsDefaultOrdering[$viewName_list]['linked_ordering_fields'] + $this->viewsDefaultOrdering[$nameListCode]['linked_ordering_fields'] as $order_field ) { if (($order_field_name = $this->getFieldDatabaseName( - $viewName_list, $order_field['field'] + $nameListCode, $order_field['field'] // We Removed This 'listJoinBuilder' as targetArea // we will keep an eye on this )) !== false) @@ -14128,13 +14197,13 @@ class Interpretation extends Fields $query .= PHP_EOL . $this->_t(3) . "\$items = \$db->loadObjectList();"; // add the fixing strings method $query .= $this->setGetItemsMethodStringFix( - $viewName_single, $viewName_list, + $nameSingleCode, $nameListCode, $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh], $this->_t(1) ); // add translations $query .= $this->setSelectionTranslationFix( - $viewName_list, + $nameListCode, $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh], $this->_t(1) ); @@ -14364,7 +14433,7 @@ class Interpretation extends Fields } // add custom php to getitems method after all $query .= $this->getCustomScriptBuilder( - 'php_getitems_after_all', $viewName_single, + 'php_getitems_after_all', $nameSingleCode, PHP_EOL . PHP_EOL . $this->_t(1) ); @@ -14374,7 +14443,7 @@ class Interpretation extends Fields $query .= PHP_EOL . $this->_t(1) . "}"; // SELECTIONTRANSLATIONFIXFUNC<<>> $query .= $this->setSelectionTranslationFixFunc( - $viewName_list, + $nameListCode, $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] ); @@ -14388,21 +14457,21 @@ class Interpretation extends Fields } /** - * @param $viewName_list + * @param $nameListCode * * @return array|string */ - public function setCustomAdminDynamicButton($viewName_list) + public function setCustomAdminDynamicButton($nameListCode) { $buttons = ''; - if (isset($this->customAdminDynamicButtons[$viewName_list]) + if (isset($this->customAdminDynamicButtons[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->customAdminDynamicButtons[$viewName_list] + $this->customAdminDynamicButtons[$nameListCode] )) { $buttons = array(); foreach ( - $this->customAdminDynamicButtons[$viewName_list] as + $this->customAdminDynamicButtons[$nameListCode] as $custom_button ) { @@ -14420,7 +14489,7 @@ class Interpretation extends Fields $buttons[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " add " . $custom_button['name'] . " button."; $buttons[] = $this->_t(3) . "JToolBarHelper::custom('" - . $viewName_list . ".redirectTo" + . $nameListCode . ".redirectTo" . ComponentbuilderHelper::safeString( $custom_button['link'], 'F' ) . "', '" . $custom_button['icon'] . "', '', '" . $keyLang @@ -14437,21 +14506,21 @@ class Interpretation extends Fields } /** - * @param $viewName_list + * @param $nameListCode * * @return array|string */ - public function setCustomAdminDynamicButtonController($viewName_list) + public function setCustomAdminDynamicButtonController($nameListCode) { $method = ''; - if (isset($this->customAdminDynamicButtons[$viewName_list]) + if (isset($this->customAdminDynamicButtons[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->customAdminDynamicButtons[$viewName_list] + $this->customAdminDynamicButtons[$nameListCode] )) { $method = array(); foreach ( - $this->customAdminDynamicButtons[$viewName_list] as + $this->customAdminDynamicButtons[$nameListCode] as $custom_button ) { @@ -14499,7 +14568,7 @@ class Interpretation extends Fields . "_FAILED');"; $method[] = $this->_t(2) . "\$this->setRedirect(JRoute::_('index.php?option=com_" - . $this->componentCodeName . "&view=" . $viewName_list + . $this->componentCodeName . "&view=" . $nameListCode . "', false), \$message, 'error');"; $method[] = $this->_t(2) . "return;"; $method[] = $this->_t(1) . "}"; @@ -14521,13 +14590,13 @@ class Interpretation extends Fields /** * A function that builds get Items Method for model * - * @param string $viewName_single The single view name - * @param string $viewName_list The list view name - * @param array $config The config details to adapt the method being build + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param array $config The config details to adapt the method being build * * @return string */ - public function setGetItemsModelMethod($viewName_single, $viewName_list, + public function setGetItemsModelMethod($nameSingleCode, $nameListCode, $config = array('functionName' => 'getExportData', 'docDesc' => 'Method to get list export data.', @@ -14538,8 +14607,8 @@ class Interpretation extends Fields // check if this is the export method $isExport = ('export' === $config['type']); // check if this view has export feature, and or if this is not an export method - if ((isset($this->eximportView[$viewName_list]) - && $this->eximportView[$viewName_list]) + if ((isset($this->eximportView[$nameListCode]) + && $this->eximportView[$nameListCode]) || !$isExport) { $query = PHP_EOL . PHP_EOL . $this->_t(1) . "/**"; @@ -14588,10 +14657,10 @@ class Interpretation extends Fields $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine( __LINE__ ) . " From the " . $this->componentCodeName . "_" - . $viewName_single . " table"; + . $nameSingleCode . " table"; $query .= PHP_EOL . $this->_t(3) . "\$query->from(\$db->quoteName('#__" - . $this->componentCodeName . "_" . $viewName_single + . $this->componentCodeName . "_" . $nameSingleCode . "', 'a'));"; $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " The bulk export path"; @@ -14628,7 +14697,7 @@ class Interpretation extends Fields . "}"; // add custom filtering php $query .= $this->getCustomScriptBuilder( - 'php_getlistquery', $viewName_single, + 'php_getlistquery', $nameSingleCode, PHP_EOL . PHP_EOL . $this->_t(1) ); // first check if we export of text only is avalable @@ -14644,7 +14713,7 @@ class Interpretation extends Fields . "')->get('export_text_only', 0);"; // first check if we have custom queries $custom_query = $this->setCustomQuery( - $viewName_list, $viewName_single, $this->_t(2), true + $nameListCode, $nameSingleCode, $this->_t(2), true ); } // if values were returned add the area @@ -14663,9 +14732,9 @@ class Interpretation extends Fields $query .= PHP_EOL . $this->_t(3) . "}"; } // add access levels if the view has access set - if (isset($this->accessBuilder[$viewName_single]) + if (isset($this->accessBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkString( - $this->accessBuilder[$viewName_single] + $this->accessBuilder[$nameSingleCode] )) { $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine( @@ -14682,17 +14751,17 @@ class Interpretation extends Fields $query .= PHP_EOL . $this->_t(3) . "}"; } // add dynamic ordering (Exported data) - if (isset($this->viewsDefaultOrdering[$viewName_list]) - && $this->viewsDefaultOrdering[$viewName_list]['add_admin_ordering'] + if (isset($this->viewsDefaultOrdering[$nameListCode]) + && $this->viewsDefaultOrdering[$nameListCode]['add_admin_ordering'] == 1) { foreach ( - $this->viewsDefaultOrdering[$viewName_list]['admin_ordering_fields'] + $this->viewsDefaultOrdering[$nameListCode]['admin_ordering_fields'] as $order_field ) { if (($order_field_name = $this->getFieldDatabaseName( - $viewName_list, $order_field['field'] + $nameListCode, $order_field['field'] )) !== false) { $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" @@ -14726,7 +14795,7 @@ class Interpretation extends Fields . "\$items = \$db->loadObjectList();"; // set the string fixing code $query .= $this->setGetItemsMethodStringFix( - $viewName_single, $viewName_list, + $nameSingleCode, $nameListCode, $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh], $this->_t(2), $isExport, true ); @@ -14734,7 +14803,7 @@ class Interpretation extends Fields if ($this->exportTextOnly) { $query_translations = $this->setSelectionTranslationFix( - $viewName_list, + $nameListCode, $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh], $this->_t(3) ); @@ -14753,7 +14822,7 @@ class Interpretation extends Fields } // add custom php to getItems method after all $query .= $this->getCustomScriptBuilder( - 'php_getitems_after_all', $viewName_single, + 'php_getitems_after_all', $nameSingleCode, PHP_EOL . PHP_EOL . $this->_t(2) ); // in privacy export we must return array of arrays @@ -14777,7 +14846,7 @@ class Interpretation extends Fields // add getExImPortHeaders $query .= $this->getCustomScriptBuilder( - 'php_import_headers', 'import_' . $viewName_list, + 'php_import_headers', 'import_' . $nameListCode, PHP_EOL . PHP_EOL, null, true, // set a default script for those with no custom script PHP_EOL . PHP_EOL . $this->setPlaceholders( @@ -14790,11 +14859,12 @@ class Interpretation extends Fields return $query; } - public function setControllerEximportMethod($viewName_single, $viewName_list + public function setControllerEximportMethod($nameSingleCode, + $nameListCode ) { $method = ''; - if (isset($this->eximportView[$viewName_list]) - && $this->eximportView[$viewName_list]) + if (isset($this->eximportView[$nameListCode]) + && $this->eximportView[$nameListCode]) { $method = array(); @@ -14810,7 +14880,7 @@ class Interpretation extends Fields . " check if export is allowed for this user."; $method[] = $this->_t(2) . "\$user = JFactory::getUser();"; $method[] = $this->_t(2) . "if (\$user->authorise('" - . $viewName_single . ".export', 'com_" + . $nameSingleCode . ".export', 'com_" . $this->componentCodeName . "') && \$user->authorise('core.export', 'com_" . $this->componentCodeName . "'))"; @@ -14827,7 +14897,7 @@ class Interpretation extends Fields $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Get the model"; $method[] = $this->_t(3) . "\$model = \$this->getModel('" - . ComponentbuilderHelper::safeString($viewName_list, 'F') + . ComponentbuilderHelper::safeString($nameListCode, 'F') . "');"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " get the data to export"; @@ -14842,11 +14912,11 @@ class Interpretation extends Fields $method[] = $this->_t(4) . "\$date = JFactory::getDate();"; $method[] = $this->_t(4) . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::xls(\$data,'" - . ComponentbuilderHelper::safeString($viewName_list, 'F') + . ComponentbuilderHelper::safeString($nameListCode, 'F') . "_'.\$date->format('jS_F_Y'),'" - . ComponentbuilderHelper::safeString($viewName_list, 'Ww') + . ComponentbuilderHelper::safeString($nameListCode, 'Ww') . " exported ('.\$date->format('jS F, Y').')','" - . ComponentbuilderHelper::safeString($viewName_list, 'w') + . ComponentbuilderHelper::safeString($nameListCode, 'w') . "');"; $method[] = $this->_t(3) . "}"; $method[] = $this->_t(2) . "}"; @@ -14856,7 +14926,7 @@ class Interpretation extends Fields . $this->langPrefix . "_EXPORT_FAILED');"; $method[] = $this->_t(2) . "\$this->setRedirect(JRoute::_('index.php?option=com_" - . $this->componentCodeName . "&view=" . $viewName_list + . $this->componentCodeName . "&view=" . $nameListCode . "', false), \$message, 'error');"; $method[] = $this->_t(2) . "return;"; $method[] = $this->_t(1) . "}"; @@ -14873,7 +14943,7 @@ class Interpretation extends Fields . " check if import is allowed for this user."; $method[] = $this->_t(2) . "\$user = JFactory::getUser();"; $method[] = $this->_t(2) . "if (\$user->authorise('" - . $viewName_single . ".import', 'com_" + . $nameSingleCode . ".import', 'com_" . $this->componentCodeName . "') && \$user->authorise('core.import', 'com_" . $this->componentCodeName . "'))"; @@ -14881,7 +14951,7 @@ class Interpretation extends Fields $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Get the import model"; $method[] = $this->_t(3) . "\$model = \$this->getModel('" - . ComponentbuilderHelper::safeString($viewName_list, 'F') + . ComponentbuilderHelper::safeString($nameListCode, 'F') . "');"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " get the headers to import"; @@ -14895,33 +14965,33 @@ class Interpretation extends Fields . " Load headers to session."; $method[] = $this->_t(4) . "\$session = JFactory::getSession();"; $method[] = $this->_t(4) . "\$headers = json_encode(\$headers);"; - $method[] = $this->_t(4) . "\$session->set('" . $viewName_single + $method[] = $this->_t(4) . "\$session->set('" . $nameSingleCode . "_VDM_IMPORTHEADERS', \$headers);"; $method[] = $this->_t(4) . "\$session->set('backto_VDM_IMPORT', '" - . $viewName_list . "');"; + . $nameListCode . "');"; $method[] = $this->_t(4) . "\$session->set('dataType_VDM_IMPORTINTO', '" - . $viewName_single . "');"; + . $nameSingleCode . "');"; $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Redirect to import view."; // add to lang array $selectImportFileNote = $this->langPrefix . "_IMPORT_SELECT_FILE_FOR_" - . ComponentbuilderHelper::safeString($viewName_list, 'U'); + . ComponentbuilderHelper::safeString($nameListCode, 'U'); $this->setLangContent( $this->lang, $selectImportFileNote, - 'Select the file to import data to ' . $viewName_list . '.' + 'Select the file to import data to ' . $nameListCode . '.' ); $method[] = $this->_t(4) . "\$message = JText:" . ":_('" . $selectImportFileNote . "');"; // if this view has custom script it must have as custom import (model, veiw, controller) - if (isset($this->importCustomScripts[$viewName_list]) - && $this->importCustomScripts[$viewName_list]) + if (isset($this->importCustomScripts[$nameListCode]) + && $this->importCustomScripts[$nameListCode]) { $method[] = $this->_t(4) . "\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->componentCodeName . "&view=import_" - . $viewName_list . "', false), \$message);"; + . $nameListCode . "', false), \$message);"; } else { @@ -14939,7 +15009,7 @@ class Interpretation extends Fields . $this->langPrefix . "_IMPORT_FAILED');"; $method[] = $this->_t(2) . "\$this->setRedirect(JRoute::_('index.php?option=com_" - . $this->componentCodeName . "&view=" . $viewName_list + . $this->componentCodeName . "&view=" . $nameListCode . "', false), \$message, 'error');"; $method[] = $this->_t(2) . "return;"; $method[] = $this->_t(1) . "}"; @@ -14950,11 +15020,11 @@ class Interpretation extends Fields return $method; } - public function setExportButton($viewName_single, $viewName_list) + public function setExportButton($nameSingleCode, $nameListCode) { $button = ''; - if (isset($this->eximportView[$viewName_list]) - && $this->eximportView[$viewName_list]) + if (isset($this->eximportView[$nameListCode]) + && $this->eximportView[$nameListCode]) { // main lang prefix $langExport = $this->langPrefix . '_' @@ -14964,10 +15034,10 @@ class Interpretation extends Fields $button = array(); $button[] = PHP_EOL . PHP_EOL . $this->_t(3) . "if (\$this->canDo->get('core.export') && \$this->canDo->get('" - . $viewName_single . ".export'))"; + . $nameSingleCode . ".export'))"; $button[] = $this->_t(3) . "{"; $button[] = $this->_t(4) . "JToolBarHelper::custom('" - . $viewName_list . ".exportData', 'download', '', '" + . $nameListCode . ".exportData', 'download', '', '" . $langExport . "', true);"; $button[] = $this->_t(3) . "}"; @@ -14977,11 +15047,11 @@ class Interpretation extends Fields return $button; } - public function setImportButton($viewName_single, $viewName_list) + public function setImportButton($nameSingleCode, $nameListCode) { $button = ''; - if (isset($this->eximportView[$viewName_list]) - && $this->eximportView[$viewName_list]) + if (isset($this->eximportView[$nameListCode]) + && $this->eximportView[$nameListCode]) { // main lang prefix $langImport = $this->langPrefix . '_' @@ -14991,10 +15061,11 @@ class Interpretation extends Fields $button = array(); $button[] = PHP_EOL . PHP_EOL . $this->_t(2) . "if (\$this->canDo->get('core.import') && \$this->canDo->get('" - . $viewName_single . ".import'))"; + . $nameSingleCode . ".import'))"; $button[] = $this->_t(2) . "{"; $button[] = $this->_t(3) . "JToolBarHelper::custom('" - . $viewName_list . ".importData', 'upload', '', '" . $langImport + . $nameListCode . ".importData', 'upload', '', '" + . $langImport . "', false);"; $button[] = $this->_t(2) . "}"; @@ -15004,95 +15075,95 @@ class Interpretation extends Fields return $button; } - public function setImportCustomScripts($viewName_list) + public function setImportCustomScripts($nameListCode) { // setup Ajax files - $target = array('admin' => 'import_' . $viewName_list); + $target = array('admin' => 'import_' . $nameListCode); $this->buildDynamique($target, 'customimport'); // load the custom script to the files // IMPORT_EXT_METHOD <<>> - $this->fileContentDynamic['import_' . $viewName_list][$this->hhh + $this->fileContentDynamic['import_' . $nameListCode][$this->hhh . 'IMPORT_EXT_METHOD' . $this->hhh] = $this->getCustomScriptBuilder( - 'php_import_ext', 'import_' . $viewName_list, PHP_EOL, null, + 'php_import_ext', 'import_' . $nameListCode, PHP_EOL, null, true ); // IMPORT_DISPLAY_METHOD_CUSTOM <<>> - $this->fileContentDynamic['import_' . $viewName_list][$this->hhh + $this->fileContentDynamic['import_' . $nameListCode][$this->hhh . 'IMPORT_DISPLAY_METHOD_CUSTOM' . $this->hhh] = $this->getCustomScriptBuilder( - 'php_import_display', 'import_' . $viewName_list, PHP_EOL, + 'php_import_display', 'import_' . $nameListCode, PHP_EOL, null, true ); // IMPORT_SETDATA_METHOD <<>> - $this->fileContentDynamic['import_' . $viewName_list][$this->hhh + $this->fileContentDynamic['import_' . $nameListCode][$this->hhh . 'IMPORT_SETDATA_METHOD' . $this->hhh] = $this->getCustomScriptBuilder( - 'php_import_setdata', 'import_' . $viewName_list, PHP_EOL, + 'php_import_setdata', 'import_' . $nameListCode, PHP_EOL, null, true ); // IMPORT_METHOD_CUSTOM <<>> - $this->fileContentDynamic['import_' . $viewName_list][$this->hhh + $this->fileContentDynamic['import_' . $nameListCode][$this->hhh . 'IMPORT_METHOD_CUSTOM' . $this->hhh] = $this->getCustomScriptBuilder( - 'php_import', 'import_' . $viewName_list, PHP_EOL, null, + 'php_import', 'import_' . $nameListCode, PHP_EOL, null, true ); // IMPORT_SAVE_METHOD <<>> - $this->fileContentDynamic['import_' . $viewName_list][$this->hhh + $this->fileContentDynamic['import_' . $nameListCode][$this->hhh . 'IMPORT_SAVE_METHOD' . $this->hhh] = $this->getCustomScriptBuilder( - 'php_import_save', 'import_' . $viewName_list, PHP_EOL, + 'php_import_save', 'import_' . $nameListCode, PHP_EOL, null, true ); // IMPORT_DEFAULT_VIEW_CUSTOM <<>> - $this->fileContentDynamic['import_' . $viewName_list][$this->hhh + $this->fileContentDynamic['import_' . $nameListCode][$this->hhh . 'IMPORT_DEFAULT_VIEW_CUSTOM' . $this->hhh] = $this->getCustomScriptBuilder( - 'html_import_view', 'import_' . $viewName_list, PHP_EOL, + 'html_import_view', 'import_' . $nameListCode, PHP_EOL, null, true ); // insure we have the view placeholders setup - $this->fileContentDynamic['import_' . $viewName_list][$this->hhh + $this->fileContentDynamic['import_' . $nameListCode][$this->hhh . 'VIEW' . $this->hhh] = 'IMPORT_' . $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh]; - $this->fileContentDynamic['import_' . $viewName_list][$this->hhh + $this->fileContentDynamic['import_' . $nameListCode][$this->hhh . 'View' . $this->hhh] = 'Import_' . $this->placeholders[$this->hhh . 'views' . $this->hhh]; - $this->fileContentDynamic['import_' . $viewName_list][$this->hhh + $this->fileContentDynamic['import_' . $nameListCode][$this->hhh . 'view' . $this->hhh] = 'import_' . $this->placeholders[$this->hhh . 'views' . $this->hhh]; - $this->fileContentDynamic['import_' . $viewName_list][$this->hhh + $this->fileContentDynamic['import_' . $nameListCode][$this->hhh . 'VIEWS' . $this->hhh] = 'IMPORT_' . $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh]; - $this->fileContentDynamic['import_' . $viewName_list][$this->hhh + $this->fileContentDynamic['import_' . $nameListCode][$this->hhh . 'Views' . $this->hhh] = 'Import_' . $this->placeholders[$this->hhh . 'views' . $this->hhh]; - $this->fileContentDynamic['import_' . $viewName_list][$this->hhh + $this->fileContentDynamic['import_' . $nameListCode][$this->hhh . 'views' . $this->hhh] = 'import_' . $this->placeholders[$this->hhh . 'views' . $this->hhh]; } - public function setListQuery($viewName_single, $viewName_list) + public function setListQuery($nameSingleCode, $nameListCode) { // check if this view has category added - if (isset($this->categoryBuilder[$viewName_list]) + if (isset($this->categoryBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->categoryBuilder[$viewName_list] + $this->categoryBuilder[$nameListCode] )) { - $categoryCodeName = $this->categoryBuilder[$viewName_list]['code']; + $categoryCodeName = $this->categoryBuilder[$nameListCode]['code']; $addCategory = true; } else @@ -15120,7 +15191,7 @@ class Interpretation extends Fields __LINE__ ) . " From the " . $this->componentCodeName . "_item table"; $query .= PHP_EOL . $this->_t(2) . "\$query->from(\$db->quoteName('#__" - . $this->componentCodeName . "_" . $viewName_single . "', 'a'));"; + . $this->componentCodeName . "_" . $nameSingleCode . "', 'a'));"; // add the category if ($addCategory) { @@ -15131,10 +15202,10 @@ class Interpretation extends Fields } // add custom filtering php $query .= $this->getCustomScriptBuilder( - 'php_getlistquery', $viewName_single, PHP_EOL . PHP_EOL + 'php_getlistquery', $nameSingleCode, PHP_EOL . PHP_EOL ); // add the custom fields query - $query .= $this->setCustomQuery($viewName_list, $viewName_single); + $query .= $this->setCustomQuery($nameListCode, $nameSingleCode); $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine( __LINE__ ) . " Filter by published state"; @@ -15150,9 +15221,9 @@ class Interpretation extends Fields $query .= PHP_EOL . $this->_t(3) . "\$query->where('(a.published = 0 OR a.published = 1)');"; $query .= PHP_EOL . $this->_t(2) . "}"; - if (isset($this->accessBuilder[$viewName_single]) + if (isset($this->accessBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkString( - $this->accessBuilder[$viewName_single] + $this->accessBuilder[$nameSingleCode] )) { $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine( @@ -15183,9 +15254,9 @@ class Interpretation extends Fields $query .= PHP_EOL . $this->_t(2) . "}"; } // set the search query - $query .= $this->setSearchQuery($viewName_list); + $query .= $this->setSearchQuery($nameListCode); // set other filters - $query .= $this->setFilterQuery($viewName_list); + $query .= $this->setFilterQuery($nameListCode); // add the category if ($addCategory) { @@ -15225,19 +15296,19 @@ class Interpretation extends Fields // setup values for the view ordering // add dynamic ordering (Admin view) - if (isset($this->viewsDefaultOrdering[$viewName_list]) - && $this->viewsDefaultOrdering[$viewName_list]['add_admin_ordering'] + if (isset($this->viewsDefaultOrdering[$nameListCode]) + && $this->viewsDefaultOrdering[$nameListCode]['add_admin_ordering'] == 1) { // the first is from the state $order_first = true; foreach ( - $this->viewsDefaultOrdering[$viewName_list]['admin_ordering_fields'] + $this->viewsDefaultOrdering[$nameListCode]['admin_ordering_fields'] as $order_field ) { if (($order_field_name = $this->getFieldDatabaseName( - $viewName_list, $order_field['field'] + $nameListCode, $order_field['field'] )) !== false) { if ($order_first) @@ -15302,10 +15373,10 @@ class Interpretation extends Fields * @return string * */ - protected function getFieldDatabaseName($viewName_list, int $fieldId, + protected function getFieldDatabaseName($nameListCode, int $fieldId, $targetArea = 'listBuilder' ) { - if (isset($this->{$targetArea}[$viewName_list])) + if (isset($this->{$targetArea}[$nameListCode])) { if ($fieldId < 0) { @@ -15319,7 +15390,7 @@ class Interpretation extends Fields return 'a.published'; } } - foreach ($this->{$targetArea}[$viewName_list] as $field) + foreach ($this->{$targetArea}[$nameListCode] as $field) { if ($field['id'] == $fieldId) { @@ -15347,16 +15418,16 @@ class Interpretation extends Fields return false; } - public function setSearchQuery($viewName_list) + public function setSearchQuery($nameListCode) { - if (isset($this->searchBuilder[$viewName_list]) + if (isset($this->searchBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->searchBuilder[$viewName_list] + $this->searchBuilder[$nameListCode] )) { // setup the searh options $search = "'("; - foreach ($this->searchBuilder[$viewName_list] as $nr => $array) + foreach ($this->searchBuilder[$nameListCode] as $nr => $array) { // array( 'type' => $typeName, 'code' => $name, 'custom' => $custom, 'list' => $field['list']); if ($nr == 0) @@ -15410,25 +15481,26 @@ class Interpretation extends Fields return ''; } - public function setCustomQuery($viewName_list, $viewName_single, $tab = '', + public function setCustomQuery($nameListCode, $nameSingleCode, + $tab = '', $just_text = false ) { - if (isset($this->customBuilder[$viewName_list]) + if (isset($this->customBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->customBuilder[$viewName_list] + $this->customBuilder[$nameListCode] )) { $query = ""; - foreach ($this->customBuilder[$viewName_list] as $filter) + foreach ($this->customBuilder[$nameListCode] as $filter) { // only load this if table is set - if ((isset($this->customBuilderList[$viewName_list]) + if ((isset($this->customBuilderList[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->customBuilderList[$viewName_list] + $this->customBuilderList[$nameListCode] ) && in_array( $filter['code'], - $this->customBuilderList[$viewName_list] + $this->customBuilderList[$nameListCode] ) && isset($filter['custom']['table']) && ComponentbuilderHelper::checkString( @@ -15477,7 +15549,7 @@ class Interpretation extends Fields } // build the field type file $this->setCustomFieldTypeFile( - $filter, $viewName_list, $viewName_single + $filter, $nameListCode, $nameSingleCode ); } @@ -15488,16 +15560,16 @@ class Interpretation extends Fields /** * build model filter per/field in the list view * - * @param string $view_name_list The list view name + * @param string $nameListCode The list view name * * @return string The php to place in model to filter * */ - public function setFilterQuery($view_name_list) + public function setFilterQuery($nameListCode) { - if (isset($this->filterBuilder[$view_name_list]) + if (isset($this->filterBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->filterBuilder[$view_name_list] + $this->filterBuilder[$nameListCode] )) { // component helper name @@ -15505,7 +15577,7 @@ class Interpretation extends Fields . $this->hhh] . 'Helper'; // start building the filter query $filterQuery = ""; - foreach ($this->filterBuilder[$view_name_list] as $filter) + foreach ($this->filterBuilder[$nameListCode] as $filter) { // only add for none category fields if ($filter['type'] != 'category') @@ -15515,8 +15587,8 @@ class Interpretation extends Fields . ucwords($filter['code']) . "."; // we only add multi filter option if new filter type // and we have multi filter set for this field - if (isset($this->adminFilterType[$view_name_list]) - && $this->adminFilterType[$view_name_list] == 2 + if (isset($this->adminFilterType[$nameListCode]) + && $this->adminFilterType[$nameListCode] == 2 && isset($filter['multi']) && $filter['multi'] == 2) { @@ -15542,8 +15614,8 @@ class Interpretation extends Fields /** * build single filter query * - * @param array $filter The field/filter - * @param string $a The db table target name (a) + * @param array $filter The field/filter + * @param string $a The db table target name (a) * * @return string The php to place in model to filter this field * @@ -15567,9 +15639,9 @@ class Interpretation extends Fields /** * build multiple filter query * - * @param array $filter The field/filter - * @param string $Helper The helper name of the component being build - * @param string $a The db table target name (a) + * @param array $filter The field/filter + * @param string $Helper The helper name of the component being build + * @param string $a The db table target name (a) * * @return string The php to place in model to filter this field * @@ -15648,9 +15720,7 @@ class Interpretation extends Fields public function buildTheViewScript($viewArray) { // set the view name - $viewName = ComponentbuilderHelper::safeString( - $viewArray['settings']->name_single - ); + $nameSingleCode = $viewArray['settings']->name_single_code; // add conditions to this view if (isset($viewArray['settings']->conditions) && ComponentbuilderHelper::checkArray( @@ -15686,7 +15756,7 @@ class Interpretation extends Fields // chain to other items of the same target $relations = $this->getTargetRelationScript( $viewArray['settings']->conditions, $condition, - $viewName + $nameSingleCode ); if (ComponentbuilderHelper::checkArray($relations)) { @@ -15725,7 +15795,7 @@ class Interpretation extends Fields = $this->setTargetControlsScript( $toggleSwitch[$matchName], $condition['target_field'], $targetBehavior, - $targetDefault, $uniqueVar, $viewName + $targetDefault, $uniqueVar, $nameSingleCode ); foreach ($relations as $relation) @@ -15800,7 +15870,7 @@ class Interpretation extends Fields = $this->setTargetControlsScript( $toggleSwitch[$matchName], $condition['target_field'], $targetBehavior, - $targetDefault, $uniqueVar, $viewName + $targetDefault, $uniqueVar, $nameSingleCode ); } } @@ -16061,9 +16131,9 @@ class Interpretation extends Fields . PHP_EOL . $map; } // add the needed validation to file - if (isset($this->validationFixBuilder[$viewName]) + if (isset($this->validationFixBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkArray( - $this->validationFixBuilder[$viewName] + $this->validationFixBuilder[$nameSingleCode] )) { $validation .= PHP_EOL . "// update fields required"; @@ -16144,16 +16214,16 @@ class Interpretation extends Fields $fileScript = ''; } $fileScript .= $this->getCustomScriptBuilder( - 'view_file', $viewName, PHP_EOL . PHP_EOL, null, true, '' + 'view_file', $nameSingleCode, PHP_EOL . PHP_EOL, null, true, '' ); // add custom script to footer - if (isset($this->customScriptBuilder['view_footer'][$viewName]) + if (isset($this->customScriptBuilder['view_footer'][$nameSingleCode]) && ComponentbuilderHelper::checkString( - $this->customScriptBuilder['view_footer'][$viewName] + $this->customScriptBuilder['view_footer'][$nameSingleCode] )) { $customFooterScript = PHP_EOL . PHP_EOL . $this->setPlaceholders( - $this->customScriptBuilder['view_footer'][$viewName], + $this->customScriptBuilder['view_footer'][$nameSingleCode], $this->placeholders ); if (strpos($customFooterScript, 'name_list - ); + $nameListCode = $viewArray['settings']->name_list_code; // add custom script to list view JS file if (($list_fileScript = $this->getCustomScriptBuilder( - 'views_file', $viewName, PHP_EOL . PHP_EOL, null, true, false + 'views_file', $nameSingleCode, PHP_EOL . PHP_EOL, null, true, + false )) !== false && ComponentbuilderHelper::checkString($list_fileScript)) { @@ -16181,7 +16250,7 @@ class Interpretation extends Fields $_created = $this->getCreatedDate($viewArray); $_modified = $this->getLastModifiedDate($viewArray); // add file to view - $_target = array($this->target => $viewName_list); + $_target = array($this->target => $nameListCode); $_config = array($this->hhh . 'CREATIONDATE' . $this->hhh => $_created, $this->hhh . 'BUILDDATE' @@ -16191,9 +16260,9 @@ class Interpretation extends Fields $this->buildDynamique($_target, 'javascript_file', false, $_config); // set path $_path = '/administrator/components/com_' . $this->componentCodeName - . '/assets/js/' . $viewName_list . '.js'; + . '/assets/js/' . $nameListCode . '.js'; // load the file to the list view - $this->fileContentDynamic[$viewName_list][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'ADMIN_ADD_JAVASCRIPT_FILE' . $this->hhh] = PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine( __LINE__ @@ -16203,7 +16272,7 @@ class Interpretation extends Fields else { $list_fileScript = ''; - $this->fileContentDynamic[$viewName_list][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'ADMIN_ADD_JAVASCRIPT_FILE' . $this->hhh] = ''; } @@ -16241,7 +16310,7 @@ class Interpretation extends Fields )) { // load the script - $this->viewScriptBuilder[$viewName_list]['list_fileScript'] + $this->viewScriptBuilder[$nameListCode]['list_fileScript'] = $list_fileScript; } // make sure there is script to add @@ -16257,7 +16326,8 @@ class Interpretation extends Fields . PHP_EOL . $fileScript; } // load the script - $this->viewScriptBuilder[$viewName]['fileScript'] = $fileScript; + $this->viewScriptBuilder[$nameSingleCode]['fileScript'] + = $fileScript; } // make sure to add custom footer script if php was found in it, since we canot minfy it with php if (isset($customFooterScript) @@ -16278,10 +16348,11 @@ class Interpretation extends Fields )) { // add the needed script tags - $footerScript = PHP_EOL + $footerScript = PHP_EOL . PHP_EOL . '"; - $this->viewScriptBuilder[$viewName]['footerScript'] = $footerScript; + $this->viewScriptBuilder[$nameSingleCode]['footerScript'] + = $footerScript; } } @@ -16414,7 +16485,7 @@ class Interpretation extends Fields } public function setTargetControlsScript($toggleSwitch, $targets, - $targetBehavior, $targetDefault, $uniqueVar, $viewName + $targetBehavior, $targetDefault, $uniqueVar, $nameSingleCode ) { $bucket = array(); if (ComponentbuilderHelper::checkArray($targets) @@ -16587,7 +16658,7 @@ class Interpretation extends Fields $bucket[$target['name']]['show'] = $show; } // make sure that the axaj and other needed things for this view is loaded - $this->validationFixBuilder[$viewName][] + $this->validationFixBuilder[$nameSingleCode][] = $target['name']; } else @@ -17340,20 +17411,29 @@ class Interpretation extends Fields return $methods; } - public function setFilterFunctions($viewName_single, $viewName_list) + /** + * build filter functions + * + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * + * @return string The php to place in view.html.php + * + */ + public function setFilterFunctions($nameSingleCode, $nameListCode) { // the old filter type uses these functions - if (isset($this->adminFilterType[$viewName_list]) - && $this->adminFilterType[$viewName_list] == 1 - && isset($this->filterBuilder[$viewName_list]) + if (isset($this->adminFilterType[$nameListCode]) + && $this->adminFilterType[$nameListCode] == 1 + && isset($this->filterBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->filterBuilder[$viewName_list] + $this->filterBuilder[$nameListCode] )) { $function = array(); // set component name $component = $this->componentCodeName; - foreach ($this->filterBuilder[$viewName_list] as $filter) + foreach ($this->filterBuilder[$nameListCode] as $filter) { if ($filter['type'] != 'category' && ComponentbuilderHelper::checkArray($filter['custom']) @@ -17463,13 +17543,13 @@ class Interpretation extends Fields && !ComponentbuilderHelper::checkArray($filter['custom'])) { $translation = false; - if (isset($this->selectionTranslationFixBuilder[$viewName_list]) + if (isset($this->selectionTranslationFixBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->selectionTranslationFixBuilder[$viewName_list] + $this->selectionTranslationFixBuilder[$nameListCode] ) && array_key_exists( $filter['code'], - $this->selectionTranslationFixBuilder[$viewName_list] + $this->selectionTranslationFixBuilder[$nameListCode] )) { $translation = true; @@ -17677,16 +17757,28 @@ class Interpretation extends Fields return implode(PHP_EOL, $fields); } - public function setOtherFilter(&$view) + /** + * build other filter loading scripts + * + * @param string $nameListCode The list view name + * + * @return string The php to place in view.html.php + * + */ + public function setOtherFilter(&$nameListCode) { - if (isset($this->filterBuilder[$view]) - && ComponentbuilderHelper::checkArray($this->filterBuilder[$view])) + if (isset($this->adminFilterType[$nameListCode]) + && $this->adminFilterType[$nameListCode] == 1 + && isset($this->filterBuilder[$nameListCode]) + && ComponentbuilderHelper::checkArray( + $this->filterBuilder[$nameListCode] + )) { // get component name $Component = $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh]; $otherFilter = array(); - foreach ($this->filterBuilder[$view] as $filter) + foreach ($this->filterBuilder[$nameListCode] as $filter) { if ($filter['type'] != 'category' && ComponentbuilderHelper::checkArray($filter['custom']) @@ -17860,13 +17952,13 @@ class Interpretation extends Fields return ''; } - public function setCategoryFilter($viewName_list) + public function setCategoryFilter($nameListCode) { - if (isset($this->categoryBuilder[$viewName_list]) + if (isset($this->categoryBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->categoryBuilder[$viewName_list] + $this->categoryBuilder[$nameListCode] ) - && isset($this->categoryBuilder[$viewName_list]['extension'])) + && isset($this->categoryBuilder[$nameListCode]['extension'])) { // set component name $COPMONENT = ComponentbuilderHelper::safeString( @@ -17882,7 +17974,7 @@ class Interpretation extends Fields $filter[] = $this->_t(3) . "'filter_category_id',"; $filter[] = $this->_t(3) . "JHtml::_('select.options', JHtml::_('category.options', '" - . $this->categoryBuilder[$viewName_list]['extension'] + . $this->categoryBuilder[$nameListCode]['extension'] . "'), 'value', 'text', \$this->state->get('filter.category_id'))"; $filter[] = $this->_t(2) . ");"; @@ -17898,7 +17990,7 @@ class Interpretation extends Fields $filter[] = $this->_t(4) . "'batch[category]',"; $filter[] = $this->_t(4) . "JHtml::_('select.options', JHtml::_('category.options', '" - . $this->categoryBuilder[$viewName_list]['extension'] + . $this->categoryBuilder[$nameListCode]['extension'] . "'), 'value', 'text')"; $filter[] = $this->_t(3) . ");"; $filter[] = $this->_t(2) . "}"; @@ -17910,15 +18002,15 @@ class Interpretation extends Fields return ''; } - public function setRouterCategoryViews($viewName_single, $viewName_list) + public function setRouterCategoryViews($nameSingleCode, $nameListCode) { - if (isset($this->categoryBuilder[$viewName_list]) + if (isset($this->categoryBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->categoryBuilder[$viewName_list] + $this->categoryBuilder[$nameListCode] )) { // get the actual extention - $_extension = $this->categoryBuilder[$viewName_list]['extension']; + $_extension = $this->categoryBuilder[$nameListCode]['extension']; $_extension = explode('.', $_extension); // set component name if (ComponentbuilderHelper::checkArray($_extension)) @@ -17930,18 +18022,18 @@ class Interpretation extends Fields $component = $this->componentCodeName; } // check if category has another name - if (isset($this->catOtherName[$viewName_list]) + if (isset($this->catOtherName[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->catOtherName[$viewName_list] + $this->catOtherName[$nameListCode] )) { - $otherViews = $this->catOtherName[$viewName_list]['views']; - $otherView = $this->catOtherName[$viewName_list]['view']; + $otherViews = $this->catOtherName[$nameListCode]['views']; + $otherView = $this->catOtherName[$nameListCode]['view']; } else { - $otherViews = $viewName_list; - $otherView = $viewName_single; + $otherViews = $nameListCode; + $otherView = $nameSingleCode; } // set the OtherView value $this->fileContentDynamic['category' . $otherView][$this->hhh @@ -18000,13 +18092,13 @@ class Interpretation extends Fields )) { return "," . PHP_EOL . $this->_t(3) . '"' - . $this->categoryBuilder[$viewName_list]['extension'] + . $this->categoryBuilder[$nameListCode]['extension'] . '" => "' . $otherView . '"'; } else { return PHP_EOL . $this->_t(3) . '"' - . $this->categoryBuilder[$viewName_list]['extension'] + . $this->categoryBuilder[$nameListCode]['extension'] . '" => "' . $otherView . '"'; } } @@ -18014,38 +18106,38 @@ class Interpretation extends Fields return ''; } - public function setJcontrollerAllowAdd($viewName_single, $viewName_list) + public function setJcontrollerAllowAdd($nameSingleCode, $nameListCode) { $allow = array(); // set component name $component = $this->componentCodeName; // prepare custom permission script $customAllow = $this->getCustomScriptBuilder( - 'php_allowadd', $viewName_single, '', null, true + 'php_allowadd', $nameSingleCode, '', null, true ); // setup correct core target $coreLoad = false; - if (isset($this->permissionCore[$viewName_single])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$viewName_single]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } // check if item has category - if (0) //isset($this->categoryBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$viewName_list])) <-- remove category from check + if (0) //isset($this->categoryBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$nameListCode])) <-- remove category from check { // check if category has another name - if ($coreLoad && isset($this->catOtherName[$viewName_list]) + if ($coreLoad && isset($this->catOtherName[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->catOtherName[$viewName_list] + $this->catOtherName[$nameListCode] )) { - $otherViews = $this->catOtherName[$viewName_list]['views']; - $otherView = $this->catOtherName[$viewName_list]['view']; + $otherViews = $this->catOtherName[$nameListCode]['views']; + $otherView = $this->catOtherName[$nameListCode]['view']; } else { - $otherViews = $viewName_list; - $otherView = $viewName_single; + $otherViews = $nameListCode; + $otherView = $nameSingleCode; } // setup the category script $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) @@ -18092,7 +18184,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.create']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.create']] )) { @@ -18127,7 +18219,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.access']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.access']] )) { @@ -18149,7 +18241,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.create']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.create']] )) { @@ -18171,40 +18263,40 @@ class Interpretation extends Fields return implode(PHP_EOL, $allow); } - public function setJcontrollerAllowEdit($viewName_single, $viewName_list) + public function setJcontrollerAllowEdit($nameSingleCode, $nameListCode) { $allow = array(); // set component name $component = $this->componentCodeName; // prepare custom permission script $customAllow = $this->getCustomScriptBuilder( - 'php_allowedit', $viewName_single, '', null, true + 'php_allowedit', $nameSingleCode, '', null, true ); // setup correct core target $coreLoad = false; - if (isset($this->permissionCore[$viewName_single])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$viewName_single]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } - if (isset($this->categoryBuilder[$viewName_list]) + if (isset($this->categoryBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->categoryBuilder[$viewName_list] + $this->categoryBuilder[$nameListCode] )) { // check if category has another name - if ($coreLoad && isset($this->catOtherName[$viewName_list]) + if ($coreLoad && isset($this->catOtherName[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->catOtherName[$viewName_list] + $this->catOtherName[$nameListCode] )) { - $otherViews = $this->catOtherName[$viewName_list]['views']; - $otherView = $this->catOtherName[$viewName_list]['view']; + $otherViews = $this->catOtherName[$nameListCode]['views']; + $otherView = $this->catOtherName[$nameListCode]['view']; } else { - $otherViews = $viewName_list; - $otherView = $viewName_single; + $otherViews = $nameListCode; + $otherView = $nameSingleCode; } // setup the category script $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) @@ -18387,7 +18479,7 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.access']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder[$core['core.access']] )) { @@ -18396,7 +18488,7 @@ class Interpretation extends Fields ) . " Access check."; $allow[] = $this->_t(2) . "\$access = (\$user->authorise('" . $core['core.access'] . "', 'com_" . $component . "." - . $viewName_single + . $nameSingleCode . ".' . (int) \$recordId) && \$user->authorise('" . $core['core.access'] . "', 'com_" . $component . "'));"; $allow[] = $this->_t(2) . "if (!\$access)"; @@ -18415,19 +18507,19 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.edit']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder[$core['core.edit']] )) { $allow[] = $this->_t(3) . "\$permission = \$user->authorise('" . $core['core.edit'] . "', 'com_" . $component . "." - . $viewName_single . ".' . (int) \$recordId);"; + . $nameSingleCode . ".' . (int) \$recordId);"; } else { $allow[] = $this->_t(3) . "\$permission = \$user->authorise('core.edit', 'com_" - . $component . "." . $viewName_single + . $component . "." . $nameSingleCode . ".' . (int) \$recordId);"; } $allow[] = $this->_t(3) . "if (!\$permission)"; @@ -18439,19 +18531,20 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.edit.own']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder[$core['core.edit.own']] )) { $allow[] = $this->_t(4) . "if (\$user->authorise('" . $core['core.edit.own'] . "', 'com_" . $component . "." - . $viewName_single . ".' . \$recordId))"; + . $nameSingleCode . ".' . \$recordId))"; } else { $allow[] = $this->_t(4) . "if (\$user->authorise('core.edit.own', 'com_" - . $component . "." . $viewName_single . ".' . \$recordId))"; + . $component . "." . $nameSingleCode + . ".' . \$recordId))"; } $allow[] = $this->_t(4) . "{"; $allow[] = $this->_t(5) . "//" . $this->setLine(__LINE__) @@ -18481,7 +18574,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit.own']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit.own']] )) { @@ -18508,7 +18601,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit']] )) { @@ -18529,7 +18622,7 @@ class Interpretation extends Fields return implode(PHP_EOL, $allow); } - public function setJmodelAdminGetForm($viewName_single, $viewName_list) + public function setJmodelAdminGetForm($nameSingleCode, $nameListCode) { // set component name $component = $this->componentCodeName; @@ -18554,7 +18647,7 @@ class Interpretation extends Fields $getForm[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get the form."; $getForm[] = $this->_t(2) . "\$form = \$this->loadForm('com_" - . $component . "." . $viewName_single . "', '" . $viewName_single + . $component . "." . $nameSingleCode . "', '" . $nameSingleCode . "', \$options, \$clear, \$xpath);"; $getForm[] = PHP_EOL . $this->_t(2) . "if (empty(\$form))"; $getForm[] = $this->_t(2) . "{"; @@ -18564,37 +18657,37 @@ class Interpretation extends Fields if ($this->componentData->add_license && $this->componentData->license_type == 3 && isset( - $this->fileContentDynamic[$viewName_single][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'BOOLMETHOD' . $this->hhh] )) { $getForm[] = $this->checkStatmentLicenseLocked( - $this->fileContentDynamic[$viewName_single][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'BOOLMETHOD' . $this->hhh] ); } // setup correct core target $coreLoad = false; - if (isset($this->permissionCore[$viewName_single])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$viewName_single]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } - if (0) //isset($this->categoryBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$viewName_list])) <-- remove category from check + if (0) //isset($this->categoryBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$nameListCode])) <-- remove category from check { // check if category has another name - if ($coreLoad && isset($this->catOtherName[$viewName_list]) + if ($coreLoad && isset($this->catOtherName[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->catOtherName[$viewName_list] + $this->catOtherName[$nameListCode] )) { - $otherViews = $this->catOtherName[$viewName_list]['views']; - $otherView = $this->catOtherName[$viewName_list]['view']; + $otherViews = $this->catOtherName[$nameListCode]['views']; + $otherView = $this->catOtherName[$nameListCode]['view']; } else { - $otherViews = $viewName_list; - $otherView = $viewName_single; + $otherViews = $nameListCode; + $otherView = $nameSingleCode; } // setup the category script $getForm[] = PHP_EOL . $this->_t(2) @@ -18617,10 +18710,10 @@ class Interpretation extends Fields $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Determine correct permissions to check."; $getForm[] = $this->_t(2) . "if (\$this->getState('" - . $viewName_single . ".id'))"; + . $nameSingleCode . ".id'))"; $getForm[] = $this->_t(2) . "{"; $getForm[] = $this->_t(3) . "\$id = \$this->getState('" - . $viewName_single . ".id');"; + . $nameSingleCode . ".id');"; $getForm[] = PHP_EOL . $this->_t(3) . "\$catid = 0;"; $getForm[] = $this->_t(3) . "if (isset(\$this->getItem(\$id)->catid))"; @@ -18657,7 +18750,7 @@ class Interpretation extends Fields $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on Edit State access controls."; // get the other view - $otherView = $this->catCodeBuilder[$viewName_single]['view']; + $otherView = $this->catCodeBuilder[$nameSingleCode]['view']; // check if the item has permissions. if ($coreLoad && isset($core['core.edit.state']) && isset($this->permissionBuilder[$core['core.edit.state']]) @@ -18665,14 +18758,14 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.edit.state']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder[$core['core.edit.state']] )) { $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.state'] . "', 'com_" . $component . "." - . $viewName_single . ".' . (int) \$id))"; + . $nameSingleCode . ".' . (int) \$id))"; $getForm[] = $this->_t(3) . "|| (isset(\$catid) && \$catid != 0 && !\$user->authorise('core.edit.state', 'com_" . $component . "." . $otherView @@ -18686,7 +18779,8 @@ class Interpretation extends Fields { $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('core.edit.state', 'com_" - . $component . "." . $viewName_single . ".' . (int) \$id))"; + . $component . "." . $nameSingleCode + . ".' . (int) \$id))"; $getForm[] = $this->_t(3) . "|| (isset(\$catid) && \$catid != 0 && !\$user->authorise('core.edit.state', 'com_" . $component . "." . $otherView @@ -18744,14 +18838,14 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.edit.state']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder[$core['core.edit.state']] )) { $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.state'] . "', 'com_" . $component . "." - . $viewName_single . ".' . (int) \$id))"; + . $nameSingleCode . ".' . (int) \$id))"; $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $core['core.edit.state'] . "', 'com_" . $component @@ -18761,7 +18855,8 @@ class Interpretation extends Fields { $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('core.edit.state', 'com_" - . $component . "." . $viewName_single . ".' . (int) \$id))"; + . $component . "." . $nameSingleCode + . ".' . (int) \$id))"; $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('core.edit.state', 'com_" . $component . "')))"; @@ -18799,13 +18894,13 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.edit.created_by']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder[$core['core.edit.created_by']] )) { $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.created_by'] . "', 'com_" . $component . "." - . $viewName_single . ".' . (int) \$id))"; + . $nameSingleCode . ".' . (int) \$id))"; $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $core['core.edit.created_by'] . "', 'com_" . $component . "')))"; @@ -18839,13 +18934,13 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.edit.created']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder[$core['core.edit.created']] )) { $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.created'] . "', 'com_" . $component . "." - . $viewName_single . ".' . (int) \$id))"; + . $nameSingleCode . ".' . (int) \$id))"; $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $core['core.edit.created'] . "', 'com_" . $component . "')))"; } @@ -18872,7 +18967,7 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.edit.access']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder[$core['core.edit.access']] )) { @@ -18880,7 +18975,7 @@ class Interpretation extends Fields . " Modify the form based on Edit Access 'access' controls."; $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.access'] . "', 'com_" . $component . "." - . $viewName_single . ".' . (int) \$id))"; + . $nameSingleCode . ".' . (int) \$id))"; $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $core['core.edit.access'] . "', 'com_" . $component . "')))"; $getForm[] = $this->_t(2) . "{"; @@ -18895,13 +18990,13 @@ class Interpretation extends Fields $getForm[] = $this->_t(2) . "}"; } // handel the fields permissions - if (isset($this->permissionFields[$viewName_single]) + if (isset($this->permissionFields[$nameSingleCode]) && ComponentbuilderHelper::checkArray( - $this->permissionFields[$viewName_single] + $this->permissionFields[$nameSingleCode] )) { foreach ( - $this->permissionFields[$viewName_single] as $fieldName => + $this->permissionFields[$nameSingleCode] as $fieldName => $permission_options ) { @@ -18913,19 +19008,19 @@ class Interpretation extends Fields { case 'edit': $this->setPermissionEditFields( - $getForm, $viewName_single, $fieldName, + $getForm, $nameSingleCode, $fieldName, $fieldType, $component ); break; case 'access': $this->setPermissionAccessFields( - $getForm, $viewName_single, $fieldName, + $getForm, $nameSingleCode, $fieldName, $fieldType, $component ); break; case 'view': $this->setPermissionViewFields( - $getForm, $viewName_single, $fieldName, + $getForm, $nameSingleCode, $fieldName, $fieldType, $component ); break; @@ -18968,7 +19063,7 @@ class Interpretation extends Fields $getForm[] = $this->_t(3) . "}"; // load custom script if found $getForm[] = $this->_t(2) . "}" . $this->getCustomScriptBuilder( - 'php_getform', $viewName_single, PHP_EOL + 'php_getform', $nameSingleCode, PHP_EOL ); // setup the default script $getForm[] = $this->_t(2) . "return \$form;"; @@ -18976,7 +19071,7 @@ class Interpretation extends Fields return implode(PHP_EOL, $getForm); } - protected function setPermissionEditFields(&$allow, $viewName_single, + protected function setPermissionEditFields(&$allow, $nameSingleCode, $fieldName, $fieldType, $component ) { // only for fields that can be edited @@ -18987,10 +19082,10 @@ class Interpretation extends Fields . ComponentbuilderHelper::safeString($fieldName, 'W') . " access controls."; $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" - . $viewName_single . ".edit." . $fieldName . "', 'com_" - . $component . "." . $viewName_single . ".' . (int) \$id))"; + . $nameSingleCode . ".edit." . $fieldName . "', 'com_" + . $component . "." . $nameSingleCode . ".' . (int) \$id))"; $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" - . $viewName_single . ".edit." . $fieldName . "', 'com_" + . $nameSingleCode . ".edit." . $fieldName . "', 'com_" . $component . "')))"; $allow[] = $this->_t(2) . "{"; $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) @@ -19029,7 +19124,7 @@ class Interpretation extends Fields } } - protected function setPermissionAccessFields(&$allow, $viewName_single, + protected function setPermissionAccessFields(&$allow, $nameSingleCode, $fieldName, $fieldType, $component ) { $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) @@ -19037,10 +19132,10 @@ class Interpretation extends Fields . ComponentbuilderHelper::safeString($fieldName, 'W') . " access controls."; $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" - . $viewName_single . ".access." . $fieldName . "', 'com_" - . $component . "." . $viewName_single . ".' . (int) \$id))"; + . $nameSingleCode . ".access." . $fieldName . "', 'com_" + . $component . "." . $nameSingleCode . ".' . (int) \$id))"; $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" - . $viewName_single . ".access." . $fieldName . "', 'com_" + . $nameSingleCode . ".access." . $fieldName . "', 'com_" . $component . "')))"; $allow[] = $this->_t(2) . "{"; $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) @@ -19049,7 +19144,7 @@ class Interpretation extends Fields $allow[] = $this->_t(2) . "}"; } - protected function setPermissionViewFields(&$allow, $viewName_single, + protected function setPermissionViewFields(&$allow, $nameSingleCode, $fieldName, $fieldType, $component ) { if (ComponentbuilderHelper::fieldCheck($fieldType, 'spacer')) @@ -19059,10 +19154,10 @@ class Interpretation extends Fields . ComponentbuilderHelper::safeString($fieldName, 'W') . " access controls."; $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" - . $viewName_single . ".view." . $fieldName . "', 'com_" - . $component . "." . $viewName_single . ".' . (int) \$id))"; + . $nameSingleCode . ".view." . $fieldName . "', 'com_" + . $component . "." . $nameSingleCode . ".' . (int) \$id))"; $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" - . $viewName_single . ".view." . $fieldName . "', 'com_" + . $nameSingleCode . ".view." . $fieldName . "', 'com_" . $component . "')))"; $allow[] = $this->_t(2) . "{"; $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) @@ -19078,10 +19173,10 @@ class Interpretation extends Fields . ComponentbuilderHelper::safeString($fieldName, 'W') . " access controls."; $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" - . $viewName_single . ".view." . $fieldName . "', 'com_" - . $component . "." . $viewName_single . ".' . (int) \$id))"; + . $nameSingleCode . ".view." . $fieldName . "', 'com_" + . $component . "." . $nameSingleCode . ".' . (int) \$id))"; $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" - . $viewName_single . ".view." . $fieldName . "', 'com_" + . $nameSingleCode . ".view." . $fieldName . "', 'com_" . $component . "')))"; $allow[] = $this->_t(2) . "{"; $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) @@ -19122,22 +19217,22 @@ class Interpretation extends Fields } } - public function setJmodelAdminAllowEdit($viewName_single, $viewName_list) + public function setJmodelAdminAllowEdit($nameSingleCode, $nameListCode) { $allow = array(); // set component name $component = $this->componentCodeName; // prepare custom permission script $customAllow = $this->getCustomScriptBuilder( - 'php_allowedit', $viewName_single, $this->_t(2) + 'php_allowedit', $nameSingleCode, $this->_t(2) . "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;" . PHP_EOL ); // setup correct core target $coreLoad = false; - if (isset($this->permissionCore[$viewName_single])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$viewName_single]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } // check if the item has permissions. @@ -19147,7 +19242,7 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.edit']] ) && in_array( - $viewName_single, $this->permissionBuilder[$core['core.edit']] + $nameSingleCode, $this->permissionBuilder[$core['core.edit']] )) { $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) @@ -19157,7 +19252,7 @@ class Interpretation extends Fields $allow[] = $customAllow; $allow[] = $this->_t(2) . "return \$user->authorise('" . $core['core.edit'] . "', 'com_" . $component . "." - . $viewName_single + . $nameSingleCode . ".'. ((int) isset(\$data[\$key]) ? \$data[\$key] : 0)) or \$user->authorise('" . $core['core.edit'] . "', 'com_" . $component . "');"; } @@ -19173,40 +19268,40 @@ class Interpretation extends Fields $allow[] = $customAllow; $allow[] = $this->_t(2) . "return JFactory::getUser()->authorise('core.edit', 'com_" - . $component . "." . $viewName_single + . $component . "." . $nameSingleCode . ".'. ((int) isset(\$data[\$key]) ? \$data[\$key] : 0)) or parent::allowEdit(\$data, \$key);"; } return implode(PHP_EOL, $allow); } - public function setJmodelAdminCanDelete($viewName_single, $viewName_list) + public function setJmodelAdminCanDelete($nameSingleCode, $nameListCode) { $allow = array(); // set component name $component = $this->componentCodeName; // setup correct core target $coreLoad = false; - if (isset($this->permissionCore[$viewName_single])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$viewName_single]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } - if (0) //isset($this->categoryBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$viewName_list])) <-- remove category from check + if (0) //isset($this->categoryBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$nameListCode])) <-- remove category from check { // check if category has another name - if ($coreLoad && isset($this->catOtherName[$viewName_list]) + if ($coreLoad && isset($this->catOtherName[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->catOtherName[$viewName_list] + $this->catOtherName[$nameListCode] )) { - $otherViews = $this->catOtherName[$viewName_list]['views']; - $otherView = $this->catOtherName[$viewName_list]['view']; + $otherViews = $this->catOtherName[$nameListCode]['views']; + $otherView = $this->catOtherName[$nameListCode]['view']; } else { - $otherViews = $viewName_list; - $otherView = $viewName_single; + $otherViews = $nameListCode; + $otherView = $nameSingleCode; } // setup the category script $allow[] = PHP_EOL . $this->_t(2) . "if (!empty(\$record->id))"; @@ -19272,7 +19367,7 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.delete']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder[$core['core.delete']] )) { @@ -19282,7 +19377,7 @@ class Interpretation extends Fields . " The record has been set. Check the record permissions."; $allow[] = $this->_t(3) . "return \$user->authorise('" . $core['core.delete'] . "', 'com_" . $component . "." - . $viewName_single . ".' . (int) \$record->id);"; + . $nameSingleCode . ".' . (int) \$record->id);"; } else { @@ -19292,7 +19387,7 @@ class Interpretation extends Fields . " The record has been set. Check the record permissions."; $allow[] = $this->_t(3) . "return \$user->authorise('core.delete', 'com_" - . $component . "." . $viewName_single + . $component . "." . $nameSingleCode . ".' . (int) \$record->id);"; } $allow[] = $this->_t(2) . "}"; @@ -19302,33 +19397,34 @@ class Interpretation extends Fields return implode(PHP_EOL, $allow); } - public function setJmodelAdminCanEditState($viewName_single, $viewName_list) - { + public function setJmodelAdminCanEditState($nameSingleCode, + $nameListCode + ) { $allow = array(); // set component name $component = $this->componentCodeName; // setup correct core target $coreLoad = false; - if (isset($this->permissionCore[$viewName_single])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$viewName_single]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } - if (0) // isset($this->categoryBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$viewName_list])) <-- remove category from check + if (0) // isset($this->categoryBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$nameListCode])) <-- remove category from check { // check if category has another name - if (isset($this->catOtherName[$viewName_list]) + if (isset($this->catOtherName[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->catOtherName[$viewName_list] + $this->catOtherName[$nameListCode] )) { - $otherViews = $this->catOtherName[$viewName_list]['views']; - $otherView = $this->catOtherName[$viewName_list]['view']; + $otherViews = $this->catOtherName[$nameListCode]['views']; + $otherView = $this->catOtherName[$nameListCode]['view']; } else { - $otherViews = $viewName_list; - $otherView = $viewName_single; + $otherViews = $nameListCode; + $otherView = $nameSingleCode; } $allow[] = PHP_EOL . $this->_t(2) . "\$user = JFactory::getUser();"; $allow[] = $this->_t(2) @@ -19344,19 +19440,19 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.edit.state']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder[$core['core.edit.state']] )) { $allow[] = $this->_t(3) . "\$permission = \$user->authorise('" . $core['core.edit.state'] . "', 'com_" . $component . "." - . $viewName_single . ".' . (int) \$recordId);"; + . $nameSingleCode . ".' . (int) \$recordId);"; } else { $allow[] = $this->_t(3) . "\$permission = \$user->authorise('core.edit.state', 'com_" - . $component . "." . $viewName_single + . $component . "." . $nameSingleCode . ".' . (int) \$recordId);"; } $allow[] = $this->_t(3) @@ -19386,7 +19482,7 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.edit.state']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder[$core['core.edit.state']] )) { @@ -19421,19 +19517,19 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.edit.state']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder[$core['core.edit.state']] )) { $allow[] = $this->_t(3) . "\$permission = \$user->authorise('" . $core['core.edit.state'] . "', 'com_" . $component . "." - . $viewName_single . ".' . (int) \$recordId);"; + . $nameSingleCode . ".' . (int) \$recordId);"; } else { $allow[] = $this->_t(3) . "\$permission = \$user->authorise('core.edit.state', 'com_" - . $component . "." . $viewName_single + . $component . "." . $nameSingleCode . ".' . (int) \$recordId);"; } $allow[] = $this->_t(3) @@ -19448,7 +19544,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit.state']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit.state']] )) { @@ -19470,16 +19566,16 @@ class Interpretation extends Fields return implode(PHP_EOL, $allow); } - public function setJviewListCanDo($viewName_single, $viewName_list) + public function setJviewListCanDo($nameSingleCode, $nameListCode) { $allow = array(); // set component name $component = $this->componentCodeName; // setup correct core target $coreLoad = false; - if (isset($this->permissionCore[$viewName_single])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$viewName_single]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } // check if the item has permissions for edit. @@ -19489,7 +19585,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit']] )) { @@ -19509,7 +19605,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit.state']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit.state']] )) { @@ -19528,7 +19624,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.create']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.create']] )) { @@ -19547,7 +19643,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.delete']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.delete']] )) { @@ -19566,7 +19662,7 @@ class Interpretation extends Fields $this->permissionBuilder['global']['global'][$core['core.batch']] ) && in_array( - $viewName_single, + $nameSingleCode, $this->permissionBuilder['global']['global'][$core['core.delete']] )) { @@ -19630,22 +19726,24 @@ class Interpretation extends Fields /** * set the filter fields * - * @param string $name_list_code The list view name + * @param string $nameListCode The list view name * * @return string The code for the filter fields array * */ - public function setFilterFields(&$name_list_code) + public function setFilterFields(&$nameListCode) { // keep track of all fields already added - $donelist = array('id' => true, 'search' => true, - 'published' => true, 'access' => true, + $donelist = array('id' => true, 'search' => true, + 'published' => true, 'access' => true, 'created_by' => true, 'modified_by' => true); // default filter fields $fields = "'a.id','id'"; $fields .= "," . PHP_EOL . $this->_t(4) . "'a.published','published'"; - if (isset($this->accessBuilder[$name_list_code]) - && ComponentbuilderHelper::checkString($this->accessBuilder[$name_list_code])) + if (isset($this->accessBuilder[$nameListCode]) + && ComponentbuilderHelper::checkString( + $this->accessBuilder[$nameListCode] + )) { $fields .= "," . PHP_EOL . $this->_t(4) . "'a.access','access'"; } @@ -19655,27 +19753,35 @@ class Interpretation extends Fields . "'a.modified_by','modified_by'"; // add the rest of the set filters - if (isset($this->filterBuilder[$name_list_code]) - && ComponentbuilderHelper::checkArray($this->filterBuilder[$name_list_code])) + if (isset($this->filterBuilder[$nameListCode]) + && ComponentbuilderHelper::checkArray( + $this->filterBuilder[$nameListCode] + )) { - foreach ($this->filterBuilder[$name_list_code] as $filter) + foreach ($this->filterBuilder[$nameListCode] as $filter) { if (!isset($donelist[$filter['code']])) { - $fields .= $this->getFilterFieldCode($filter); + $fields .= $this->getFilterFieldCode( + $filter + ); $donelist[$filter['code']] = true; } } } // add the rest of the set filters - if (isset($this->sortBuilder[$name_list_code]) - && ComponentbuilderHelper::checkArray($this->sortBuilder[$name_list_code])) + if (isset($this->sortBuilder[$nameListCode]) + && ComponentbuilderHelper::checkArray( + $this->sortBuilder[$nameListCode] + )) { - foreach ($this->sortBuilder[$name_list_code] as $filter) + foreach ($this->sortBuilder[$nameListCode] as $filter) { if (!isset($donelist[$filter['code']])) { - $fields .= $this->getFilterFieldCode($filter); + $fields .= $this->getFilterFieldCode( + $filter + ); $donelist[$filter['code']] = true; } } @@ -19687,7 +19793,7 @@ class Interpretation extends Fields /** * Add the code of the filter field array * - * @param array $filter The field/filter array + * @param array $filter The field/filter array * * @return string The code for the filter array * @@ -19712,13 +19818,16 @@ class Interpretation extends Fields { // check if custom field is set if (ComponentbuilderHelper::checkArray( - $filter['custom']) + $filter['custom'] + ) && isset($filter['custom']['db']) && ComponentbuilderHelper::checkString( - $filter['custom']['db']) + $filter['custom']['db'] + ) && isset($filter['custom']['text']) && ComponentbuilderHelper::checkString( - $filter['custom']['text'])) + $filter['custom']['text'] + )) { $field = "," . PHP_EOL . $this->_t(4) . "'" . $filter['custom']['db'] . "." @@ -19732,22 +19841,23 @@ class Interpretation extends Fields . "'"; } } + return $field; } /** * set the sotred ids * - * @param string $name_list_code The list view name + * @param string $nameListCode The list view name * * @return string The code for the populate state * */ - public function setStoredId(&$name_list_code) + public function setStoredId(&$nameListCode) { // keep track of all fields already added - $donelist = array('id' => true, 'search' => true, - 'published' => true, 'access' => true, + $donelist = array('id' => true, 'search' => true, + 'published' => true, 'access' => true, 'created_by' => true, 'modified_by' => true); // set the defaults first $stored = "//" . $this->setLine(__LINE__) . " Compile the store id."; @@ -19757,8 +19867,10 @@ class Interpretation extends Fields . "\$id .= ':' . \$this->getState('filter.search');"; $stored .= PHP_EOL . $this->_t(2) . "\$id .= ':' . \$this->getState('filter.published');"; - if (isset($this->accessBuilder[$name_list_code]) - && ComponentbuilderHelper::checkString($this->accessBuilder[$name_list_code])) + if (isset($this->accessBuilder[$nameListCode]) + && ComponentbuilderHelper::checkString( + $this->accessBuilder[$nameListCode] + )) { $stored .= PHP_EOL . $this->_t(2) . "\$id .= ':' . \$this->getState('filter.access');"; @@ -19770,27 +19882,35 @@ class Interpretation extends Fields $stored .= PHP_EOL . $this->_t(2) . "\$id .= ':' . \$this->getState('filter.modified_by');"; // add the rest of the set filters - if (isset($this->filterBuilder[$name_list_code]) - && ComponentbuilderHelper::checkArray($this->filterBuilder[$name_list_code])) + if (isset($this->filterBuilder[$nameListCode]) + && ComponentbuilderHelper::checkArray( + $this->filterBuilder[$nameListCode] + )) { - foreach ($this->filterBuilder[$name_list_code] as $filter) + foreach ($this->filterBuilder[$nameListCode] as $filter) { if (!isset($donelist[$filter['code']])) { - $stored .= $this->getStoredIdCode($filter); + $stored .= $this->getStoredIdCode( + $filter + ); $donelist[$filter['code']] = true; } } } // add the rest of the set filters - if (isset($this->sortBuilder[$name_list_code]) - && ComponentbuilderHelper::checkArray($this->sortBuilder[$name_list_code])) + if (isset($this->sortBuilder[$nameListCode]) + && ComponentbuilderHelper::checkArray( + $this->sortBuilder[$nameListCode] + )) { - foreach ($this->sortBuilder[$name_list_code] as $filter) + foreach ($this->sortBuilder[$nameListCode] as $filter) { if (!isset($donelist[$filter['code']])) { - $stored .= $this->getStoredIdCode($filter); + $stored .= $this->getStoredIdCode( + $filter + ); $donelist[$filter['code']] = true; } } @@ -19802,7 +19922,7 @@ class Interpretation extends Fields /** * Add the code of the stored ids * - * @param array $filter The field/filter array + * @param array $filter The field/filter array * * @return string The code for the stored IDs * @@ -19835,14 +19955,12 @@ class Interpretation extends Fields public function setAddToolBar(&$view) { // set view name - $viewName = ComponentbuilderHelper::safeString( - $view['settings']->name_single - ); + $nameSingleCode = $view['settings']->name_single_code; // setup correct core target $coreLoad = false; - if (isset($this->permissionCore[$viewName])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$viewName]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } // check type @@ -19863,9 +19981,10 @@ class Interpretation extends Fields $toolBar = "JFactory::getApplication()->input->set('hidemainmenu', true);"; $toolBar .= PHP_EOL . $this->_t(2) . "JToolBarHelper::title(JText:" - . ":_('" . $viewNameLang_readonly . "'), '" . $viewName . "');"; + . ":_('" . $viewNameLang_readonly . "'), '" . $nameSingleCode + . "');"; $toolBar .= PHP_EOL . $this->_t(2) . "JToolBarHelper::cancel('" - . $viewName . ".cancel', 'JTOOLBAR_CLOSE');"; + . $nameSingleCode . ".cancel', 'JTOOLBAR_CLOSE');"; } else { @@ -19911,7 +20030,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.create']] ) && in_array( - $viewName, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.create']] )) { @@ -19927,7 +20046,7 @@ class Interpretation extends Fields $toolBar .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__) . " We can create the record."; $toolBar .= PHP_EOL . $this->_t(4) . "JToolBarHelper::save('" - . $viewName . ".save', 'JTOOLBAR_SAVE');"; + . $nameSingleCode . ".save', 'JTOOLBAR_SAVE');"; $toolBar .= PHP_EOL . $this->_t(3) . "}"; if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) @@ -19935,7 +20054,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit']] ) && in_array( - $viewName, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit']] )) { @@ -19952,21 +20071,21 @@ class Interpretation extends Fields $toolBar .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__) . " We can save the record."; $toolBar .= PHP_EOL . $this->_t(4) . "JToolBarHelper::save('" - . $viewName . ".save', 'JTOOLBAR_SAVE');"; + . $nameSingleCode . ".save', 'JTOOLBAR_SAVE');"; $toolBar .= PHP_EOL . $this->_t(3) . "}"; $toolBar .= PHP_EOL . $this->_t(3) . "if (\$isNew)"; $toolBar .= PHP_EOL . $this->_t(3) . "{"; $toolBar .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__) . " Do not creat but cancel."; $toolBar .= PHP_EOL . $this->_t(4) . "JToolBarHelper::cancel('" - . $viewName . ".cancel', 'JTOOLBAR_CANCEL');"; + . $nameSingleCode . ".cancel', 'JTOOLBAR_CANCEL');"; $toolBar .= PHP_EOL . $this->_t(3) . "}"; $toolBar .= PHP_EOL . $this->_t(3) . "else"; $toolBar .= PHP_EOL . $this->_t(3) . "{"; $toolBar .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__) . " We can close it."; $toolBar .= PHP_EOL . $this->_t(4) . "JToolBarHelper::cancel('" - . $viewName . ".cancel', 'JTOOLBAR_CLOSE');"; + . $nameSingleCode . ".cancel', 'JTOOLBAR_CLOSE');"; $toolBar .= PHP_EOL . $this->_t(3) . "}"; $toolBar .= PHP_EOL . $this->_t(2) . "}"; $toolBar .= PHP_EOL . $this->_t(2) . "else"; @@ -19981,7 +20100,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.create']] ) && in_array( - $viewName, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.create']] )) { @@ -19995,15 +20114,15 @@ class Interpretation extends Fields } $toolBar .= PHP_EOL . $this->_t(4) . "{"; $toolBar .= PHP_EOL . $this->_t(5) . "JToolBarHelper::apply('" - . $viewName . ".apply', 'JTOOLBAR_APPLY');"; + . $nameSingleCode . ".apply', 'JTOOLBAR_APPLY');"; $toolBar .= PHP_EOL . $this->_t(5) . "JToolBarHelper::save('" - . $viewName . ".save', 'JTOOLBAR_SAVE');"; + . $nameSingleCode . ".save', 'JTOOLBAR_SAVE');"; $toolBar .= PHP_EOL . $this->_t(5) . "JToolBarHelper::custom('" - . $viewName + . $nameSingleCode . ".save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);"; $toolBar .= PHP_EOL . $this->_t(4) . "};"; $toolBar .= PHP_EOL . $this->_t(4) . "JToolBarHelper::cancel('" - . $viewName . ".cancel', 'JTOOLBAR_CANCEL');"; + . $nameSingleCode . ".cancel', 'JTOOLBAR_CANCEL');"; $toolBar .= PHP_EOL . $this->_t(3) . "}"; $toolBar .= PHP_EOL . $this->_t(3) . "else"; $toolBar .= PHP_EOL . $this->_t(3) . "{"; @@ -20013,7 +20132,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit']] ) && in_array( - $viewName, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit']] )) { @@ -20029,9 +20148,9 @@ class Interpretation extends Fields $toolBar .= PHP_EOL . $this->_t(5) . "//" . $this->setLine(__LINE__) . " We can save the new record"; $toolBar .= PHP_EOL . $this->_t(5) . "JToolBarHelper::apply('" - . $viewName . ".apply', 'JTOOLBAR_APPLY');"; + . $nameSingleCode . ".apply', 'JTOOLBAR_APPLY');"; $toolBar .= PHP_EOL . $this->_t(5) . "JToolBarHelper::save('" - . $viewName . ".save', 'JTOOLBAR_SAVE');"; + . $nameSingleCode . ".save', 'JTOOLBAR_SAVE');"; $toolBar .= PHP_EOL . $this->_t(5) . "//" . $this->setLine(__LINE__) . " We can save this record, but check the create permission to see"; $toolBar .= PHP_EOL . $this->_t(5) . "//" . $this->setLine(__LINE__) @@ -20042,7 +20161,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.create']] ) && in_array( - $viewName, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.create']] )) { @@ -20056,7 +20175,7 @@ class Interpretation extends Fields } $toolBar .= PHP_EOL . $this->_t(5) . "{"; $toolBar .= PHP_EOL . $this->_t(6) . "JToolBarHelper::custom('" - . $viewName + . $nameSingleCode . ".save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);"; $toolBar .= PHP_EOL . $this->_t(5) . "}"; $toolBar .= PHP_EOL . $this->_t(4) . "}"; @@ -20066,13 +20185,13 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.edit']] ) && in_array( - $viewName, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.edit']] )) { - if ($coreLoad && isset($this->historyBuilder[$viewName]) + if ($coreLoad && isset($this->historyBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkString( - $this->historyBuilder[$viewName] + $this->historyBuilder[$nameSingleCode] )) { $toolBar .= PHP_EOL . $this->_t(4) @@ -20084,16 +20203,16 @@ class Interpretation extends Fields $toolBar .= PHP_EOL . $this->_t(4) . "{"; $toolBar .= PHP_EOL . $this->_t(5) . "JToolbarHelper::versions('com_" - . $this->componentCodeName . "." . $viewName + . $this->componentCodeName . "." . $nameSingleCode . "', \$this->item->id);"; $toolBar .= PHP_EOL . $this->_t(4) . "}"; } } else { - if ($coreLoad && isset($this->historyBuilder[$viewName]) + if ($coreLoad && isset($this->historyBuilder[$nameSingleCode]) && ComponentbuilderHelper::checkString( - $this->historyBuilder[$viewName] + $this->historyBuilder[$nameSingleCode] )) { $toolBar .= PHP_EOL . $this->_t(4) @@ -20104,7 +20223,7 @@ class Interpretation extends Fields $toolBar .= PHP_EOL . $this->_t(4) . "{"; $toolBar .= PHP_EOL . $this->_t(5) . "JToolbarHelper::versions('com_" - . $this->componentCodeName . "." . $viewName + . $this->componentCodeName . "." . $nameSingleCode . "', \$this->item->id);"; $toolBar .= PHP_EOL . $this->_t(4) . "}"; } @@ -20115,7 +20234,7 @@ class Interpretation extends Fields $this->permissionBuilder['global'][$core['core.create']] ) && in_array( - $viewName, + $nameSingleCode, $this->permissionBuilder['global'][$core['core.create']] )) { @@ -20129,13 +20248,13 @@ class Interpretation extends Fields } $toolBar .= PHP_EOL . $this->_t(4) . "{"; $toolBar .= PHP_EOL . $this->_t(5) . "JToolBarHelper::custom('" - . $viewName + . $nameSingleCode . ".save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);"; $toolBar .= PHP_EOL . $this->_t(4) . "}"; // add custom buttons $toolBar .= $this->setCustomButtons($view, 2, $this->_t(2)); $toolBar .= PHP_EOL . $this->_t(4) . "JToolBarHelper::cancel('" - . $viewName . ".cancel', 'JTOOLBAR_CLOSE');"; + . $nameSingleCode . ".cancel', 'JTOOLBAR_CLOSE');"; $toolBar .= PHP_EOL . $this->_t(3) . "}"; $toolBar .= PHP_EOL . $this->_t(2) . "}"; $toolBar .= PHP_EOL . $this->_t(2) . "JToolbarHelper::divider();"; @@ -20143,7 +20262,8 @@ class Interpretation extends Fields . " set help url for this view if found"; $toolBar .= PHP_EOL . $this->_t(2) . "\$help_url = " . $this->fileContentStatic[$this->hhh . 'Component' - . $this->hhh] . "Helper::getHelpUrl('" . $viewName . "');"; + . $this->hhh] . "Helper::getHelpUrl('" . $nameSingleCode + . "');"; $toolBar .= PHP_EOL . $this->_t(2) . "if (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::checkString(\$help_url))"; @@ -20159,53 +20279,61 @@ class Interpretation extends Fields /** * set the populate state code * - * @param string $name_single_code The single view name - * @param string $name_list_code The list view name + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name * * @return string The code for the populate state * */ - public function setPopulateState(&$name_single_code, &$name_list_code) + public function setPopulateState(&$nameSingleCode, &$nameListCode) { // reset bucket $state = ''; // keep track of all fields already added $donelist = array(); // add the default populate states (this must be added first) - $state .= $this->setDefaultPopulateState($name_single_code); + $state .= $this->setDefaultPopulateState($nameSingleCode); // we must add the formSubmited code if new above filters is used $new_filter = false; - if (isset($this->adminFilterType[$name_list_code]) - && $this->adminFilterType[$name_list_code] == 2) + if (isset($this->adminFilterType[$nameListCode]) + && $this->adminFilterType[$nameListCode] == 2) { - $state .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" + $state .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Check if the form was submitted"; - $state .= PHP_EOL . $this->_t(2) . "\$formSubmited" + $state .= PHP_EOL . $this->_t(2) . "\$formSubmited" . " = \$app->input->post->get('form_submited');"; $new_filter = true; } // add the filters - if (isset($this->filterBuilder[$name_list_code]) - && ComponentbuilderHelper::checkArray($this->filterBuilder[$name_list_code])) + if (isset($this->filterBuilder[$nameListCode]) + && ComponentbuilderHelper::checkArray( + $this->filterBuilder[$nameListCode] + )) { - foreach ($this->filterBuilder[$name_list_code] as $filter) + foreach ($this->filterBuilder[$nameListCode] as $filter) { if (!isset($donelist[$filter['code']])) { - $state .= $this->getPopulateStateFilterCode($filter, $new_filter); + $state .= $this->getPopulateStateFilterCode( + $filter, $new_filter + ); $donelist[$filter['code']] = true; } } } // add the rest of the set filters - if (isset($this->sortBuilder[$name_list_code]) - && ComponentbuilderHelper::checkArray($this->sortBuilder[$name_list_code])) + if (isset($this->sortBuilder[$nameListCode]) + && ComponentbuilderHelper::checkArray( + $this->sortBuilder[$nameListCode] + )) { - foreach ($this->sortBuilder[$name_list_code] as $filter) + foreach ($this->sortBuilder[$nameListCode] as $filter) { if (!isset($donelist[$filter['code']])) { - $state .= $this->getPopulateStateFilterCode($filter, $new_filter); + $state .= $this->getPopulateStateFilterCode( + $filter, $new_filter + ); $donelist[$filter['code']] = true; } } @@ -20217,15 +20345,16 @@ class Interpretation extends Fields /** * Add the code of the filter in the populate state * - * @param array $filter The field/filter array - * @param bool $new_filter The switch to use the new filter - * @param string $extra The defaults/extra options of the filter + * @param array $filter The field/filter array + * @param bool $new_filter The switch to use the new filter + * @param string $extra The defaults/extra options of the filter * * @return string The code for the populate state * */ - protected function getPopulateStateFilterCode(&$filter, $new_filter, $extra = '') - { + protected function getPopulateStateFilterCode(&$filter, $new_filter, + $extra = '' + ) { // add category stuff (may still remove these) TODO if ($filter['type'] === 'category') { @@ -20263,73 +20392,94 @@ class Interpretation extends Fields . "\$this->setState('filter." . $filter['code'] . "', \$" . $filter['code'] . ");"; } + return $state; } /** * set the default populate state code * - * @param string $name_single_code The single view name + * @param string $nameSingleCode The single view name * * @return string The state code added * */ - protected function setDefaultPopulateState(&$name_single_code) + protected function setDefaultPopulateState(&$nameSingleCode) { $state = ''; // start filter $filter = array('type' => 'text'); // if access is not set add its default filter here - if (!isset($this->fieldsNames[$name_single_code]['access'])) + if (!isset($this->fieldsNames[$nameSingleCode]['access'])) { $filter['code'] = "access"; - $state .= $this->getPopulateStateFilterCode($filter, false, ", 0, 'int'"); + $state .= $this->getPopulateStateFilterCode( + $filter, false, ", 0, 'int'" + ); } // if published is not set add its default filter here - if (!isset($this->fieldsNames[$name_single_code]['published'])) + if (!isset($this->fieldsNames[$nameSingleCode]['published'])) { $filter['code'] = "published"; - $state .= $this->getPopulateStateFilterCode($filter, false, ", ''"); + $state .= $this->getPopulateStateFilterCode( + $filter, false, ", ''" + ); } // if created_by is not set add its default filter here - if (!isset($this->fieldsNames[$name_single_code]['created_by'])) + if (!isset($this->fieldsNames[$nameSingleCode]['created_by'])) { $filter['code'] = "created_by"; - $state .= $this->getPopulateStateFilterCode($filter, false, ", ''"); + $state .= $this->getPopulateStateFilterCode( + $filter, false, ", ''" + ); } // if created is not set add its default filter here - if (!isset($this->fieldsNames[$name_single_code]['created'])) + if (!isset($this->fieldsNames[$nameSingleCode]['created'])) { $filter['code'] = "created"; - $state .= $this->getPopulateStateFilterCode($filter, false); + $state .= $this->getPopulateStateFilterCode( + $filter, false + ); } // the sorting defaults are always added $filter['code'] = "sorting"; - $state .= $this->getPopulateStateFilterCode($filter, false, ", 0, 'int'"); + $state .= $this->getPopulateStateFilterCode( + $filter, false, ", 0, 'int'" + ); // the search defaults are always added $filter['code'] = "search"; - $state .= $this->getPopulateStateFilterCode($filter, false); + $state .= $this->getPopulateStateFilterCode($filter, false); return $state; } - public function setSortFields(&$view) + /** + * set the sorted field array for the getSortFields method + * + * @param string $nameSingleCode The single view name + * + * @return string The array/string of fields to add to the getSortFields method + * + */ + public function setSortFields(&$nameListCode) { // keep track of all fields already added $donelist = array('ordering', 'published'); // set the default first $fields = "return array("; - $fields .= PHP_EOL . $this->_t(3) . "'ordering' => JText:" + $fields .= PHP_EOL . $this->_t(3) . "'a.ordering' => JText:" . ":_('JGRID_HEADING_ORDERING')"; $fields .= "," . PHP_EOL . $this->_t(3) . "'a.published' => JText:" . ":_('JSTATUS')"; // add the rest of the set filters - if (isset($this->sortBuilder[$view]) - && ComponentbuilderHelper::checkArray($this->sortBuilder[$view])) + if (isset($this->sortBuilder[$nameListCode]) + && ComponentbuilderHelper::checkArray( + $this->sortBuilder[$nameListCode] + )) { - foreach ($this->sortBuilder[$view] as $filter) + foreach ($this->sortBuilder[$nameListCode] as $filter) { if (!in_array($filter['code'], $donelist)) { @@ -20449,7 +20599,8 @@ class Interpretation extends Fields return $checkin; } - public function setGetItemsMethodStringFix($viewName_single, $viewName_list, + public function setGetItemsMethodStringFix($nameSingleCode, + $nameListCode, $Component, $tab = '', $export = false, $all = false ) { // add the fix if this view has the need for it @@ -20463,9 +20614,9 @@ class Interpretation extends Fields } // setup correct core target $coreLoad = false; - if (isset($this->permissionCore[$viewName_single])) + if (isset($this->permissionCore[$nameSingleCode])) { - $core = $this->permissionCore[$viewName_single]; + $core = $this->permissionCore[$nameSingleCode]; $coreLoad = true; } $component = ComponentbuilderHelper::safeString($Component); @@ -20476,7 +20627,8 @@ class Interpretation extends Fields $this->permissionBuilder[$core['core.access']] ) && in_array( - $viewName_single, $this->permissionBuilder[$core['core.access']] + $nameSingleCode, + $this->permissionBuilder[$core['core.access']] )) { $fix_access = PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "//" @@ -20484,7 +20636,7 @@ class Interpretation extends Fields . " Remove items the user can't access."; $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "\$access = (\$user->authorise('" . $core['core.access'] - . "', 'com_" . $component . "." . $viewName_single + . "', 'com_" . $component . "." . $nameSingleCode . ".' . (int) \$item->id) && \$user->authorise('" . $core['core.access'] . "', 'com_" . $component . "'));"; $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) @@ -20507,13 +20659,13 @@ class Interpretation extends Fields $methodName = 'getItemsMethodListStringFixBuilder'; } // load the relations before modeling - if (isset($this->fieldRelations[$viewName_list]) + if (isset($this->fieldRelations[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->fieldRelations[$viewName_list] + $this->fieldRelations[$nameListCode] )) { foreach ( - $this->fieldRelations[$viewName_list] as $field_id => $fields + $this->fieldRelations[$nameListCode] as $field_id => $fields ) { foreach ($fields as $area => $field) @@ -20521,19 +20673,19 @@ class Interpretation extends Fields if ($area == 1 && isset($field['code'])) { $fix .= $this->setModelFieldRelation( - $field, $viewName_list, $tab + $field, $nameListCode, $tab ); } } } } // open the values - if (isset($this->{$methodName}[$viewName_single]) + if (isset($this->{$methodName}[$nameSingleCode]) && ComponentbuilderHelper::checkArray( - $this->{$methodName}[$viewName_single] + $this->{$methodName}[$nameSingleCode] )) { - foreach ($this->{$methodName}[$viewName_single] as $item) + foreach ($this->{$methodName}[$nameSingleCode] as $item) { switch ($item['method']) { @@ -20661,7 +20813,7 @@ class Interpretation extends Fields PHP_EOL . $this->_t(1) . $tab . $this->_t( 3 ), - $this->expertFieldModeling[$viewName_single][$item['name']]['get'] + $this->expertFieldModeling[$nameSingleCode][$item['name']]['get'] ), $_placeholder_for_field ); } @@ -20867,28 +21019,28 @@ class Interpretation extends Fields } } /* // set translation (TODO) would be nice to cut down on double loops.. - if (!$export && isset($this->selectionTranslationFixBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->selectionTranslationFixBuilder[$viewName_list])) + if (!$export && isset($this->selectionTranslationFixBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray($this->selectionTranslationFixBuilder[$nameListCode])) { - foreach ($this->selectionTranslationFixBuilder[$viewName_list] as $name => $values) + foreach ($this->selectionTranslationFixBuilder[$nameListCode] as $name => $values) { $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "//" . $this->setLine(__LINE__) . " convert " . $name; $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "\$item->" . $name . " = \$this->selectionTranslation(\$item->" . $name . ", '" . $name . "');"; } } */ // load the relations after modeling - if (isset($this->fieldRelations[$viewName_list]) + if (isset($this->fieldRelations[$nameListCode]) && ComponentbuilderHelper::checkArray( - $this->fieldRelations[$viewName_list] + $this->fieldRelations[$nameListCode] )) { - foreach ($this->fieldRelations[$viewName_list] as $fields) + foreach ($this->fieldRelations[$nameListCode] as $fields) { foreach ($fields as $area => $field) { if ($area == 3 && isset($field['code'])) { $fix .= $this->setModelFieldRelation( - $field, $viewName_list, $tab + $field, $nameListCode, $tab ); } } @@ -20929,13 +21081,13 @@ class Interpretation extends Fields $hasPermissional = false; // add the permissional removal of values the user has not right to view or access if ($this->strictFieldExportPermissions - && isset($this->permissionFields[$viewName_single]) + && isset($this->permissionFields[$nameSingleCode]) && ComponentbuilderHelper::checkArray( - $this->permissionFields[$viewName_single] + $this->permissionFields[$nameSingleCode] )) { foreach ( - $this->permissionFields[$viewName_single] as $fieldName => + $this->permissionFields[$nameSingleCode] as $fieldName => $permission_options ) { @@ -20991,7 +21143,7 @@ class Interpretation extends Fields $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "{"; foreach ( - $this->permissionFields[$viewName_single] as $fieldName => + $this->permissionFields[$nameSingleCode] as $fieldName => $permission_options ) { @@ -21012,14 +21164,14 @@ class Interpretation extends Fields $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4) . "if (isset(\$item->" . $fieldName . ") && (!\$user->authorise('" - . $viewName_single . "." + . $nameSingleCode . "." . $permission_option . "." . $fieldName . "', 'com_" . $component . "." - . $viewName_single + . $nameSingleCode . ".' . (int) \$item->id)"; $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(5) . "|| !\$user->authorise('" - . $viewName_single . "." + . $nameSingleCode . "." . $permission_option . "." . $fieldName . "', 'com_" . $component . "')))"; $forEachStart .= PHP_EOL . $this->_t(1) . $tab @@ -21074,7 +21226,7 @@ class Interpretation extends Fields // add custom php to getitems method $fix .= $this->getCustomScriptBuilder( - 'php_getitems', $viewName_single, PHP_EOL . PHP_EOL . $tab + 'php_getitems', $nameSingleCode, PHP_EOL . PHP_EOL . $tab ); // load the encryption object if needed @@ -21100,16 +21252,16 @@ class Interpretation extends Fields } elseif (isset( $this->{$cryptionType - . 'FieldModelInitiator'}[$viewName_single] + . 'FieldModelInitiator'}[$nameSingleCode] ) && isset( $this->{$cryptionType - . 'FieldModelInitiator'}[$viewName_single]['get'] + . 'FieldModelInitiator'}[$nameSingleCode]['get'] )) { foreach ( $this->{$cryptionType - . 'FieldModelInitiator'}[$viewName_single]['get'] as + . 'FieldModelInitiator'}[$nameSingleCode]['get'] as $block ) { @@ -21127,7 +21279,7 @@ class Interpretation extends Fields return $script . $forEachStart . $fix; } - public function setClassHeaders($context, $viewName) + public function setClassHeaders($context, $viewsCodeName) { // set the defaults $headers = array(); @@ -21146,7 +21298,7 @@ class Interpretation extends Fields // Trigger Event: jcb_ce_setClassHeader $this->triggerEvent( 'jcb_ce_setClassHeader', - array(&$this->componentContext, &$context, &$viewName, + array(&$this->componentContext, &$context, &$viewsCodeName, &$headers) ); @@ -21154,7 +21306,7 @@ class Interpretation extends Fields return implode(PHP_EOL, $headers); } - protected function setModelFieldRelation($item, $viewName_list, $tab) + protected function setModelFieldRelation($item, $nameListCode, $tab) { $fix = ''; // set fields @@ -21171,7 +21323,7 @@ class Interpretation extends Fields foreach ($item['joinfields'] as $join) { $field['$item->{' . (int) $join . '}'] = '$item->' - . $this->listJoinBuilder[$viewName_list][(int) $join]['code']; + . $this->listJoinBuilder[$nameListCode][(int) $join]['code']; } } // set based on join_type @@ -21322,15 +21474,16 @@ class Interpretation extends Fields return $fix; } - public function setRouterCase($viewName) + public function setRouterCase($viewsCodeName) { - if (strlen($viewName) > 0) + if (strlen($viewsCodeName) > 0) { - $router = PHP_EOL . $this->_t(2) . "case '" . $viewName . "':"; + $router = PHP_EOL . $this->_t(2) . "case '" . $viewsCodeName . "':"; $router .= PHP_EOL . $this->_t(3) . "\$id = explode(':', \$segments[\$count-1]);"; $router .= PHP_EOL . $this->_t(3) . "\$vars['id'] = (int) \$id[0];"; - $router .= PHP_EOL . $this->_t(3) . "\$vars['view'] = '" . $viewName + $router .= PHP_EOL . $this->_t(3) . "\$vars['view'] = '" + . $viewsCodeName . "';"; $router .= PHP_EOL . $this->_t(2) . "break;"; @@ -22687,9 +22840,9 @@ class Interpretation extends Fields )) { // set component code name - $component = $this->componentCodeName; - $viewName = 'config'; - $listViewName = 'configs'; + $component = $this->componentCodeName; + $nameSingleCode = 'config'; + $nameListCode = 'configs'; // set place holders $placeholders = array(); $placeholders[$this->hhh . 'component' . $this->hhh] @@ -22703,9 +22856,9 @@ class Interpretation extends Fields $this->componentData->name_code, 'U' ); $placeholders[$this->hhh . 'view' . $this->hhh] - = $viewName; + = $nameSingleCode; $placeholders[$this->hhh . 'views' . $this->hhh] - = $listViewName; + = $nameListCode; $placeholders[$this->bbb . 'component' . $this->ddd] = $this->componentCodeName; $placeholders[$this->bbb . 'Component' . $this->ddd] @@ -22715,9 +22868,9 @@ class Interpretation extends Fields = $placeholders[$this->hhh . 'COMPONENT' . $this->hhh]; $placeholders[$this->bbb . 'view' . $this->ddd] - = $viewName; + = $nameSingleCode; $placeholders[$this->bbb . 'views' . $this->ddd] - = $listViewName; + = $nameListCode; // load the global placeholders if (ComponentbuilderHelper::checkArray( $this->globalPlaceholders @@ -22747,35 +22900,12 @@ class Interpretation extends Fields // build the config fields foreach ($this->componentData->config as $field) { - // check the field builder type - if ($this->fieldBuilderType == 1) - { - // string manipulation - $xmlField = $this->setDynamicField( - $field, $view, $viewType, $lang, $viewName, - $listViewName, $placeholders, $dbkey, false - ); - } - else - { - // simpleXMLElement class - $newxmlField = $this->setDynamicField( - $field, $view, $viewType, $lang, $viewName, - $listViewName, $placeholders, $dbkey, false - ); - if (isset($newxmlField->fieldXML)) - { - $xmlField = dom_import_simplexml( - $newxmlField->fieldXML - ); - $xmlField = PHP_EOL . $this->_t(1) . "' . PHP_EOL - . $this->_t(1) . $this->xmlPrettyPrint( - $xmlField, 'field' - ); - } - } + // get the xml string + $xmlField = $this->getFieldXMLString( + $field, $view, $viewType, $lang, $nameSingleCode, + $nameListCode, $placeholders, $dbkey, false + ); + // make sure the xml is set and a string if (isset($xmlField) && ComponentbuilderHelper::checkString( @@ -25527,14 +25657,14 @@ function vdm_dkim() { } } - public function setAccessSectionsCategory($viewName_single, $viewName_list) - { + public function setAccessSectionsCategory($nameSingleCode, $nameListCode + ) { $component = ''; // check if view has category - if (array_key_exists($viewName_single, $this->catCodeBuilder)) + if (array_key_exists($nameSingleCode, $this->catCodeBuilder)) { - $otherViews = $this->catCodeBuilder[$viewName_single]['views']; - if ($otherViews == $viewName_list) + $otherViews = $this->catCodeBuilder[$nameSingleCode]['views']; + if ($otherViews == $nameListCode) { $component .= PHP_EOL . $this->_t(1) . '
'; @@ -26030,10 +26160,10 @@ function vdm_dkim() { // set the views permissions now if (ComponentbuilderHelper::checkArray($this->permissionViews)) { - foreach ($this->permissionViews as $viewName => $actions) + foreach ($this->permissionViews as $viewsCodeName => $actions) { $componentViews[] = $this->_t(1) . '
'; + . $viewsCodeName . '">'; foreach ($actions as $action) { $componentViews[] = $this->_t(2) . $action; @@ -27363,61 +27493,23 @@ function vdm_dkim() { return $xml; } + /** + * build field set for an extention + * + * @param object $extension The extention object + * @param array $fields The fields to build + * @param string $dbkey The database key + * + * @return string The fields set in xml + * + */ public function getExtensionFieldsetXML(&$extension, &$fields, $dbkey = 'zz' ) { - // set some defaults - $view = ''; - $viewType = 0; // build the fieldset - $fieldset = ''; - - if (ComponentbuilderHelper::checkArray($fields)) - { - foreach ($fields as $field) - { - // check the field builder type - if ($this->fieldBuilderType == 1) - { - // string manipulation - $xmlField = $this->setDynamicField( - $field, $view, $viewType, $extension->lang_prefix, - $extension->key, $extension->key, - $this->globalPlaceholders, $dbkey, false - ); - } - else - { - // simpleXMLElement class - $newxmlField = $this->setDynamicField( - $field, $view, $viewType, $extension->lang_prefix, - $extension->key, $extension->key, - $this->globalPlaceholders, $dbkey, false - ); - if (isset($newxmlField->fieldXML)) - { - $xmlField = dom_import_simplexml( - $newxmlField->fieldXML - ); - $xmlField = PHP_EOL . $this->_t(2) . "' . PHP_EOL - . $this->_t(1) . $this->xmlPrettyPrint( - $xmlField, 'field' - ); - } - } - // make sure the xml is set and a string - if (isset($xmlField) - && ComponentbuilderHelper::checkString( - $xmlField - )) - { - $fieldset .= $xmlField; - } - } - } - - return $fieldset; + return $this->getFieldsetXML( + $fields, $extension->lang_prefix, $extension->key, $extension->key, + $this->globalPlaceholders, $dbkey + ); } public function getExtensionInstallClass(&$extension) diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 076b46b9e..9457d79a6 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -367,8 +367,8 @@ class Infusion extends Interpretation $this->lang = 'admin'; // set local names - $name_single_code = $view['settings']->name_single_code; - $name_list_code = $view['settings']->name_list_code; + $nameSingleCode = $view['settings']->name_single_code; + $nameListCode = $view['settings']->name_list_code; // set the view placeholders $this->setViewPlaceholders($view['settings']); @@ -381,68 +381,68 @@ class Infusion extends Interpretation && $view['edit_create_site_view'] > 0) { $site_edit_view_array[] = $this->_t(4) . "'" - . $name_single_code . "'"; + . $nameSingleCode . "'"; $this->lang = 'both'; // insure site view does not get removed $this->removeSiteEditFolder = false; } // check if help is being loaded - $this->checkHelp($name_single_code); + $this->checkHelp($nameSingleCode); // set custom admin view list links $this->setCustomAdminViewListLink( - $view, $name_list_code + $view, $nameListCode ); // set view array $viewarray[] = $this->_t(4) . "'" - . $name_single_code . "' => '" - . $name_list_code . "'"; + . $nameSingleCode . "' => '" + . $nameListCode . "'"; // set the view names if (isset($view['settings']->name_single) && $view['settings']->name_single != 'null') { // set license per view if needed $this->setLockLicensePer( - $name_single_code, $this->target + $nameSingleCode, $this->target ); $this->setLockLicensePer( - $name_list_code, $this->target + $nameListCode, $this->target ); // Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent $this->triggerEvent( 'jcb_ce_onBeforeBuildAdminEditViewContent', array(&$this->componentContext, &$view, - &$name_single_code, - &$name_list_code, + &$nameSingleCode, + &$nameListCode, &$this->fileContentStatic, - &$this->fileContentDynamic[$name_single_code], + &$this->fileContentDynamic[$nameSingleCode], &$this->placeholders, &$this->hhh) ); // FIELDSETS <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'FIELDSETS' . $this->hhh] = $this->setFieldSet( $view, $this->componentCodeName, - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // ACCESSCONTROL <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'ACCESSCONTROL' . $this->hhh] = $this->setFieldSetAccessControl( - $name_single_code + $nameSingleCode ); // LINKEDVIEWITEMS <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'LINKEDVIEWITEMS' . $this->hhh] = ''; // ADDTOOLBAR <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'ADDTOOLBAR' . $this->hhh] = $this->setAddToolBar($view); @@ -450,34 +450,34 @@ class Infusion extends Interpretation $this->buildTheViewScript($view); // VIEW_SCRIPT - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'VIEW_SCRIPT' . $this->hhh] = $this->setViewScript( - $name_single_code, 'fileScript' + $nameSingleCode, 'fileScript' ); // EDITBODYSCRIPT - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'EDITBODYSCRIPT' . $this->hhh] = $this->setViewScript( - $name_single_code, 'footerScript' + $nameSingleCode, 'footerScript' ); // AJAXTOKE <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'AJAXTOKE' . $this->hhh] = $this->setAjaxToke( - $name_single_code + $nameSingleCode ); // DOCUMENT_CUSTOM_PHP <<>> if ($phpDocument = $this->getCustomScriptBuilder( - 'php_document', $name_single_code, + 'php_document', $nameSingleCode, PHP_EOL, null, true, false )) { - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'DOCUMENT_CUSTOM_PHP' . $this->hhh] = str_replace( '$document->', '$this->document->', $phpDocument @@ -487,126 +487,126 @@ class Infusion extends Interpretation } else { - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'DOCUMENT_CUSTOM_PHP' . $this->hhh] = ''; } // LINKEDVIEWTABLESCRIPTS <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'LINKEDVIEWTABLESCRIPTS' . $this->hhh] = ''; // VALIDATEFIX <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'VALIDATIONFIX' . $this->hhh] = $this->setValidationFix( - $name_single_code, + $nameSingleCode, $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] ); // EDITBODY <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'EDITBODY' . $this->hhh] = $this->setEditBody($view); // EDITBODY <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'EDITBODYFADEIN' . $this->hhh] = $this->setFadeInEfect($view); // JTABLECONSTRUCTOR <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'JTABLECONSTRUCTOR' . $this->hhh] = $this->setJtableConstructor( - $name_single_code + $nameSingleCode ); // JTABLEALIASCATEGORY <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'JTABLEALIASCATEGORY' . $this->hhh] = $this->setJtableAliasCategory( - $name_single_code + $nameSingleCode ); // METHOD_GET_ITEM <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'METHOD_GET_ITEM' . $this->hhh] = $this->setMethodGetItem( - $name_single_code + $nameSingleCode ); // LINKEDVIEWGLOBAL <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] = ''; // LINKEDVIEWMETHODS <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'LINKEDVIEWMETHODS' . $this->hhh] = ''; // JMODELADMIN_BEFORE_DELETE <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'JMODELADMIN_BEFORE_DELETE' . $this->hhh] = $this->getCustomScriptBuilder( 'php_before_delete', - $name_single_code, PHP_EOL + $nameSingleCode, PHP_EOL ); // JMODELADMIN_AFTER_DELETE <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'JMODELADMIN_AFTER_DELETE' . $this->hhh] = $this->getCustomScriptBuilder( - 'php_after_delete', $name_single_code, + 'php_after_delete', $nameSingleCode, PHP_EOL . PHP_EOL ); // JMODELADMIN_BEFORE_DELETE <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'JMODELADMIN_BEFORE_PUBLISH' . $this->hhh] = $this->getCustomScriptBuilder( 'php_before_publish', - $name_single_code, PHP_EOL + $nameSingleCode, PHP_EOL ); // JMODELADMIN_AFTER_DELETE <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'JMODELADMIN_AFTER_PUBLISH' . $this->hhh] = $this->getCustomScriptBuilder( 'php_after_publish', - $name_single_code, PHP_EOL . PHP_EOL + $nameSingleCode, PHP_EOL . PHP_EOL ); // CHECKBOX_SAVE <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'CHECKBOX_SAVE' . $this->hhh] = $this->setCheckboxSave( - $name_single_code + $nameSingleCode ); // METHOD_ITEM_SAVE <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'METHOD_ITEM_SAVE' . $this->hhh] = $this->setMethodItemSave( - $name_single_code + $nameSingleCode ); // POSTSAVEHOOK <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'POSTSAVEHOOK' . $this->hhh] = $this->getCustomScriptBuilder( - 'php_postsavehook', $name_single_code, + 'php_postsavehook', $nameSingleCode, PHP_EOL, null, true, PHP_EOL . $this->_t(2) . "return;", PHP_EOL . PHP_EOL . $this->_t(2) . "return;" ); // VIEWCSS <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'VIEWCSS' . $this->hhh] = $this->getCustomScriptBuilder( - 'css_view', $name_single_code, '', + 'css_view', $nameSingleCode, '', null, true ); @@ -617,65 +617,65 @@ class Infusion extends Interpretation ) && $view['edit_create_site_view'] > 0) { - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'SITE_VIEWCSS' . $this->hhh] - = $this->fileContentDynamic[$name_single_code][$this->hhh + = $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'VIEWCSS' . $this->hhh]; // check if we should add a create menu if ($view['edit_create_site_view'] == 2) { // SITE_MENU_XML <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'SITE_MENU_XML' . $this->hhh] = $this->setAdminViewMenu( - $name_single_code, $view + $nameSingleCode, $view ); } // SITE_VIEW_CONTROLLER_HEADER <<>> add the header details for the model - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'SITE_ADMIN_VIEW_CONTROLLER_HEADER' . $this->hhh] = $this->setClassHeaders( 'site.admin.view.controller', - $name_single_code + $nameSingleCode ); // SITE_ADMIN_VIEW_MODEL_HEADER <<>> add the header details for the model - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'SITE_ADMIN_VIEW_MODEL_HEADER' . $this->hhh] = $this->setClassHeaders( 'site.admin.view.model', - $name_single_code + $nameSingleCode ); } // TABLAYOUTFIELDSARRAY <<>> add the tab layout fields array to the model - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'TABLAYOUTFIELDSARRAY' . $this->hhh] = $this->getTabLayoutFieldsArray( - $name_single_code + $nameSingleCode ); // ADMIN_VIEW_CONTROLLER_HEADER <<>> add the header details for the model - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'ADMIN_VIEW_CONTROLLER_HEADER' . $this->hhh] = $this->setClassHeaders( 'admin.view.controller', - $name_single_code + $nameSingleCode ); // ADMIN_VIEW_MODEL_HEADER <<>> add the header details for the model - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'ADMIN_VIEW_MODEL_HEADER' . $this->hhh] = $this->setClassHeaders( - 'admin.view.model', $name_single_code + 'admin.view.model', $nameSingleCode ); // Trigger Event: jcb_ce_onAfterBuildAdminEditViewContent $this->triggerEvent( 'jcb_ce_onAfterBuildAdminEditViewContent', array(&$this->componentContext, &$view, - &$name_single_code, - &$name_list_code, + &$nameSingleCode, + &$nameListCode, &$this->fileContentStatic, - &$this->fileContentDynamic[$name_single_code], + &$this->fileContentDynamic[$nameSingleCode], &$this->placeholders, &$this->hhh) ); } @@ -686,7 +686,7 @@ class Infusion extends Interpretation $this->lang = 'admin'; // ICOMOON <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'ICOMOON' . $this->hhh] = $view['icomoon']; @@ -694,10 +694,10 @@ class Infusion extends Interpretation $this->triggerEvent( 'jcb_ce_onBeforeBuildAdminListViewContent', array(&$this->componentContext, &$view, - &$name_single_code, - &$name_list_code, + &$nameSingleCode, + &$nameListCode, &$this->fileContentStatic, - &$this->fileContentDynamic[$name_list_code], + &$this->fileContentDynamic[$nameListCode], &$this->placeholders, &$this->hhh) ); @@ -705,22 +705,22 @@ class Infusion extends Interpretation if (isset($view['port']) && $view['port'] || 1 == $view['settings']->add_custom_import) { - $this->eximportView[$name_list_code] + $this->eximportView[$nameListCode] = true; if (1 == $view['settings']->add_custom_import) { // this view has custom import scripting - $this->importCustomScripts[$name_list_code] + $this->importCustomScripts[$nameListCode] = true; // set all custom scripts $this->setImportCustomScripts( - $name_list_code + $nameListCode ); } } else { - $this->eximportView[$name_list_code] + $this->eximportView[$nameListCode] = false; } @@ -728,111 +728,111 @@ class Infusion extends Interpretation if (isset($view['checkin']) && $view['checkin'] == 1) { // AUTOCHECKIN <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'AUTOCHECKIN' . $this->hhh] = $this->setAutoCheckin( - $name_single_code, + $nameSingleCode, $this->componentCodeName ); // CHECKINCALL <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'CHECKINCALL' . $this->hhh] = $this->setCheckinCall(); } else { // AUTOCHECKIN <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'AUTOCHECKIN' . $this->hhh] = ''; // CHECKINCALL <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'CHECKINCALL' . $this->hhh] = ''; } // admin list file contnet - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'ADMIN_JAVASCRIPT_FILE' . $this->hhh] = $this->setViewScript( - $name_list_code, 'list_fileScript' + $nameListCode, 'list_fileScript' ); // ADMIN_CUSTOM_BUTTONS_LIST - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'ADMIN_CUSTOM_BUTTONS_LIST' . $this->hhh] = $this->setCustomButtons($view, 3, $this->_t(1)); - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'ADMIN_CUSTOM_FUNCTION_ONLY_BUTTONS_LIST' . $this->hhh] = $this->setFunctionOnlyButtons( - $name_list_code + $nameListCode ); // GET_ITEMS_METHOD_STRING_FIX <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'GET_ITEMS_METHOD_STRING_FIX' . $this->hhh] = $this->setGetItemsMethodStringFix( - $name_single_code, - $name_list_code, + $nameSingleCode, + $nameListCode, $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] ); // GET_ITEMS_METHOD_AFTER_ALL <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'GET_ITEMS_METHOD_AFTER_ALL' . $this->hhh] = $this->getCustomScriptBuilder( 'php_getitems_after_all', - $name_single_code, PHP_EOL + $nameSingleCode, PHP_EOL ); // SELECTIONTRANSLATIONFIX <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'SELECTIONTRANSLATIONFIX' . $this->hhh] = $this->setSelectionTranslationFix( - $name_list_code, + $nameListCode, $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] ); // SELECTIONTRANSLATIONFIXFUNC <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'SELECTIONTRANSLATIONFIXFUNC' . $this->hhh] = $this->setSelectionTranslationFixFunc( - $name_list_code, + $nameListCode, $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] ); // FILTER_FIELDS <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'FILTER_FIELDS' . $this->hhh] = $this->setFilterFields( - $name_list_code + $nameListCode ); // STOREDID <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'STOREDID' . $this->hhh] - = $this->setStoredId($name_list_code); + = $this->setStoredId($nameListCode); // POPULATESTATE <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'POPULATESTATE' . $this->hhh] = $this->setPopulateState( - $name_single_code, $name_list_code + $nameSingleCode, $nameListCode ); // SORTFIELDS <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'SORTFIELDS' . $this->hhh] = $this->setSortFields( - $name_list_code + $nameListCode ); // CATEGORYFILTER <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'CATEGORYFILTER' . $this->hhh] = $this->setCategoryFilter( - $name_list_code + $nameListCode ); // CATEGORY_VIEWS @@ -848,120 +848,120 @@ class Infusion extends Interpretation $this->fileContentStatic[$this->hhh . 'ROUTER_CATEGORY_VIEWS' . $this->hhh] .= $this->setRouterCategoryViews( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // OTHERFILTERS <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'OTHERFILTERS' . $this->hhh] = $this->setOtherFilter( - $name_list_code + $nameListCode ); // FILTERFUNCTIONS <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'FILTERFUNCTIONS' . $this->hhh] = $this->setFilterFunctions( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // LISTQUERY <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'LISTQUERY' . $this->hhh] = $this->setListQuery( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // MODELEXPORTMETHOD <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'MODELEXPORTMETHOD' . $this->hhh] = $this->setGetItemsModelMethod( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // MODELEXIMPORTMETHOD <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'CONTROLLEREXIMPORTMETHOD' . $this->hhh] = $this->setControllerEximportMethod( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // EXPORTBUTTON <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'EXPORTBUTTON' . $this->hhh] = $this->setExportButton( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // IMPORTBUTTON <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'IMPORTBUTTON' . $this->hhh] = $this->setImportButton( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // LISTHEAD <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'LISTHEAD' . $this->hhh] = $this->setListHead( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // LISTBODY <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'LISTBODY' . $this->hhh] = $this->setListBody( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // LISTCOLNR <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'LISTCOLNR' . $this->hhh] = $this->setListColnr( - $name_list_code + $nameListCode ); // JVIEWLISTCANDO <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'JVIEWLISTCANDO' . $this->hhh] = $this->setJviewListCanDo( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // VIEWSCSS <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'VIEWSCSS' . $this->hhh] = $this->getCustomScriptBuilder( - 'css_views', $name_single_code, '', + 'css_views', $nameSingleCode, '', null, true ); // ADMIN_DIPLAY_METHOD <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'ADMIN_DIPLAY_METHOD' . $this->hhh] = $this->setAdminViewDisplayMethod( - $name_list_code + $nameListCode ); // VIEWS_FOOTER_SCRIPT <<>> $scriptNote = PHP_EOL . '//' . $this->setLine(__LINE__) - . ' ' . $name_list_code + . ' ' . $nameListCode . ' footer script'; - if ($footerScript = $this->getCustomScriptBuilder( - 'views_footer', $name_single_code, '', - $scriptNote, true, - false, PHP_EOL - )) + if (($footerScript = $this->getCustomScriptBuilder( + 'views_footer', $nameSingleCode, '', + $scriptNote, true, + false, PHP_EOL + )) !== false) { // only minfy if no php is added to the footer script if ($this->minify @@ -974,7 +974,7 @@ class Infusion extends Interpretation // clear some memory unset($minifier); } - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'VIEWS_FOOTER_SCRIPT' . $this->hhh] = PHP_EOL . '"; @@ -983,158 +983,158 @@ class Infusion extends Interpretation } else { - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'VIEWS_FOOTER_SCRIPT' . $this->hhh] = ''; } // ADMIN_VIEWS_CONTROLLER_HEADER <<>> add the header details for the model - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'ADMIN_VIEWS_CONTROLLER_HEADER' . $this->hhh] = $this->setClassHeaders( 'admin.views.controller', - $name_list_code + $nameListCode ); // ADMIN_VIEWS_MODEL_HEADER <<>> add the header details for the model - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'ADMIN_VIEWS_MODEL_HEADER' . $this->hhh] = $this->setClassHeaders( - 'admin.views.model', $name_list_code + 'admin.views.model', $nameListCode ); // Trigger Event: jcb_ce_onAfterBuildAdminListViewContent $this->triggerEvent( 'jcb_ce_onAfterBuildAdminListViewContent', array(&$this->componentContext, &$view, - &$name_single_code, - &$name_list_code, + &$nameSingleCode, + &$nameListCode, &$this->fileContentStatic, - &$this->fileContentDynamic[$name_list_code], + &$this->fileContentDynamic[$nameListCode], &$this->placeholders, &$this->hhh) ); } // set u fields used in batch - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'UNIQUEFIELDS' . $this->hhh] = $this->setUniqueFields( - $name_single_code + $nameSingleCode ); // TITLEALIASFIX <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'TITLEALIASFIX' . $this->hhh] = $this->setAliasTitleFix( - $name_single_code + $nameSingleCode ); // GENERATENEWTITLE <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'GENERATENEWTITLE' . $this->hhh] = $this->setGenerateNewTitle( - $name_single_code + $nameSingleCode ); // GENERATENEWALIAS <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'GENERATENEWALIAS' . $this->hhh] = $this->setGenerateNewAlias( - $name_single_code + $nameSingleCode ); // MODEL_BATCH_COPY <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'MODEL_BATCH_COPY' . $this->hhh] - = $this->setBatchCopy($name_single_code); + = $this->setBatchCopy($nameSingleCode); // MODEL_BATCH_MOVE <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'MODEL_BATCH_MOVE' . $this->hhh] - = $this->setBatchMove($name_single_code); + = $this->setBatchMove($nameSingleCode); // BATCH_ONCLICK_CANCEL_SCRIPT <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'BATCH_ONCLICK_CANCEL_SCRIPT' . $this->hhh] = ''; // TODO <-- must still be build // JCONTROLLERFORM_ALLOWADD <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'JCONTROLLERFORM_ALLOWADD' . $this->hhh] = $this->setJcontrollerAllowAdd( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // JCONTROLLERFORM_BEFORECANCEL <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'JCONTROLLERFORM_BEFORECANCEL' . $this->hhh] = $this->getCustomScriptBuilder( - 'php_before_cancel', $name_single_code, + 'php_before_cancel', $nameSingleCode, PHP_EOL, null, null, '' ); // JCONTROLLERFORM_AFTERCANCEL <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'JCONTROLLERFORM_AFTERCANCEL' . $this->hhh] = $this->getCustomScriptBuilder( - 'php_after_cancel', $name_single_code, + 'php_after_cancel', $nameSingleCode, PHP_EOL, null, null, '' ); // JCONTROLLERFORM_ALLOWEDIT <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'JCONTROLLERFORM_ALLOWEDIT' . $this->hhh] = $this->setJcontrollerAllowEdit( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // JMODELADMIN_GETFORM <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'JMODELADMIN_GETFORM' . $this->hhh] = $this->setJmodelAdminGetForm( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // JMODELADMIN_ALLOWEDIT <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'JMODELADMIN_ALLOWEDIT' . $this->hhh] = $this->setJmodelAdminAllowEdit( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // JMODELADMIN_CANDELETE <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'JMODELADMIN_CANDELETE' . $this->hhh] = $this->setJmodelAdminCanDelete( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // JMODELADMIN_CANEDITSTATE <<>> - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'JMODELADMIN_CANEDITSTATE' . $this->hhh] = $this->setJmodelAdminCanEditState( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // set custom admin view Toolbare buttons // CUSTOM_ADMIN_DYNAMIC_BUTTONS <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'CUSTOM_ADMIN_DYNAMIC_BUTTONS' . $this->hhh] = $this->setCustomAdminDynamicButton( - $name_list_code + $nameListCode ); // CUSTOM_ADMIN_DYNAMIC_BUTTONS_CONTROLLER <<>> - $this->fileContentDynamic[$name_list_code][$this->hhh + $this->fileContentDynamic[$nameListCode][$this->hhh . 'CUSTOM_ADMIN_DYNAMIC_BUTTONS_CONTROLLER' . $this->hhh] = $this->setCustomAdminDynamicButtonController( - $name_list_code + $nameListCode ); // set helper router @@ -1150,8 +1150,8 @@ class Infusion extends Interpretation $this->fileContentStatic[$this->hhh . 'ROUTEHELPER' . $this->hhh] .= $this->setRouterHelp( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); if (isset($view['edit_create_site_view']) @@ -1164,12 +1164,12 @@ class Infusion extends Interpretation $this->fileContentStatic[$this->hhh . 'ROUTER_PARSE_SWITCH' . $this->hhh] .= $this->routerParseSwitch( - $name_single_code, null, false + $nameSingleCode, null, false ); $this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS' . $this->hhh] .= $this->routerBuildViews( - $name_single_code + $nameSingleCode ); } @@ -1186,8 +1186,8 @@ class Infusion extends Interpretation $this->fileContentStatic[$this->hhh . 'ACCESS_SECTIONS' . $this->hhh] .= $this->setAccessSectionsCategory( - $name_single_code, - $name_list_code + $nameSingleCode, + $nameListCode ); // set the Joomla Fields ACCESS section if needed if (isset($view['joomla_fields']) @@ -1202,8 +1202,8 @@ class Infusion extends Interpretation $this->triggerEvent( 'jcb_ce_onAfterBuildAdminViewContent', array(&$this->componentContext, &$view, - &$name_single_code, - &$name_list_code, + &$nameSingleCode, + &$nameListCode, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh) @@ -2314,7 +2314,7 @@ class Infusion extends Interpretation if (isset($view->name_single) && $view->name_single != 'null') { // set main keys - $name_single_code = $view->name_single_code; + $nameSingleCode = $view->name_single_code; $name_single_uppercase = ComponentbuilderHelper::safeString( $view->name_single, 'U' ); @@ -2324,13 +2324,13 @@ class Infusion extends Interpretation // set some place holder for the views $this->placeholders[$this->hhh . 'view' . $this->hhh] - = $name_single_code; + = $nameSingleCode; $this->placeholders[$this->hhh . 'View' . $this->hhh] = $name_single_first_uppercase; $this->placeholders[$this->hhh . 'VIEW' . $this->hhh] = $name_single_uppercase; $this->placeholders[$this->bbb . 'view' . $this->ddd] - = $name_single_code; + = $nameSingleCode; $this->placeholders[$this->bbb . 'View' . $this->ddd] = $name_single_first_uppercase; $this->placeholders[$this->bbb . 'VIEW' . $this->ddd] @@ -2340,7 +2340,7 @@ class Infusion extends Interpretation // VIEWS <<>> if (isset($view->name_list) && $view->name_list != 'null') { - $name_list_code = $view->name_list_code; + $nameListCode = $view->name_list_code; $name_list_uppercase = ComponentbuilderHelper::safeString( $view->name_list, 'U' ); @@ -2350,13 +2350,13 @@ class Infusion extends Interpretation // set some place holder for the views $this->placeholders[$this->hhh . 'views' . $this->hhh] - = $name_list_code; + = $nameListCode; $this->placeholders[$this->hhh . 'Views' . $this->hhh] = $name_list_first_uppercase; $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh] = $name_list_uppercase; $this->placeholders[$this->bbb . 'views' . $this->ddd] - = $name_list_code; + = $nameListCode; $this->placeholders[$this->bbb . 'Views' . $this->ddd] = $name_list_first_uppercase; $this->placeholders[$this->bbb . 'VIEWS' . $this->ddd] @@ -2364,56 +2364,56 @@ class Infusion extends Interpretation } // view <<>> - if (isset($name_single_code)) + if (isset($nameSingleCode)) { - $this->fileContentDynamic[$name_single_code][$this->hhh . 'view' + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'view' . $this->hhh] - = $name_single_code; - $this->fileContentDynamic[$name_single_code][$this->hhh . 'VIEW' + = $nameSingleCode; + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'VIEW' . $this->hhh] = $name_single_uppercase; - $this->fileContentDynamic[$name_single_code][$this->hhh . 'View' + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'View' . $this->hhh] = $name_single_first_uppercase; - if (isset($name_list_code)) + if (isset($nameListCode)) { - $this->fileContentDynamic[$name_list_code][$this->hhh . 'view' + $this->fileContentDynamic[$nameListCode][$this->hhh . 'view' . $this->hhh] - = $name_single_code; - $this->fileContentDynamic[$name_list_code][$this->hhh . 'VIEW' + = $nameSingleCode; + $this->fileContentDynamic[$nameListCode][$this->hhh . 'VIEW' . $this->hhh] = $name_single_uppercase; - $this->fileContentDynamic[$name_list_code][$this->hhh . 'View' + $this->fileContentDynamic[$nameListCode][$this->hhh . 'View' . $this->hhh] = $name_single_first_uppercase; } } // views <<>> - if (isset($name_list_code)) + if (isset($nameListCode)) { - $this->fileContentDynamic[$name_list_code][$this->hhh . 'views' + $this->fileContentDynamic[$nameListCode][$this->hhh . 'views' . $this->hhh] - = $name_list_code; - $this->fileContentDynamic[$name_list_code][$this->hhh . 'VIEWS' + = $nameListCode; + $this->fileContentDynamic[$nameListCode][$this->hhh . 'VIEWS' . $this->hhh] = $name_list_uppercase; - $this->fileContentDynamic[$name_list_code][$this->hhh . 'Views' + $this->fileContentDynamic[$nameListCode][$this->hhh . 'Views' . $this->hhh] = $name_list_first_uppercase; - if (isset($name_single_code)) + if (isset($nameSingleCode)) { - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'views' . $this->hhh] - = $name_list_code; - $this->fileContentDynamic[$name_single_code][$this->hhh + = $nameListCode; + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'VIEWS' . $this->hhh] = $name_list_uppercase; - $this->fileContentDynamic[$name_single_code][$this->hhh + $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'Views' . $this->hhh] = $name_list_first_uppercase; diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index c6a7fc1f5..bfb988e87 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -4805,7 +4805,7 @@ COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC="Allows users in this group to edit vers COM_COMPONENTBUILDER_EDIT_VIEW="Edit View" COM_COMPONENTBUILDER_EMAIL="Email" COM_COMPONENTBUILDER_EMAIL_S="Email %s" -COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND="Email with the new key was send" +COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SENT="Email with the new key was sent" COM_COMPONENTBUILDER_EMCOMPANYEM_BSB="Company: %s" COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB="Copyright: %s" COM_COMPONENTBUILDER_EMEMAILEM_BSB="Email: %s" diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 6dd8b098d..70fc90ca9 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1906,7 +1906,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls -- INSERT INTO `#__componentbuilder_joomla_component` (`id`, `add_license`, `license_type`, `mvc_versiondate`, `add_css_admin`, `add_css_site`, `add_email_helper`, `add_javascript`, `add_php_helper_admin`, `add_php_helper_both`, `add_php_helper_site`, `add_php_postflight_install`, `add_php_method_uninstall`, `add_php_postflight_update`, `add_php_preflight_install`, `add_php_preflight_update`, `add_placeholders`, `add_sql`, `add_sql_uninstall`, `addfootable`, `adduikit`, `add_admin_event`, `add_site_event`, `add_update_server`, `add_sales_server`, `sales_server`, `update_server`, `update_server_target`, `update_server_url`, `php_admin_event`, `php_site_event`, `addreadme`, `readme`, `author`, `bom`, `buildcomp`, `buildcompsql`, `companyname`, `component_version`, `copyright`, `creatuserhelper`, `css_admin`, `css_site`, `dashboard`, `dashboard_type`, `debug_linenr`, `description`, `email`, `emptycontributors`, `export_buy_link`, `joomla_source_link`, `export_key`, `image`, `javascript`, `license`, `name`, `system_name`, `toignore`, `name_code`, `number`, `php_helper_admin`, `php_helper_both`, `php_helper_site`, `php_postflight_install`, `php_method_uninstall`, `php_postflight_update`, `php_preflight_install`, `php_preflight_update`, `short_description`, `sql`, `sql_uninstall`, `website`, `published`, `created`, `modified`, `hits`, `ordering`, `whmcs_key`, `whmcs_url`, `guid`) VALUES -(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10oIyMjQVVUSE9SV0VCU0lURSMjIykNCisgKkZpcnN0IEJ1aWxkKjogIyMjQ1JFQVRJT05EQVRFIyMjDQorICpMYXN0IEJ1aWxkKjogIyMjQlVJTEREQVRFIyMjDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKyAqQ29weXJpZ2h0KjogIyMjQ09QWVJJR0hUIyMjDQorICpMaWNlbnNlKjogIyMjTElDRU5TRSMjIw0KDQojIyBCdWlsZCBUaW1lDQoNCioqIyMjdG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjdG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqIChhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNhdmVkIC0NCmR1ZSB0byBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKSkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gbmV2ZXIgbWFraW5nIG9uZSBtaXN0YWtlIG9yIHRha2luZyBhbnkgY29mZmVlIGJyZWFrLikNCg0KKyAqTGluZSBjb3VudCo6ICoqIyMjTElORV9DT1VOVCMjIyoqDQorICpGaWxlIGNvdW50KjogKiojIyNGSUxFX0NPVU5UIyMjKioNCisgKkZvbGRlciBjb3VudCo6ICoqIyMjRk9MREVSX0NPVU5UIyMjKioNCg0KKiojIyNhY3R1YWxIb3Vyc1NwZW50IyMjIEhvdXJzKiogb3IgKiojIyNhY3R1YWxEYXlzU3BlbnQjIyMgRWlnaHQgSG91ciBEYXlzKiogKHRoZSBhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNwZW50KQ0KDQo+ICh3aXRoIHRoZSBmb2xsb3dpbmcgYnJlYWsgZG93bjoNCj4gKipkZWJ1Z2dpbmcgQCMjI2RlYnVnZ2luZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA0Ow0KPiAqKnBsYW5uaW5nIEAjIyNwbGFubmluZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA3Ow0KPiAqKm1hcHBpbmcgQCMjI21hcHBpbmdIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gMTA7DQo+ICoqb2ZmaWNlIEAjIyNvZmZpY2VIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gNjspDQoNCioqIyMjYWN0dWFsVG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjYWN0dWFsVG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqDQooYSB0b3RhbCBvZiB0aGUgcmVhbGlzdGljIHRpbWUgZnJhbWUgZm9yIHRoaXMgcHJvamVjdCkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gd2l0aCB0aGUgbm9ybWFsIGV2ZXJ5ZGF5IHJlYWxpdGllcyBhdCB0aGUgb2ZmaWNlLCB0aGF0IGluY2x1ZGVzIHRoZSBjb21wb25lbnQgcGxhbm5pbmcsIG1hcHBpbmcgJiBkZWJ1Z2dpbmcuKQ0KDQpQcm9qZWN0IGR1cmF0aW9uOiAqKiMjI3Byb2plY3RXZWVrVGltZSMjIyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCltDVVNUT01DT0RFPXJlYWRNRWNvbnRyaWJ1dG9yc10=', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.3', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'https://github.com/Llewellynvdm/Joomla-Demo-Component', 'hcYWdyvSGveEnSAqqDG8ybLDgwZ50qMcicGZ3GYQkHc=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo (public)', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZyBpcyBhIHZhbGlkIHRpbWUgc3RhbXANCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGlzVmFsaWRUaW1lU3RhbXAoJHRpbWVzdGFtcCkNCgl7DQoJCXJldHVybiAoKGludCkgJHRpbWVzdGFtcCA9PT0gJHRpbWVzdGFtcCkNCgkJJiYgKCR0aW1lc3RhbXAgPD0gUEhQX0lOVF9NQVgpDQoJCSYmICgkdGltZXN0YW1wID49IH5QSFBfSU5UX01BWCk7DQoJfQ0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ1RoaXMgaXMgYSBkZW1vIGNvbXBvbmVudCBkZXZlbG9wZWQgaW4gPGEgaHJlZj0iaHR0cDovL3ZkbS5iei9jb21wb25lbnQtYnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+SkNCPC9hPiEgWW91IGNhbiBidWlsZCBtb3JlIGNvbXBvbmVudHMgbGlrZSB0aGlzIHdpdGggSkNCLCBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2020-11-17 17:19:57', '', 3, 'G2Rww7JuEI+de+Bm1ljKg72Hgt3MUfutTh1P15UayKU=', '', 'efde995e-60aa-4b39-b644-44349dfb660d'); +(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10oIyMjQVVUSE9SV0VCU0lURSMjIykNCisgKkZpcnN0IEJ1aWxkKjogIyMjQ1JFQVRJT05EQVRFIyMjDQorICpMYXN0IEJ1aWxkKjogIyMjQlVJTEREQVRFIyMjDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKyAqQ29weXJpZ2h0KjogIyMjQ09QWVJJR0hUIyMjDQorICpMaWNlbnNlKjogIyMjTElDRU5TRSMjIw0KDQojIyBCdWlsZCBUaW1lDQoNCioqIyMjdG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjdG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqIChhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNhdmVkIC0NCmR1ZSB0byBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKSkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gbmV2ZXIgbWFraW5nIG9uZSBtaXN0YWtlIG9yIHRha2luZyBhbnkgY29mZmVlIGJyZWFrLikNCg0KKyAqTGluZSBjb3VudCo6ICoqIyMjTElORV9DT1VOVCMjIyoqDQorICpGaWxlIGNvdW50KjogKiojIyNGSUxFX0NPVU5UIyMjKioNCisgKkZvbGRlciBjb3VudCo6ICoqIyMjRk9MREVSX0NPVU5UIyMjKioNCg0KKiojIyNhY3R1YWxIb3Vyc1NwZW50IyMjIEhvdXJzKiogb3IgKiojIyNhY3R1YWxEYXlzU3BlbnQjIyMgRWlnaHQgSG91ciBEYXlzKiogKHRoZSBhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNwZW50KQ0KDQo+ICh3aXRoIHRoZSBmb2xsb3dpbmcgYnJlYWsgZG93bjoNCj4gKipkZWJ1Z2dpbmcgQCMjI2RlYnVnZ2luZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA0Ow0KPiAqKnBsYW5uaW5nIEAjIyNwbGFubmluZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA3Ow0KPiAqKm1hcHBpbmcgQCMjI21hcHBpbmdIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gMTA7DQo+ICoqb2ZmaWNlIEAjIyNvZmZpY2VIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gNjspDQoNCioqIyMjYWN0dWFsVG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjYWN0dWFsVG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqDQooYSB0b3RhbCBvZiB0aGUgcmVhbGlzdGljIHRpbWUgZnJhbWUgZm9yIHRoaXMgcHJvamVjdCkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gd2l0aCB0aGUgbm9ybWFsIGV2ZXJ5ZGF5IHJlYWxpdGllcyBhdCB0aGUgb2ZmaWNlLCB0aGF0IGluY2x1ZGVzIHRoZSBjb21wb25lbnQgcGxhbm5pbmcsIG1hcHBpbmcgJiBkZWJ1Z2dpbmcuKQ0KDQpQcm9qZWN0IGR1cmF0aW9uOiAqKiMjI3Byb2plY3RXZWVrVGltZSMjIyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCltDVVNUT01DT0RFPXJlYWRNRWNvbnRyaWJ1dG9yc10=', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.3', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'https://github.com/Llewellynvdm/Joomla-Demo-Component', 'hcYWdyvSGveEnSAqqDG8ybLDgwZ50qMcicGZ3GYQkHc=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo (public)', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZyBpcyBhIHZhbGlkIHRpbWUgc3RhbXANCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGlzVmFsaWRUaW1lU3RhbXAoJHRpbWVzdGFtcCkNCgl7DQoJCXJldHVybiAoKGludCkgJHRpbWVzdGFtcCA9PT0gJHRpbWVzdGFtcCkNCgkJJiYgKCR0aW1lc3RhbXAgPD0gUEhQX0lOVF9NQVgpDQoJCSYmICgkdGltZXN0YW1wID49IH5QSFBfSU5UX01BWCk7DQoJfQ0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ1RoaXMgaXMgYSBkZW1vIGNvbXBvbmVudCBkZXZlbG9wZWQgaW4gPGEgaHJlZj0iaHR0cDovL3ZkbS5iei9jb21wb25lbnQtYnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+SkNCPC9hPiEgWW91IGNhbiBidWlsZCBtb3JlIGNvbXBvbmVudHMgbGlrZSB0aGlzIHdpdGggSkNCLCBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2020-11-17 17:19:57', '', 10, 'G2Rww7JuEI+de+Bm1ljKg72Hgt3MUfutTh1P15UayKU=', '', 'efde995e-60aa-4b39-b644-44349dfb660d'); -- -- Dumping data for table `#__componentbuilder_admin_view` diff --git a/admin/views/admin_views/tmpl/default_body.php b/admin/views/admin_views/tmpl/default_body.php index 68ff88010..2a4672bb4 100644 --- a/admin/views/admin_views/tmpl/default_body.php +++ b/admin/views/admin_views/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=admin_views&task=admin_view.
get('admin_view.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/admin_views/tmpl/default_head.php b/admin/views/admin_views/tmpl/default_head.php index 621a037fd..67725fabb 100644 --- a/admin/views/admin_views/tmpl/default_head.php +++ b/admin/views/admin_views/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
get('admin_custom_tabs.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/admins_custom_tabs/tmpl/default_head.php b/admin/views/admins_custom_tabs/tmpl/default_head.php index aa849a813..dd912b16f 100644 --- a/admin/views/admins_custom_tabs/tmpl/default_head.php +++ b/admin/views/admins_custom_tabs/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/admins_custom_tabs/view.html.php b/admin/views/admins_custom_tabs/view.html.php index 826f01f50..7225c0e97 100644 --- a/admin/views/admins_custom_tabs/view.html.php +++ b/admin/views/admins_custom_tabs/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewAdmins_custom_tabs extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewAdmins_custom_tabs extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/admins_fields/tmpl/default.php b/admin/views/admins_fields/tmpl/default.php index 61a8b37dd..7dccc39d3 100644 --- a/admin/views/admins_fields/tmpl/default.php +++ b/admin/views/admins_fields/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/admins_fields/tmpl/default_body.php b/admin/views/admins_fields/tmpl/default_body.php index 50cab67ab..b1e5aba8f 100644 --- a/admin/views/admins_fields/tmpl/default_body.php +++ b/admin/views/admins_fields/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=admins_fields&task=admin_fie get('admin_fields.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/admins_fields/tmpl/default_head.php b/admin/views/admins_fields/tmpl/default_head.php index 087352029..721e4daf0 100644 --- a/admin/views/admins_fields/tmpl/default_head.php +++ b/admin/views/admins_fields/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/admins_fields/view.html.php b/admin/views/admins_fields/view.html.php index 602d3b89d..307295363 100644 --- a/admin/views/admins_fields/view.html.php +++ b/admin/views/admins_fields/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/admins_fields_conditions/tmpl/default.php b/admin/views/admins_fields_conditions/tmpl/default.php index b04fdb62a..3ab5688cc 100644 --- a/admin/views/admins_fields_conditions/tmpl/default.php +++ b/admin/views/admins_fields_conditions/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/admins_fields_conditions/tmpl/default_body.php b/admin/views/admins_fields_conditions/tmpl/default_body.php index 3b28f7d3d..20bfe6ec5 100644 --- a/admin/views/admins_fields_conditions/tmpl/default_body.php +++ b/admin/views/admins_fields_conditions/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=admins_fields_conditions&tas get('admin_fields_conditions.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/admins_fields_conditions/tmpl/default_head.php b/admin/views/admins_fields_conditions/tmpl/default_head.php index 9b77e90aa..5293adc66 100644 --- a/admin/views/admins_fields_conditions/tmpl/default_head.php +++ b/admin/views/admins_fields_conditions/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/admins_fields_conditions/view.html.php b/admin/views/admins_fields_conditions/view.html.php index 76e25b0c3..ed507b146 100644 --- a/admin/views/admins_fields_conditions/view.html.php +++ b/admin/views/admins_fields_conditions/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/admins_fields_relations/tmpl/default.php b/admin/views/admins_fields_relations/tmpl/default.php index 457b13264..78be3e631 100644 --- a/admin/views/admins_fields_relations/tmpl/default.php +++ b/admin/views/admins_fields_relations/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/admins_fields_relations/tmpl/default_body.php b/admin/views/admins_fields_relations/tmpl/default_body.php index 0b49c1189..91e2953e3 100644 --- a/admin/views/admins_fields_relations/tmpl/default_body.php +++ b/admin/views/admins_fields_relations/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=admins_fields_relations&task get('admin_fields_relations.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/admins_fields_relations/tmpl/default_head.php b/admin/views/admins_fields_relations/tmpl/default_head.php index 7ed86a441..a205db3c1 100644 --- a/admin/views/admins_fields_relations/tmpl/default_head.php +++ b/admin/views/admins_fields_relations/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/admins_fields_relations/view.html.php b/admin/views/admins_fields_relations/view.html.php index 836528945..9e7e4b5c4 100644 --- a/admin/views/admins_fields_relations/view.html.php +++ b/admin/views/admins_fields_relations/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewAdmins_fields_relations extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewAdmins_fields_relations extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/class_extendings/tmpl/default.php b/admin/views/class_extendings/tmpl/default.php index cf196e3d1..8bcf84882 100644 --- a/admin/views/class_extendings/tmpl/default.php +++ b/admin/views/class_extendings/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/class_extendings/tmpl/default_body.php b/admin/views/class_extendings/tmpl/default_body.php index 41e8bacc1..63c61ea8c 100644 --- a/admin/views/class_extendings/tmpl/default_body.php +++ b/admin/views/class_extendings/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=class_extendings&task=class_ get('class_extends.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/class_extendings/tmpl/default_head.php b/admin/views/class_extendings/tmpl/default_head.php index a0eb35c71..2a48fce9b 100644 --- a/admin/views/class_extendings/tmpl/default_head.php +++ b/admin/views/class_extendings/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/class_extendings/view.html.php b/admin/views/class_extendings/view.html.php index 280e3a8a4..2190bff01 100644 --- a/admin/views/class_extendings/view.html.php +++ b/admin/views/class_extendings/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewClass_extendings extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -249,7 +249,7 @@ class ComponentbuilderViewClass_extendings extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_CLASS_EXTENDS_NAME_LABEL'), 'a.extension_type' => JText::_('COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE_LABEL'), diff --git a/admin/views/class_methods/tmpl/default.php b/admin/views/class_methods/tmpl/default.php index 95414bd34..f93ca7f7f 100644 --- a/admin/views/class_methods/tmpl/default.php +++ b/admin/views/class_methods/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/class_methods/tmpl/default_body.php b/admin/views/class_methods/tmpl/default_body.php index 16356746d..13ab49b99 100644 --- a/admin/views/class_methods/tmpl/default_body.php +++ b/admin/views/class_methods/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=class_methods&task=class_met get('class_method.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/class_methods/tmpl/default_head.php b/admin/views/class_methods/tmpl/default_head.php index 929bc3cc1..65d83aa93 100644 --- a/admin/views/class_methods/tmpl/default_head.php +++ b/admin/views/class_methods/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/class_methods/view.html.php b/admin/views/class_methods/view.html.php index 4c8fd1d21..d8f433b8b 100644 --- a/admin/views/class_methods/view.html.php +++ b/admin/views/class_methods/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewClass_methods extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -289,7 +289,7 @@ class ComponentbuilderViewClass_methods extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_NAME_LABEL'), 'a.visibility' => JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY_LABEL'), diff --git a/admin/views/class_properties/tmpl/default.php b/admin/views/class_properties/tmpl/default.php index 42f995783..4cdb2ccd4 100644 --- a/admin/views/class_properties/tmpl/default.php +++ b/admin/views/class_properties/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/class_properties/tmpl/default_body.php b/admin/views/class_properties/tmpl/default_body.php index ab07f6591..c7b6256d4 100644 --- a/admin/views/class_properties/tmpl/default_body.php +++ b/admin/views/class_properties/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=class_properties&task=class_ get('class_property.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/class_properties/tmpl/default_head.php b/admin/views/class_properties/tmpl/default_head.php index 455f8bf58..17263d2a3 100644 --- a/admin/views/class_properties/tmpl/default_head.php +++ b/admin/views/class_properties/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/class_properties/view.html.php b/admin/views/class_properties/view.html.php index 23bbe8de1..0920beef9 100644 --- a/admin/views/class_properties/view.html.php +++ b/admin/views/class_properties/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewClass_properties extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -289,7 +289,7 @@ class ComponentbuilderViewClass_properties extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_NAME_LABEL'), 'a.visibility' => JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_LABEL'), diff --git a/admin/views/components_admin_views/tmpl/default.php b/admin/views/components_admin_views/tmpl/default.php index 266415998..14bc2391f 100644 --- a/admin/views/components_admin_views/tmpl/default.php +++ b/admin/views/components_admin_views/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/components_admin_views/tmpl/default_body.php b/admin/views/components_admin_views/tmpl/default_body.php index 32ef39896..13c6df719 100644 --- a/admin/views/components_admin_views/tmpl/default_body.php +++ b/admin/views/components_admin_views/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_admin_views&task= get('component_admin_views.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/components_admin_views/tmpl/default_head.php b/admin/views/components_admin_views/tmpl/default_head.php index 32c323caa..6c291c3a4 100644 --- a/admin/views/components_admin_views/tmpl/default_head.php +++ b/admin/views/components_admin_views/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/components_admin_views/view.html.php b/admin/views/components_admin_views/view.html.php index b2451a3b0..8aae9c781 100644 --- a/admin/views/components_admin_views/view.html.php +++ b/admin/views/components_admin_views/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_config/tmpl/default.php b/admin/views/components_config/tmpl/default.php index 8edd52a0c..236784fb6 100644 --- a/admin/views/components_config/tmpl/default.php +++ b/admin/views/components_config/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/components_config/tmpl/default_body.php b/admin/views/components_config/tmpl/default_body.php index 787105352..b0a4e1ffa 100644 --- a/admin/views/components_config/tmpl/default_body.php +++ b/admin/views/components_config/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_config&task=compo get('component_config.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/components_config/tmpl/default_head.php b/admin/views/components_config/tmpl/default_head.php index 19bb34c25..17baaa72c 100644 --- a/admin/views/components_config/tmpl/default_head.php +++ b/admin/views/components_config/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/components_config/view.html.php b/admin/views/components_config/view.html.php index b3193256b..a9085c5bb 100644 --- a/admin/views/components_config/view.html.php +++ b/admin/views/components_config/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewComponents_config extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewComponents_config extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_custom_admin_menus/tmpl/default.php b/admin/views/components_custom_admin_menus/tmpl/default.php index ea35f2709..8641f277c 100644 --- a/admin/views/components_custom_admin_menus/tmpl/default.php +++ b/admin/views/components_custom_admin_menus/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/components_custom_admin_menus/tmpl/default_body.php b/admin/views/components_custom_admin_menus/tmpl/default_body.php index 4ac3820d0..7cd7b7644 100644 --- a/admin/views/components_custom_admin_menus/tmpl/default_body.php +++ b/admin/views/components_custom_admin_menus/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_custom_admin_menu get('component_custom_admin_menus.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/components_custom_admin_menus/tmpl/default_head.php b/admin/views/components_custom_admin_menus/tmpl/default_head.php index e8cd208bc..342dbb186 100644 --- a/admin/views/components_custom_admin_menus/tmpl/default_head.php +++ b/admin/views/components_custom_admin_menus/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/components_custom_admin_menus/view.html.php b/admin/views/components_custom_admin_menus/view.html.php index 7d3d238e6..8905f5279 100644 --- a/admin/views/components_custom_admin_menus/view.html.php +++ b/admin/views/components_custom_admin_menus/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_custom_admin_views/tmpl/default.php b/admin/views/components_custom_admin_views/tmpl/default.php index 0fde9afd2..95658c7ed 100644 --- a/admin/views/components_custom_admin_views/tmpl/default.php +++ b/admin/views/components_custom_admin_views/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/components_custom_admin_views/tmpl/default_body.php b/admin/views/components_custom_admin_views/tmpl/default_body.php index fd6372b92..2951e29b2 100644 --- a/admin/views/components_custom_admin_views/tmpl/default_body.php +++ b/admin/views/components_custom_admin_views/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_custom_admin_view get('component_custom_admin_views.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/components_custom_admin_views/tmpl/default_head.php b/admin/views/components_custom_admin_views/tmpl/default_head.php index b171bddbc..4283f651e 100644 --- a/admin/views/components_custom_admin_views/tmpl/default_head.php +++ b/admin/views/components_custom_admin_views/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/components_custom_admin_views/view.html.php b/admin/views/components_custom_admin_views/view.html.php index 005aed9c6..1d7173d66 100644 --- a/admin/views/components_custom_admin_views/view.html.php +++ b/admin/views/components_custom_admin_views/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_dashboard/tmpl/default.php b/admin/views/components_dashboard/tmpl/default.php index da24d5cdc..35c258e27 100644 --- a/admin/views/components_dashboard/tmpl/default.php +++ b/admin/views/components_dashboard/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/components_dashboard/tmpl/default_body.php b/admin/views/components_dashboard/tmpl/default_body.php index 0d47839d0..605f361da 100644 --- a/admin/views/components_dashboard/tmpl/default_body.php +++ b/admin/views/components_dashboard/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_dashboard&task=co get('component_dashboard.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/components_dashboard/tmpl/default_head.php b/admin/views/components_dashboard/tmpl/default_head.php index 618ea8dce..e403d6242 100644 --- a/admin/views/components_dashboard/tmpl/default_head.php +++ b/admin/views/components_dashboard/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/components_dashboard/view.html.php b/admin/views/components_dashboard/view.html.php index b5b26ea2b..a9b927e9d 100644 --- a/admin/views/components_dashboard/view.html.php +++ b/admin/views/components_dashboard/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_files_folders/tmpl/default.php b/admin/views/components_files_folders/tmpl/default.php index 1e6cb2418..382ebe1c2 100644 --- a/admin/views/components_files_folders/tmpl/default.php +++ b/admin/views/components_files_folders/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/components_files_folders/tmpl/default_body.php b/admin/views/components_files_folders/tmpl/default_body.php index ccf4b38d4..b86a3e2e5 100644 --- a/admin/views/components_files_folders/tmpl/default_body.php +++ b/admin/views/components_files_folders/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_files_folders&tas get('component_files_folders.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/components_files_folders/tmpl/default_head.php b/admin/views/components_files_folders/tmpl/default_head.php index 1b9c11dca..cefcc65c4 100644 --- a/admin/views/components_files_folders/tmpl/default_head.php +++ b/admin/views/components_files_folders/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/components_files_folders/view.html.php b/admin/views/components_files_folders/view.html.php index 394673df3..9e51c47c9 100644 --- a/admin/views/components_files_folders/view.html.php +++ b/admin/views/components_files_folders/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_modules/tmpl/default.php b/admin/views/components_modules/tmpl/default.php index f048d2109..58c4b9242 100644 --- a/admin/views/components_modules/tmpl/default.php +++ b/admin/views/components_modules/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/components_modules/tmpl/default_body.php b/admin/views/components_modules/tmpl/default_body.php index 6fb3c30d6..e5ccfc157 100644 --- a/admin/views/components_modules/tmpl/default_body.php +++ b/admin/views/components_modules/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_modules&task=comp get('component_modules.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/components_modules/tmpl/default_head.php b/admin/views/components_modules/tmpl/default_head.php index 85913a239..7f756c199 100644 --- a/admin/views/components_modules/tmpl/default_head.php +++ b/admin/views/components_modules/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/components_modules/view.html.php b/admin/views/components_modules/view.html.php index 3fa8ec0e6..0148c7e84 100644 --- a/admin/views/components_modules/view.html.php +++ b/admin/views/components_modules/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewComponents_modules extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewComponents_modules extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_mysql_tweaks/tmpl/default.php b/admin/views/components_mysql_tweaks/tmpl/default.php index 62f392248..e8da76ced 100644 --- a/admin/views/components_mysql_tweaks/tmpl/default.php +++ b/admin/views/components_mysql_tweaks/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/components_mysql_tweaks/tmpl/default_body.php b/admin/views/components_mysql_tweaks/tmpl/default_body.php index 01dc7d53b..8cb04f35c 100644 --- a/admin/views/components_mysql_tweaks/tmpl/default_body.php +++ b/admin/views/components_mysql_tweaks/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_mysql_tweaks&task get('component_mysql_tweaks.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/components_mysql_tweaks/tmpl/default_head.php b/admin/views/components_mysql_tweaks/tmpl/default_head.php index aca99e265..66bd7bf1c 100644 --- a/admin/views/components_mysql_tweaks/tmpl/default_head.php +++ b/admin/views/components_mysql_tweaks/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/components_mysql_tweaks/view.html.php b/admin/views/components_mysql_tweaks/view.html.php index 811e24274..e231a83d1 100644 --- a/admin/views/components_mysql_tweaks/view.html.php +++ b/admin/views/components_mysql_tweaks/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_placeholders/tmpl/default.php b/admin/views/components_placeholders/tmpl/default.php index 3612ef1b1..3d92b31a4 100644 --- a/admin/views/components_placeholders/tmpl/default.php +++ b/admin/views/components_placeholders/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/components_placeholders/tmpl/default_body.php b/admin/views/components_placeholders/tmpl/default_body.php index 5ca8905e7..193c33613 100644 --- a/admin/views/components_placeholders/tmpl/default_body.php +++ b/admin/views/components_placeholders/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_placeholders&task get('component_placeholders.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/components_placeholders/tmpl/default_head.php b/admin/views/components_placeholders/tmpl/default_head.php index 718c96bd0..e0912ee95 100644 --- a/admin/views/components_placeholders/tmpl/default_head.php +++ b/admin/views/components_placeholders/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/components_placeholders/view.html.php b/admin/views/components_placeholders/view.html.php index 1209ca0fe..54ba49ffe 100644 --- a/admin/views/components_placeholders/view.html.php +++ b/admin/views/components_placeholders/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewComponents_placeholders extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewComponents_placeholders extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_plugins/tmpl/default.php b/admin/views/components_plugins/tmpl/default.php index f79c12620..225327979 100644 --- a/admin/views/components_plugins/tmpl/default.php +++ b/admin/views/components_plugins/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/components_plugins/tmpl/default_body.php b/admin/views/components_plugins/tmpl/default_body.php index 0f41263a4..83ee9c3a6 100644 --- a/admin/views/components_plugins/tmpl/default_body.php +++ b/admin/views/components_plugins/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_plugins&task=comp get('component_plugins.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/components_plugins/tmpl/default_head.php b/admin/views/components_plugins/tmpl/default_head.php index a9e46c4fa..9b526bf58 100644 --- a/admin/views/components_plugins/tmpl/default_head.php +++ b/admin/views/components_plugins/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/components_plugins/view.html.php b/admin/views/components_plugins/view.html.php index 8e925e30b..6428de1e7 100644 --- a/admin/views/components_plugins/view.html.php +++ b/admin/views/components_plugins/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewComponents_plugins extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewComponents_plugins extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_site_views/tmpl/default.php b/admin/views/components_site_views/tmpl/default.php index f42d87bca..d6114ac29 100644 --- a/admin/views/components_site_views/tmpl/default.php +++ b/admin/views/components_site_views/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/components_site_views/tmpl/default_body.php b/admin/views/components_site_views/tmpl/default_body.php index 8c76f6567..0b9e5acb8 100644 --- a/admin/views/components_site_views/tmpl/default_body.php +++ b/admin/views/components_site_views/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_site_views&task=c get('component_site_views.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/components_site_views/tmpl/default_head.php b/admin/views/components_site_views/tmpl/default_head.php index 0dd72a58c..3d6577be6 100644 --- a/admin/views/components_site_views/tmpl/default_head.php +++ b/admin/views/components_site_views/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/components_site_views/view.html.php b/admin/views/components_site_views/view.html.php index 91e959c01..54754509d 100644 --- a/admin/views/components_site_views/view.html.php +++ b/admin/views/components_site_views/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_updates/tmpl/default.php b/admin/views/components_updates/tmpl/default.php index 193c6b494..c1487633d 100644 --- a/admin/views/components_updates/tmpl/default.php +++ b/admin/views/components_updates/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/components_updates/tmpl/default_body.php b/admin/views/components_updates/tmpl/default_body.php index 4c3624291..24bbccd85 100644 --- a/admin/views/components_updates/tmpl/default_body.php +++ b/admin/views/components_updates/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_updates&task=comp get('component_updates.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/components_updates/tmpl/default_head.php b/admin/views/components_updates/tmpl/default_head.php index d3d0312cb..750421607 100644 --- a/admin/views/components_updates/tmpl/default_head.php +++ b/admin/views/components_updates/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/components_updates/view.html.php b/admin/views/components_updates/view.html.php index c6761f65a..51fb1f6a3 100644 --- a/admin/views/components_updates/view.html.php +++ b/admin/views/components_updates/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/custom_admin_views/tmpl/default.php b/admin/views/custom_admin_views/tmpl/default.php index e20fde714..6559c7b63 100644 --- a/admin/views/custom_admin_views/tmpl/default.php +++ b/admin/views/custom_admin_views/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/custom_admin_views/tmpl/default_body.php b/admin/views/custom_admin_views/tmpl/default_body.php index 1f23d8192..d9ef76bb4 100644 --- a/admin/views/custom_admin_views/tmpl/default_body.php +++ b/admin/views/custom_admin_views/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=custom_admin_views&task=cust get('core.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/custom_admin_views/tmpl/default_head.php b/admin/views/custom_admin_views/tmpl/default_head.php index 8a31858da..56f2bf317 100644 --- a/admin/views/custom_admin_views/tmpl/default_head.php +++ b/admin/views/custom_admin_views/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/custom_admin_views/view.html.php b/admin/views/custom_admin_views/view.html.php index 381c261c1..1e5067f21 100644 --- a/admin/views/custom_admin_views/view.html.php +++ b/admin/views/custom_admin_views/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -324,7 +324,7 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.system_name' => JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SYSTEM_NAME_LABEL'), 'a.name' => JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_LABEL'), diff --git a/admin/views/custom_codes/tmpl/default_body.php b/admin/views/custom_codes/tmpl/default_body.php index e2a13cda3..5890c4e80 100644 --- a/admin/views/custom_codes/tmpl/default_body.php +++ b/admin/views/custom_codes/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=custom_codes&task=custom_cod get('custom_code.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/custom_codes/tmpl/default_head.php b/admin/views/custom_codes/tmpl/default_head.php index c14b79680..ca58c11f3 100644 --- a/admin/views/custom_codes/tmpl/default_head.php +++ b/admin/views/custom_codes/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/custom_codes/view.html.php b/admin/views/custom_codes/view.html.php index 5dd2c29fe..1c82bbeb3 100644 --- a/admin/views/custom_codes/view.html.php +++ b/admin/views/custom_codes/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -354,7 +354,7 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'g.system_name' => JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL'), 'a.path' => JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_PATH_LABEL'), diff --git a/admin/views/dynamic_gets/tmpl/default_body.php b/admin/views/dynamic_gets/tmpl/default_body.php index 77e81b9bd..ed271eb16 100644 --- a/admin/views/dynamic_gets/tmpl/default_body.php +++ b/admin/views/dynamic_gets/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_ge get('dynamic_get.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/dynamic_gets/tmpl/default_head.php b/admin/views/dynamic_gets/tmpl/default_head.php index 933f12540..fe77912fd 100644 --- a/admin/views/dynamic_gets/tmpl/default_head.php +++ b/admin/views/dynamic_gets/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/dynamic_gets/view.html.php b/admin/views/dynamic_gets/view.html.php index 14e316411..d6ed85e77 100644 --- a/admin/views/dynamic_gets/view.html.php +++ b/admin/views/dynamic_gets/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -294,7 +294,7 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_LABEL'), 'a.main_source' => JText::_('COM_COMPONENTBUILDER_DYNAMIC_GET_MAIN_SOURCE_LABEL'), diff --git a/admin/views/fields/tmpl/default_body.php b/admin/views/fields/tmpl/default_body.php index 382ce7d16..721e46fb8 100644 --- a/admin/views/fields/tmpl/default_body.php +++ b/admin/views/fields/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit"; get('field.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/fields/tmpl/default_head.php b/admin/views/fields/tmpl/default_head.php index 0b0544523..7deb734ca 100644 --- a/admin/views/fields/tmpl/default_head.php +++ b/admin/views/fields/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/fields/view.html.php b/admin/views/fields/view.html.php index bfa580282..539c4ebfa 100644 --- a/admin/views/fields/view.html.php +++ b/admin/views/fields/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewFields extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -401,7 +401,7 @@ class ComponentbuilderViewFields extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_FIELD_NAME_LABEL'), 'g.name' => JText::_('COM_COMPONENTBUILDER_FIELD_FIELDTYPE_LABEL'), diff --git a/admin/views/fieldtypes/tmpl/default.php b/admin/views/fieldtypes/tmpl/default.php index 876c961ce..f94f3dfc1 100644 --- a/admin/views/fieldtypes/tmpl/default.php +++ b/admin/views/fieldtypes/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/fieldtypes/tmpl/default_body.php b/admin/views/fieldtypes/tmpl/default_body.php index 887e1812f..3a2ca94cd 100644 --- a/admin/views/fieldtypes/tmpl/default_body.php +++ b/admin/views/fieldtypes/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=fieldtypes&task=fieldtype.ed get('fieldtype.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/fieldtypes/tmpl/default_head.php b/admin/views/fieldtypes/tmpl/default_head.php index 296445ed8..0328ceb50 100644 --- a/admin/views/fieldtypes/tmpl/default_head.php +++ b/admin/views/fieldtypes/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/fieldtypes/view.html.php b/admin/views/fieldtypes/view.html.php index fac139380..f7b9060c1 100644 --- a/admin/views/fieldtypes/view.html.php +++ b/admin/views/fieldtypes/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -246,7 +246,7 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_NAME_LABEL'), 'a.short_description' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_SHORT_DESCRIPTION_LABEL'), diff --git a/admin/views/help_documents/tmpl/default.php b/admin/views/help_documents/tmpl/default.php index 9c79c938f..c887f4a1b 100644 --- a/admin/views/help_documents/tmpl/default.php +++ b/admin/views/help_documents/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/help_documents/tmpl/default_body.php b/admin/views/help_documents/tmpl/default_body.php index ff8cf72c0..5fc22a00f 100644 --- a/admin/views/help_documents/tmpl/default_body.php +++ b/admin/views/help_documents/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=help_documents&task=help_doc get('help_document.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/help_documents/tmpl/default_head.php b/admin/views/help_documents/tmpl/default_head.php index b8663587b..9399acfc5 100644 --- a/admin/views/help_documents/tmpl/default_head.php +++ b/admin/views/help_documents/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/help_documents/view.html.php b/admin/views/help_documents/view.html.php index 6ddfa8ba3..d83583dfa 100644 --- a/admin/views/help_documents/view.html.php +++ b/admin/views/help_documents/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -349,7 +349,7 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.title' => JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_TITLE_LABEL'), 'a.type' => JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE_LABEL'), diff --git a/admin/views/joomla_components/tmpl/default_body.php b/admin/views/joomla_components/tmpl/default_body.php index e683e8291..6df319ced 100644 --- a/admin/views/joomla_components/tmpl/default_body.php +++ b/admin/views/joomla_components/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml get('joomla_component.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/joomla_components/tmpl/default_head.php b/admin/views/joomla_components/tmpl/default_head.php index aa3ac05a3..6df7428d6 100644 --- a/admin/views/joomla_components/tmpl/default_head.php +++ b/admin/views/joomla_components/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/joomla_components/view.html.php b/admin/views/joomla_components/view.html.php index e95bc3295..b5c7a5160 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -319,7 +319,7 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.system_name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SYSTEM_NAME_LABEL'), 'a.name_code' => JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_LABEL'), diff --git a/admin/views/joomla_modules/tmpl/default_body.php b/admin/views/joomla_modules/tmpl/default_body.php index 168f2ecfe..7fa1a073b 100644 --- a/admin/views/joomla_modules/tmpl/default_body.php +++ b/admin/views/joomla_modules/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_modules&task=joomla_m get('joomla_module.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/joomla_modules/tmpl/default_head.php b/admin/views/joomla_modules/tmpl/default_head.php index 2b16008a9..342183575 100644 --- a/admin/views/joomla_modules/tmpl/default_head.php +++ b/admin/views/joomla_modules/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/joomla_modules/view.html.php b/admin/views/joomla_modules/view.html.php index 3197a6050..c670ec33a 100644 --- a/admin/views/joomla_modules/view.html.php +++ b/admin/views/joomla_modules/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewJoomla_modules extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -259,7 +259,7 @@ class ComponentbuilderViewJoomla_modules extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.system_name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_LABEL'), 'a.description' => JText::_('COM_COMPONENTBUILDER_JOOMLA_MODULE_DESCRIPTION_LABEL'), diff --git a/admin/views/joomla_modules_files_folders_urls/tmpl/default.php b/admin/views/joomla_modules_files_folders_urls/tmpl/default.php index 76bf426a9..a11d6d717 100644 --- a/admin/views/joomla_modules_files_folders_urls/tmpl/default.php +++ b/admin/views/joomla_modules_files_folders_urls/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/joomla_modules_files_folders_urls/tmpl/default_body.php b/admin/views/joomla_modules_files_folders_urls/tmpl/default_body.php index 254c70908..86dce9f7e 100644 --- a/admin/views/joomla_modules_files_folders_urls/tmpl/default_body.php +++ b/admin/views/joomla_modules_files_folders_urls/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_modules_files_folders get('joomla_module_files_folders_urls.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/joomla_modules_files_folders_urls/tmpl/default_head.php b/admin/views/joomla_modules_files_folders_urls/tmpl/default_head.php index 37fcf012e..c222f6c1d 100644 --- a/admin/views/joomla_modules_files_folders_urls/tmpl/default_head.php +++ b/admin/views/joomla_modules_files_folders_urls/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/joomla_modules_files_folders_urls/view.html.php b/admin/views/joomla_modules_files_folders_urls/view.html.php index 387682196..e3faa3a52 100644 --- a/admin/views/joomla_modules_files_folders_urls/view.html.php +++ b/admin/views/joomla_modules_files_folders_urls/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewJoomla_modules_files_folders_urls extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewJoomla_modules_files_folders_urls extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/joomla_modules_updates/tmpl/default.php b/admin/views/joomla_modules_updates/tmpl/default.php index 6e2d69df4..ce44e137a 100644 --- a/admin/views/joomla_modules_updates/tmpl/default.php +++ b/admin/views/joomla_modules_updates/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/joomla_modules_updates/tmpl/default_body.php b/admin/views/joomla_modules_updates/tmpl/default_body.php index 80fabcdb1..e12213e84 100644 --- a/admin/views/joomla_modules_updates/tmpl/default_body.php +++ b/admin/views/joomla_modules_updates/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_modules_updates&task= get('joomla_module_updates.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/joomla_modules_updates/tmpl/default_head.php b/admin/views/joomla_modules_updates/tmpl/default_head.php index d02614aaa..87a478d34 100644 --- a/admin/views/joomla_modules_updates/tmpl/default_head.php +++ b/admin/views/joomla_modules_updates/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/joomla_modules_updates/view.html.php b/admin/views/joomla_modules_updates/view.html.php index d5b90296e..41d850efb 100644 --- a/admin/views/joomla_modules_updates/view.html.php +++ b/admin/views/joomla_modules_updates/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewJoomla_modules_updates extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewJoomla_modules_updates extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/joomla_plugin_groups/tmpl/default.php b/admin/views/joomla_plugin_groups/tmpl/default.php index cb53414e7..27e28fdc4 100644 --- a/admin/views/joomla_plugin_groups/tmpl/default.php +++ b/admin/views/joomla_plugin_groups/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/joomla_plugin_groups/tmpl/default_body.php b/admin/views/joomla_plugin_groups/tmpl/default_body.php index 31cd9d52f..644611690 100644 --- a/admin/views/joomla_plugin_groups/tmpl/default_body.php +++ b/admin/views/joomla_plugin_groups/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugin_groups&task=jo get('core.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/joomla_plugin_groups/tmpl/default_head.php b/admin/views/joomla_plugin_groups/tmpl/default_head.php index 6a567fd60..19f70d75e 100644 --- a/admin/views/joomla_plugin_groups/tmpl/default_head.php +++ b/admin/views/joomla_plugin_groups/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/joomla_plugin_groups/view.html.php b/admin/views/joomla_plugin_groups/view.html.php index 378fdc96d..fcc094be7 100644 --- a/admin/views/joomla_plugin_groups/view.html.php +++ b/admin/views/joomla_plugin_groups/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewJoomla_plugin_groups extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -249,7 +249,7 @@ class ComponentbuilderViewJoomla_plugin_groups extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NAME_LABEL'), 'g.name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_LABEL'), diff --git a/admin/views/joomla_plugins/tmpl/default_body.php b/admin/views/joomla_plugins/tmpl/default_body.php index 818aff6aa..7c6882815 100644 --- a/admin/views/joomla_plugins/tmpl/default_body.php +++ b/admin/views/joomla_plugins/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugins&task=joomla_p get('joomla_plugin.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/joomla_plugins/tmpl/default_head.php b/admin/views/joomla_plugins/tmpl/default_head.php index a7c71047f..5841c34a5 100644 --- a/admin/views/joomla_plugins/tmpl/default_head.php +++ b/admin/views/joomla_plugins/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/joomla_plugins/view.html.php b/admin/views/joomla_plugins/view.html.php index f75abb729..4588737c8 100644 --- a/admin/views/joomla_plugins/view.html.php +++ b/admin/views/joomla_plugins/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewJoomla_plugins extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -299,7 +299,7 @@ class ComponentbuilderViewJoomla_plugins extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.system_name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SYSTEM_NAME_LABEL'), 'g.name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_LABEL'), diff --git a/admin/views/joomla_plugins_files_folders_urls/tmpl/default.php b/admin/views/joomla_plugins_files_folders_urls/tmpl/default.php index de710474c..63ebb88d9 100644 --- a/admin/views/joomla_plugins_files_folders_urls/tmpl/default.php +++ b/admin/views/joomla_plugins_files_folders_urls/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/joomla_plugins_files_folders_urls/tmpl/default_body.php b/admin/views/joomla_plugins_files_folders_urls/tmpl/default_body.php index d58117038..774f10d47 100644 --- a/admin/views/joomla_plugins_files_folders_urls/tmpl/default_body.php +++ b/admin/views/joomla_plugins_files_folders_urls/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugins_files_folders get('joomla_plugin_files_folders_urls.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/joomla_plugins_files_folders_urls/tmpl/default_head.php b/admin/views/joomla_plugins_files_folders_urls/tmpl/default_head.php index e0e6523ae..912c93ff0 100644 --- a/admin/views/joomla_plugins_files_folders_urls/tmpl/default_head.php +++ b/admin/views/joomla_plugins_files_folders_urls/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/joomla_plugins_files_folders_urls/view.html.php b/admin/views/joomla_plugins_files_folders_urls/view.html.php index 1bf5a9ff3..2dbfb0958 100644 --- a/admin/views/joomla_plugins_files_folders_urls/view.html.php +++ b/admin/views/joomla_plugins_files_folders_urls/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewJoomla_plugins_files_folders_urls extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewJoomla_plugins_files_folders_urls extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/joomla_plugins_updates/tmpl/default.php b/admin/views/joomla_plugins_updates/tmpl/default.php index 65d63db9b..cc8e175bc 100644 --- a/admin/views/joomla_plugins_updates/tmpl/default.php +++ b/admin/views/joomla_plugins_updates/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/joomla_plugins_updates/tmpl/default_body.php b/admin/views/joomla_plugins_updates/tmpl/default_body.php index fa437ba08..528ccba48 100644 --- a/admin/views/joomla_plugins_updates/tmpl/default_body.php +++ b/admin/views/joomla_plugins_updates/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugins_updates&task= get('joomla_plugin_updates.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/joomla_plugins_updates/tmpl/default_head.php b/admin/views/joomla_plugins_updates/tmpl/default_head.php index 71a9ee727..2b2815f2e 100644 --- a/admin/views/joomla_plugins_updates/tmpl/default_head.php +++ b/admin/views/joomla_plugins_updates/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/joomla_plugins_updates/view.html.php b/admin/views/joomla_plugins_updates/view.html.php index 5ed43dc26..a40ea29b5 100644 --- a/admin/views/joomla_plugins_updates/view.html.php +++ b/admin/views/joomla_plugins_updates/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewJoomla_plugins_updates extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewJoomla_plugins_updates extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/language_translations/tmpl/default.php b/admin/views/language_translations/tmpl/default.php index 2270d80e2..071d79297 100644 --- a/admin/views/language_translations/tmpl/default.php +++ b/admin/views/language_translations/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/language_translations/tmpl/default_body.php b/admin/views/language_translations/tmpl/default_body.php index b6e538f32..55c0dffc4 100644 --- a/admin/views/language_translations/tmpl/default_body.php +++ b/admin/views/language_translations/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=language_translations&task=l get('language_translation.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/language_translations/tmpl/default_head.php b/admin/views/language_translations/tmpl/default_head.php index 17e59d12f..c8c679102 100644 --- a/admin/views/language_translations/tmpl/default_head.php +++ b/admin/views/language_translations/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/language_translations/view.html.php b/admin/views/language_translations/view.html.php index 95b430c3f..12b008395 100644 --- a/admin/views/language_translations/view.html.php +++ b/admin/views/language_translations/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -229,7 +229,7 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.source' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') diff --git a/admin/views/languages/tmpl/default_body.php b/admin/views/languages/tmpl/default_body.php index 0043b84a5..28def2eec 100644 --- a/admin/views/languages/tmpl/default_body.php +++ b/admin/views/languages/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=languages&task=language.edit get('language.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/languages/tmpl/default_head.php b/admin/views/languages/tmpl/default_head.php index 07a32e556..5b7548b8f 100644 --- a/admin/views/languages/tmpl/default_head.php +++ b/admin/views/languages/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/languages/view.html.php b/admin/views/languages/view.html.php index 356f0d7da..3ea33e7a7 100644 --- a/admin/views/languages/view.html.php +++ b/admin/views/languages/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewLanguages extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -234,7 +234,7 @@ class ComponentbuilderViewLanguages extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_NAME_LABEL'), 'a.langtag' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_LANGTAG_LABEL'), diff --git a/admin/views/layouts/tmpl/default_body.php b/admin/views/layouts/tmpl/default_body.php index df8e197ac..324eb893f 100644 --- a/admin/views/layouts/tmpl/default_body.php +++ b/admin/views/layouts/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=layouts&task=layout.edit"; get('core.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/layouts/tmpl/default_head.php b/admin/views/layouts/tmpl/default_head.php index 6feaf4169..f9b164085 100644 --- a/admin/views/layouts/tmpl/default_head.php +++ b/admin/views/layouts/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/layouts/view.html.php b/admin/views/layouts/view.html.php index b80e465c4..11b20f5d2 100644 --- a/admin/views/layouts/view.html.php +++ b/admin/views/layouts/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewLayouts extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -294,7 +294,7 @@ class ComponentbuilderViewLayouts extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_LAYOUT_NAME_LABEL'), 'a.description' => JText::_('COM_COMPONENTBUILDER_LAYOUT_DESCRIPTION_LABEL'), diff --git a/admin/views/libraries/tmpl/default.php b/admin/views/libraries/tmpl/default.php index b68deb7d5..2f72be745 100644 --- a/admin/views/libraries/tmpl/default.php +++ b/admin/views/libraries/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/libraries/tmpl/default_body.php b/admin/views/libraries/tmpl/default_body.php index 428f950c1..4568b9829 100644 --- a/admin/views/libraries/tmpl/default_body.php +++ b/admin/views/libraries/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=libraries&task=library.edit" get('library.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/libraries/tmpl/default_head.php b/admin/views/libraries/tmpl/default_head.php index d683dc029..d6aad882e 100644 --- a/admin/views/libraries/tmpl/default_head.php +++ b/admin/views/libraries/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/libraries/view.html.php b/admin/views/libraries/view.html.php index 387ad101e..ecbeffd3b 100644 --- a/admin/views/libraries/view.html.php +++ b/admin/views/libraries/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewLibraries extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -314,7 +314,7 @@ class ComponentbuilderViewLibraries extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_LIBRARY_NAME_LABEL'), 'a.target' => JText::_('COM_COMPONENTBUILDER_LIBRARY_TARGET_LABEL'), diff --git a/admin/views/libraries_config/tmpl/default.php b/admin/views/libraries_config/tmpl/default.php index a0903a080..de01322d2 100644 --- a/admin/views/libraries_config/tmpl/default.php +++ b/admin/views/libraries_config/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/libraries_config/tmpl/default_body.php b/admin/views/libraries_config/tmpl/default_body.php index 128f2184c..c8eb0e3df 100644 --- a/admin/views/libraries_config/tmpl/default_body.php +++ b/admin/views/libraries_config/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=libraries_config&task=librar get('library_config.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/libraries_config/tmpl/default_head.php b/admin/views/libraries_config/tmpl/default_head.php index 9a3e55b2b..933acb9ce 100644 --- a/admin/views/libraries_config/tmpl/default_head.php +++ b/admin/views/libraries_config/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/libraries_config/view.html.php b/admin/views/libraries_config/view.html.php index e6acdf78a..2b58e7289 100644 --- a/admin/views/libraries_config/view.html.php +++ b/admin/views/libraries_config/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/libraries_files_folders_urls/tmpl/default.php b/admin/views/libraries_files_folders_urls/tmpl/default.php index 33e903268..7ba0381f3 100644 --- a/admin/views/libraries_files_folders_urls/tmpl/default.php +++ b/admin/views/libraries_files_folders_urls/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/libraries_files_folders_urls/tmpl/default_body.php b/admin/views/libraries_files_folders_urls/tmpl/default_body.php index c2f4b753d..000f40892 100644 --- a/admin/views/libraries_files_folders_urls/tmpl/default_body.php +++ b/admin/views/libraries_files_folders_urls/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=libraries_files_folders_urls get('library_files_folders_urls.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/libraries_files_folders_urls/tmpl/default_head.php b/admin/views/libraries_files_folders_urls/tmpl/default_head.php index 88a7012e6..737f3ea36 100644 --- a/admin/views/libraries_files_folders_urls/tmpl/default_head.php +++ b/admin/views/libraries_files_folders_urls/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/libraries_files_folders_urls/view.html.php b/admin/views/libraries_files_folders_urls/view.html.php index 37a901234..ad34c262b 100644 --- a/admin/views/libraries_files_folders_urls/view.html.php +++ b/admin/views/libraries_files_folders_urls/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/placeholders/tmpl/default.php b/admin/views/placeholders/tmpl/default.php index 242a4833c..ac46aef81 100644 --- a/admin/views/placeholders/tmpl/default.php +++ b/admin/views/placeholders/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/placeholders/tmpl/default_body.php b/admin/views/placeholders/tmpl/default_body.php index c9efd1b4c..d7a11c2bf 100644 --- a/admin/views/placeholders/tmpl/default_body.php +++ b/admin/views/placeholders/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=placeholders&task=placeholde get('placeholder.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/placeholders/tmpl/default_head.php b/admin/views/placeholders/tmpl/default_head.php index 314685539..3cb17175e 100644 --- a/admin/views/placeholders/tmpl/default_head.php +++ b/admin/views/placeholders/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/placeholders/view.html.php b/admin/views/placeholders/view.html.php index e2eaa3655..b1dc60a0d 100644 --- a/admin/views/placeholders/view.html.php +++ b/admin/views/placeholders/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewPlaceholders extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -229,7 +229,7 @@ class ComponentbuilderViewPlaceholders extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.target' => JText::_('COM_COMPONENTBUILDER_PLACEHOLDER_TARGET_LABEL'), 'a.value' => JText::_('COM_COMPONENTBUILDER_PLACEHOLDER_VALUE_LABEL'), diff --git a/admin/views/servers/tmpl/default.php b/admin/views/servers/tmpl/default.php index cbb2a15bd..b137f22ef 100644 --- a/admin/views/servers/tmpl/default.php +++ b/admin/views/servers/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/servers/tmpl/default_body.php b/admin/views/servers/tmpl/default_body.php index e3dce61ea..e7630a42a 100644 --- a/admin/views/servers/tmpl/default_body.php +++ b/admin/views/servers/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=servers&task=server.edit"; get('server.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/servers/tmpl/default_head.php b/admin/views/servers/tmpl/default_head.php index 42f71a59f..a98a0a9d8 100644 --- a/admin/views/servers/tmpl/default_head.php +++ b/admin/views/servers/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/servers/view.html.php b/admin/views/servers/view.html.php index 2283ddf6c..0d37ebab7 100644 --- a/admin/views/servers/view.html.php +++ b/admin/views/servers/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewServers extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -289,7 +289,7 @@ class ComponentbuilderViewServers extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_SERVER_NAME_LABEL'), 'a.protocol' => JText::_('COM_COMPONENTBUILDER_SERVER_PROTOCOL_LABEL'), diff --git a/admin/views/site_views/tmpl/default.php b/admin/views/site_views/tmpl/default.php index a9090f66c..237791534 100644 --- a/admin/views/site_views/tmpl/default.php +++ b/admin/views/site_views/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/site_views/tmpl/default_body.php b/admin/views/site_views/tmpl/default_body.php index da5beac8e..e3bbf35a3 100644 --- a/admin/views/site_views/tmpl/default_body.php +++ b/admin/views/site_views/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=site_views&task=site_view.ed get('core.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/site_views/tmpl/default_head.php b/admin/views/site_views/tmpl/default_head.php index 173030ce5..a895af7fa 100644 --- a/admin/views/site_views/tmpl/default_head.php +++ b/admin/views/site_views/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/site_views/view.html.php b/admin/views/site_views/view.html.php index 2fe9ec51a..343c75572 100644 --- a/admin/views/site_views/view.html.php +++ b/admin/views/site_views/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewSite_views extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -324,7 +324,7 @@ class ComponentbuilderViewSite_views extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.system_name' => JText::_('COM_COMPONENTBUILDER_SITE_VIEW_SYSTEM_NAME_LABEL'), 'a.name' => JText::_('COM_COMPONENTBUILDER_SITE_VIEW_NAME_LABEL'), diff --git a/admin/views/snippet_types/tmpl/default.php b/admin/views/snippet_types/tmpl/default.php index 820ed9c04..c08e9a460 100644 --- a/admin/views/snippet_types/tmpl/default.php +++ b/admin/views/snippet_types/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/snippet_types/tmpl/default_body.php b/admin/views/snippet_types/tmpl/default_body.php index e8664c4ee..2236f64b0 100644 --- a/admin/views/snippet_types/tmpl/default_body.php +++ b/admin/views/snippet_types/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=snippet_types&task=snippet_t get('snippet_type.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/snippet_types/tmpl/default_head.php b/admin/views/snippet_types/tmpl/default_head.php index c862e11bf..534996cdc 100644 --- a/admin/views/snippet_types/tmpl/default_head.php +++ b/admin/views/snippet_types/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/snippet_types/view.html.php b/admin/views/snippet_types/view.html.php index 9532233d7..82c84f333 100644 --- a/admin/views/snippet_types/view.html.php +++ b/admin/views/snippet_types/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -219,7 +219,7 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_NAME_LABEL'), 'a.description' => JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_LABEL'), diff --git a/admin/views/snippets/tmpl/default.php b/admin/views/snippets/tmpl/default.php index 937eb60f0..4be137907 100644 --- a/admin/views/snippets/tmpl/default.php +++ b/admin/views/snippets/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/snippets/tmpl/default_body.php b/admin/views/snippets/tmpl/default_body.php index afdc15154..90ffba9e7 100644 --- a/admin/views/snippets/tmpl/default_body.php +++ b/admin/views/snippets/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=snippets&task=snippet.edit"; get('core.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/snippets/tmpl/default_head.php b/admin/views/snippets/tmpl/default_head.php index 5f334e595..541e50e8c 100644 --- a/admin/views/snippets/tmpl/default_head.php +++ b/admin/views/snippets/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/snippets/view.html.php b/admin/views/snippets/view.html.php index f2cf6f21b..b8b36e432 100644 --- a/admin/views/snippets/view.html.php +++ b/admin/views/snippets/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -299,7 +299,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_SNIPPET_NAME_LABEL'), 'a.url' => JText::_('COM_COMPONENTBUILDER_SNIPPET_URL_LABEL'), diff --git a/admin/views/templates/tmpl/default_body.php b/admin/views/templates/tmpl/default_body.php index cb081e795..e7c7c3708 100644 --- a/admin/views/templates/tmpl/default_body.php +++ b/admin/views/templates/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=templates&task=template.edit get('core.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/templates/tmpl/default_head.php b/admin/views/templates/tmpl/default_head.php index 18ef3a02a..69ef13274 100644 --- a/admin/views/templates/tmpl/default_head.php +++ b/admin/views/templates/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/templates/view.html.php b/admin/views/templates/view.html.php index 83e26eb5b..f516ed5af 100644 --- a/admin/views/templates/view.html.php +++ b/admin/views/templates/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewTemplates extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -294,7 +294,7 @@ class ComponentbuilderViewTemplates extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_TEMPLATE_NAME_LABEL'), 'a.description' => JText::_('COM_COMPONENTBUILDER_TEMPLATE_DESCRIPTION_LABEL'), diff --git a/admin/views/validation_rules/tmpl/default.php b/admin/views/validation_rules/tmpl/default.php index cfe4c2d20..c0d7fd02a 100644 --- a/admin/views/validation_rules/tmpl/default.php +++ b/admin/views/validation_rules/tmpl/default.php @@ -82,4 +82,5 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/views/validation_rules/tmpl/default_body.php b/admin/views/validation_rules/tmpl/default_body.php index dd91f6f2d..f1787372c 100644 --- a/admin/views/validation_rules/tmpl/default_body.php +++ b/admin/views/validation_rules/tmpl/default_body.php @@ -25,11 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=validation_rules&task=valida get('validation_rule.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/validation_rules/tmpl/default_head.php b/admin/views/validation_rules/tmpl/default_head.php index 177b3a7f9..a6b52d58b 100644 --- a/admin/views/validation_rules/tmpl/default_head.php +++ b/admin/views/validation_rules/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/validation_rules/view.html.php b/admin/views/validation_rules/view.html.php index 0b1f3d44c..31fa34589 100644 --- a/admin/views/validation_rules/view.html.php +++ b/admin/views/validation_rules/view.html.php @@ -37,7 +37,7 @@ class ComponentbuilderViewValidation_rules extends JViewLegacy // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -234,7 +234,7 @@ class ComponentbuilderViewValidation_rules extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_LABEL'), 'a.short_description' => JText::_('COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_LABEL'), diff --git a/componentbuilder.xml b/componentbuilder.xml index bc8ff8604..096495187 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 21st November, 2020 + 24th November, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com @@ -13,7 +13,7 @@

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. -Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!

+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!

Created by Llewellyn van der Merwe
Development started 30th April, 2015

]]> diff --git a/site/controllers/api.php b/site/controllers/api.php index df5a7a0ce..e8fecabc7 100644 --- a/site/controllers/api.php +++ b/site/controllers/api.php @@ -368,7 +368,7 @@ class ComponentbuilderControllerApi extends JControllerForm $subject = JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY'); // email the message componentbuilderEmail::send($email, $subject, componentbuilderEmail::setTableBody($message, $subject), $plainText, 1); - $backupNotice[] = JText::_('COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND'); + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SENT'); } else { diff --git a/site/language/en-GB/en-GB.com_componentbuilder.ini b/site/language/en-GB/en-GB.com_componentbuilder.ini index e6d145027..08b50de4a 100644 --- a/site/language/en-GB/en-GB.com_componentbuilder.ini +++ b/site/language/en-GB/en-GB.com_componentbuilder.ini @@ -25,7 +25,7 @@ COM_COMPONENTBUILDER_DTWEBSITEDTDDSDD="
Website
%s
" COM_COMPONENTBUILDER_EDIT="Edit" COM_COMPONENTBUILDER_EDIT_S="Edit %s" COM_COMPONENTBUILDER_EMAIL_S="Email: %s" -COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND="Email with the new key was send" +COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SENT="Email with the new key was sent" COM_COMPONENTBUILDER_EMCOMPANYEM_BSB="Company: %s" COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB="Copyright: %s" COM_COMPONENTBUILDER_EMEMAILEM_BSB="Email: %s"