Patch to fix the bug in the new custom_tabs area to insure the full list of tab names are loaded every time
This commit is contained in:
parent
7ef25c2bb1
commit
be0d61ceae
@ -129,7 +129,7 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
|
||||
+ *Version*: 2.9.0
|
||||
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **192673**
|
||||
+ *Line count*: **192685**
|
||||
+ *Field count*: **1081**
|
||||
+ *File count*: **1273**
|
||||
+ *Folder count*: **201**
|
||||
|
@ -129,7 +129,7 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
|
||||
+ *Version*: 2.9.0
|
||||
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **192673**
|
||||
+ *Line count*: **192685**
|
||||
+ *Field count*: **1081**
|
||||
+ *File count*: **1273**
|
||||
+ *Folder count*: **201**
|
||||
|
@ -45,13 +45,19 @@ class JFormFieldViewtabs extends JFormFieldList
|
||||
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
|
||||
if ($fieldsID > 0)
|
||||
{
|
||||
$query->join('LEFT', $db->quoteName('#__componentbuilder_admin_fields', 'b') . ' ON (' . $db->quoteName('a.id') . ' = ' . $db->quoteName('b.admin_view') . ')');
|
||||
$viewName = $jinput->get('view', null, 'WORD');
|
||||
// only allow for fields and custom tabs
|
||||
if ('admin_fields' !== $viewName && 'admin_custom_tabs' !== $viewName)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$query->join('LEFT', $db->quoteName('#__componentbuilder_' . $viewName, 'b') . ' ON (' . $db->quoteName('a.id') . ' = ' . $db->quoteName('b.admin_view') . ')');
|
||||
$query->where($db->quoteName('b.id') . ' = ' . (int) $fieldsID);
|
||||
}
|
||||
else
|
||||
{
|
||||
// get the refs if found
|
||||
$ref = $jinput->get('ref', 0, 'WORD');
|
||||
$ref = $jinput->get('ref', null, 'WORD');
|
||||
$refid = $jinput->getInt('refid', 0);
|
||||
if ('admin_view' === $ref && $refid > 0)
|
||||
{
|
||||
@ -68,7 +74,7 @@ class JFormFieldViewtabs extends JFormFieldList
|
||||
$db->setQuery((string)$query);
|
||||
$item = $db->loadObject();
|
||||
$options = array();
|
||||
if (isset($item->addtabs) && strlen($item->addtabs) > 5)
|
||||
if (isset($item->addtabs) && ComponentbuilderHelper::checkJson($item->addtabs))
|
||||
{
|
||||
$items = json_decode($item->addtabs, true);
|
||||
$nr = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user