forked from joomla/Component-Builder
Fixed gh-349 to insure dynamic joined and other tweaks are not added when custom code is selected as main source with a dynamicGet
This commit is contained in:
parent
feb4ae9c24
commit
95b6a23159
@ -125,7 +125,7 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
|
||||
+ *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*: 3rd October, 2018
|
||||
+ *Last Build*: 4th October, 2018
|
||||
+ *Version*: 2.9.6
|
||||
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
|
@ -125,7 +125,7 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
|
||||
+ *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*: 3rd October, 2018
|
||||
+ *Last Build*: 4th October, 2018
|
||||
+ *Version*: 2.9.6
|
||||
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
|
@ -3000,6 +3000,8 @@ class Get
|
||||
// reset buckets
|
||||
$result->main_get = array();
|
||||
$result->custom_get = array();
|
||||
// should joineds and other weaks be added
|
||||
$addDynamicTweaksJoints = true;
|
||||
// set source data
|
||||
switch ($result->main_source)
|
||||
{
|
||||
@ -3044,8 +3046,13 @@ class Get
|
||||
$result->main_get[0]['as'] = 'a';
|
||||
$result->main_get[0]['key'] = $result->key;
|
||||
$result->main_get[0]['context'] = $context;
|
||||
// do not add
|
||||
$addDynamicTweaksJoints = false;
|
||||
break;
|
||||
}
|
||||
// only add if main source is not custom
|
||||
if ($addDynamicTweaksJoints)
|
||||
{
|
||||
// set join_view_table details
|
||||
$result->join_view_table = json_decode($result->join_view_table, true);
|
||||
if (ComponentbuilderHelper::checkArray($result->join_view_table))
|
||||
@ -3189,6 +3196,17 @@ class Get
|
||||
{
|
||||
unset($result->global);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// when we have a custom query script we do not add the dynamic options
|
||||
unset($result->join_view_table);
|
||||
unset($result->join_db_table);
|
||||
unset($result->filter);
|
||||
unset($result->where);
|
||||
unset($result->order);
|
||||
unset($result->global);
|
||||
}
|
||||
// load the events if any is set
|
||||
if ($result->gettype == 1 && ComponentbuilderHelper::checkJson($result->plugin_events))
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>3rd October, 2018</creationDate>
|
||||
<creationDate>4th October, 2018</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||
|
Loading…
Reference in New Issue
Block a user