diff --git a/README.md b/README.md index 2fd4b4522..8b519c5e9 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 15th January, 2022 ++ *Last Build*: 21st January, 2022 + *Version*: 2.12.15 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt diff --git a/admin/README.txt b/admin/README.txt index 2fd4b4522..8b519c5e9 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -143,7 +143,7 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 15th January, 2022 ++ *Last Build*: 21st January, 2022 + *Version*: 2.12.15 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 515e6b16e..b47180df8 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -3700,17 +3700,8 @@ class Interpretation extends Fields { $getItem .= $this->setCustomViewGroup($get->group, $code, $tab); } - // get ready to get query - $getItem .= PHP_EOL . PHP_EOL . $tab . $this->_t(2) . "//" - . $this->setLine(__LINE__) - . " Reset the query using our newly populated query object."; - $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) - . "\$db->setQuery(\$query);"; - $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "//" - . $this->setLine(__LINE__) - . " Load the results as a stdClass object."; - $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) - . "\$data = \$db->loadObject();"; + // db set query data placeholder + $getItem .= $this->hhh . "DB_SET_QUERY_DATA" . $this->hhh; // set after item php if (isset($get->add_php_after_getitem) && $get->add_php_after_getitem == 1 @@ -3721,6 +3712,30 @@ class Interpretation extends Fields $get->php_after_getitem, $this->placeholders ); } + // check the getItem string to see if we should still add set query to data + if (strpos($getItem, '$data =') === false) + { + // get ready to get query + $setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] = + PHP_EOL . PHP_EOL . $tab . $this->_t(2) . "//" + . $this->setLine(__LINE__) + . " Reset the query using our newly populated query object."; + $setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] .= + PHP_EOL . $this->_t(1) . $tab . $this->_t(1) + . "\$db->setQuery(\$query);"; + $setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] .= + PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "//" + . $this->setLine(__LINE__) + . " Load the results as a stdClass object."; + $setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] .= + PHP_EOL . $this->_t(1) . $tab . $this->_t(1) + . "\$data = \$db->loadObject();"; + // add the db set query to data + $getItem = str_replace( + array_keys($setQuery), + array_values($setQuery), $getItem + ); + } $getItem .= PHP_EOL . PHP_EOL . $tab . $this->_t(2) . "if (empty(\$data))"; $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "{"; @@ -3778,7 +3793,7 @@ class Interpretation extends Fields . "return false;"; } $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "}"; - // dispatcher placholder + // dispatcher placeholder $getItem .= $this->hhh . "DISPATCHER" . $this->hhh; if (ComponentbuilderHelper::checkArray($get->main_get)) { diff --git a/admin/layouts/component_dashboard/dashboard_fullwidth.php b/admin/layouts/component_dashboard/dashboard_fullwidth.php index 49bfd713b..5a4a6f0c1 100644 --- a/admin/layouts/component_dashboard/dashboard_fullwidth.php +++ b/admin/layouts/component_dashboard/dashboard_fullwidth.php @@ -28,8 +28,8 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( 'note_php_dashboard_note', - 'dashboard_tab', - 'php_dashboard_methods' + 'php_dashboard_methods', + 'dashboard_tab' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/models/component_dashboard.php b/admin/models/component_dashboard.php index d7e2372d8..4ca14076a 100644 --- a/admin/models/component_dashboard.php +++ b/admin/models/component_dashboard.php @@ -31,8 +31,8 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin 'dashboard' => array( 'fullwidth' => array( 'note_php_dashboard_note', - 'dashboard_tab', - 'php_dashboard_methods' + 'php_dashboard_methods', + 'dashboard_tab' ), 'above' => array( 'joomla_component' diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index 25f89450e..5d86c665c 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -423,7 +423,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList .append("