Fixed Warning: Invalid argument supplied for foreach() in ../html/libraries/cms/html/select.php on line 592 by adding empty select option.

This commit is contained in:
Llewellyn van der Merwe 2020-12-07 17:44:16 +02:00
parent dfbd2b2a6d
commit 4d0097f8e4
Signed by untrusted user: Llewellyn
GPG Key ID: EFC0C720A240551C
38 changed files with 122 additions and 160 deletions

View File

@ -144,11 +144,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 5th December, 2020 + *Last Build*: 7th December, 2020
+ *Version*: 2.12.1 + *Version*: 2.12.1
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **289032** + *Line count*: **288998**
+ *Field count*: **1537** + *Field count*: **1537**
+ *File count*: **1902** + *File count*: **1902**
+ *Folder count*: **304** + *Folder count*: **304**

View File

@ -144,11 +144,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 5th December, 2020 + *Last Build*: 7th December, 2020
+ *Version*: 2.12.1 + *Version*: 2.12.1
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **289032** + *Line count*: **288998**
+ *Field count*: **1537** + *Field count*: **1537**
+ *File count*: **1902** + *File count*: **1902**
+ *Folder count*: **304** + *Folder count*: **304**

View File

@ -17645,28 +17645,26 @@ class Interpretation extends Fields
$function[] = $this->_t(2) . "\$db->setQuery(\$query);"; $function[] = $this->_t(2) . "\$db->setQuery(\$query);";
$function[] = PHP_EOL . $this->_t(2) $function[] = PHP_EOL . $this->_t(2)
. "\$results = \$db->loadObjectList();"; . "\$results = \$db->loadObjectList();";
$function[] = $this->_t(2) . "if (\$results)"; $function[] = $this->_t(2) . "\$_filter = array();";
$function[] = $this->_t(2) . "{";
$function[] = $this->_t(3) . "\$filter = array();";
$function[] = $this->_t(3) . "\$batch = array();";
// if this is not a multi field // if this is not a multi field
if (!$funtion_path && $filter['multi'] == 1) if (!$funtion_path && $filter['multi'] == 1)
{ {
$function[] = $this->_t(4) $function[] = $this->_t(2)
. "\$filter[] = JHtml::_('select.option', '', '- Select ' . JText:" . "\$_filter[] = JHtml::_('select.option', '', '- Select ' . JText:"
. ":_('" . $filter['lang'] . "') . ' -');"; . ":_('" . $filter['lang'] . "') . ' -');";
} }
$function[] = $this->_t(2) . "if (\$results)";
$function[] = $this->_t(2) . "{";
$function[] = $this->_t(3) $function[] = $this->_t(3)
. "foreach (\$results as \$result)"; . "foreach (\$results as \$result)";
$function[] = $this->_t(3) . "{"; $function[] = $this->_t(3) . "{";
$function[] = $this->_t(4) $function[] = $this->_t(4)
. "\$filter[] = JHtml::_('select.option', \$result->" . "\$_filter[] = JHtml::_('select.option', \$result->"
. $filter['custom']['id'] . ", \$result->" . $filter['custom']['id'] . ", \$result->"
. $filter['custom']['text'] . ");"; . $filter['custom']['text'] . ");";
$function[] = $this->_t(3) . "}"; $function[] = $this->_t(3) . "}";
$function[] = $this->_t(3) . "return \$filter;";
$function[] = $this->_t(2) . "}"; $function[] = $this->_t(2) . "}";
$function[] = $this->_t(2) . "return false;"; $function[] = $this->_t(2) . "return \$_filter;";
// add if this is a function path // add if this is a function path
if ($funtion_path) if ($funtion_path)
{ {
@ -17799,7 +17797,14 @@ class Interpretation extends Fields
$function[] = PHP_EOL . $this->_t(2) $function[] = PHP_EOL . $this->_t(2)
. "\$results = \$db->loadColumn();"; . "\$results = \$db->loadColumn();";
} }
$function[] = $this->_t(2) . "\$_filter = array();";
// if this is not a multi field
if (!$funtion_path && $filter['multi'] == 1)
{
$function[] = $this->_t(2)
. "\$_filter[] = JHtml::_('select.option', '', '- ' . JText:"
. ":_('" . $filter['lang_select'] . "') . ' -');";
}
$function[] = PHP_EOL . $this->_t(2) . "if (\$results)"; $function[] = PHP_EOL . $this->_t(2) . "if (\$results)";
$function[] = $this->_t(2) . "{"; $function[] = $this->_t(2) . "{";
@ -17827,14 +17832,6 @@ class Interpretation extends Fields
$function[] = $this->_t(3) $function[] = $this->_t(3)
. "\$results = array_unique(\$results);"; . "\$results = array_unique(\$results);";
} }
$function[] = $this->_t(3) . "\$_filter = array();";
// if this is not a multi field
if (!$funtion_path && $filter['multi'] == 1)
{
$function[] = $this->_t(3)
. "\$_filter[] = JHtml::_('select.option', '', '- ' . JText:"
. ":_('" . $filter['lang_select'] . "') . ' -');";
}
$function[] = $this->_t(3) . "foreach (\$results as \$" $function[] = $this->_t(3) . "foreach (\$results as \$"
. $filter['code'] . ")"; . $filter['code'] . ")";
$function[] = $this->_t(3) . "{"; $function[] = $this->_t(3) . "{";
@ -17894,9 +17891,8 @@ class Interpretation extends Fields
} }
} }
$function[] = $this->_t(3) . "}"; $function[] = $this->_t(3) . "}";
$function[] = $this->_t(3) . "return \$_filter;";
$function[] = $this->_t(2) . "}"; $function[] = $this->_t(2) . "}";
$function[] = $this->_t(2) . "return false;"; $function[] = $this->_t(2) . "return \$_filter;";
// add if this is a function path // add if this is a function path
if ($funtion_path) if ($funtion_path)
{ {

View File

@ -50,14 +50,14 @@ class JFormFieldAdminviewsfilteraddcustombutton extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -');
if ($results) if ($results)
{ {
// get admin_viewsmodel // get admin_viewsmodel
$model = ComponentbuilderHelper::getModel('admin_views'); $model = ComponentbuilderHelper::getModel('admin_views');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -');
foreach ($results as $add_custom_button) foreach ($results as $add_custom_button)
{ {
// Translate the add_custom_button selection // Translate the add_custom_button selection
@ -65,8 +65,7 @@ class JFormFieldAdminviewsfilteraddcustombutton extends JFormFieldList
// Now add the add_custom_button and its text to the options array // Now add the add_custom_button and its text to the options array
$_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text)); $_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldAdminviewsfilteraddcustomimport extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_IMPORT') . ' -');
if ($results) if ($results)
{ {
// get admin_viewsmodel // get admin_viewsmodel
$model = ComponentbuilderHelper::getModel('admin_views'); $model = ComponentbuilderHelper::getModel('admin_views');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_IMPORT') . ' -');
foreach ($results as $add_custom_import) foreach ($results as $add_custom_import)
{ {
// Translate the add_custom_import selection // Translate the add_custom_import selection
@ -65,8 +65,7 @@ class JFormFieldAdminviewsfilteraddcustomimport extends JFormFieldList
// Now add the add_custom_import and its text to the options array // Now add the add_custom_import and its text to the options array
$_filter[] = JHtml::_('select.option', $add_custom_import, JText::_($text)); $_filter[] = JHtml::_('select.option', $add_custom_import, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldAdminviewsfilteraddfadein extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_FADEIN') . ' -');
if ($results) if ($results)
{ {
// get admin_viewsmodel // get admin_viewsmodel
$model = ComponentbuilderHelper::getModel('admin_views'); $model = ComponentbuilderHelper::getModel('admin_views');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_FADEIN') . ' -');
foreach ($results as $add_fadein) foreach ($results as $add_fadein)
{ {
// Translate the add_fadein selection // Translate the add_fadein selection
@ -65,8 +65,7 @@ class JFormFieldAdminviewsfilteraddfadein extends JFormFieldList
// Now add the add_fadein and its text to the options array // Now add the add_fadein and its text to the options array
$_filter[] = JHtml::_('select.option', $add_fadein, JText::_($text)); $_filter[] = JHtml::_('select.option', $add_fadein, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldAdminviewsfilteraddphpajax extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -');
if ($results) if ($results)
{ {
// get admin_viewsmodel // get admin_viewsmodel
$model = ComponentbuilderHelper::getModel('admin_views'); $model = ComponentbuilderHelper::getModel('admin_views');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -');
foreach ($results as $add_php_ajax) foreach ($results as $add_php_ajax)
{ {
// Translate the add_php_ajax selection // Translate the add_php_ajax selection
@ -65,8 +65,7 @@ class JFormFieldAdminviewsfilteraddphpajax extends JFormFieldList
// Now add the add_php_ajax and its text to the options array // Now add the add_php_ajax and its text to the options array
$_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text)); $_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,13 +50,13 @@ class JFormFieldAdminviewsfiltertype extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
if ($results) if ($results)
{ {
// get admin_viewsmodel // get admin_viewsmodel
$model = ComponentbuilderHelper::getModel('admin_views'); $model = ComponentbuilderHelper::getModel('admin_views');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
foreach ($results as $type) foreach ($results as $type)
{ {
// Translate the type selection // Translate the type selection
@ -64,8 +64,7 @@ class JFormFieldAdminviewsfiltertype extends JFormFieldList
// Now add the type and its text to the options array // Now add the type and its text to the options array
$_filter[] = JHtml::_('select.option', $type, JText::_($text)); $_filter[] = JHtml::_('select.option', $type, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldClassextendingsfilterextensiontype extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -');
if ($results) if ($results)
{ {
// get class_extendingsmodel // get class_extendingsmodel
$model = ComponentbuilderHelper::getModel('class_extendings'); $model = ComponentbuilderHelper::getModel('class_extendings');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -');
foreach ($results as $extension_type) foreach ($results as $extension_type)
{ {
// Translate the extension_type selection // Translate the extension_type selection
@ -65,8 +65,7 @@ class JFormFieldClassextendingsfilterextensiontype extends JFormFieldList
// Now add the extension_type and its text to the options array // Now add the extension_type and its text to the options array
$_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldClassmethodsfilterextensiontype extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -');
if ($results) if ($results)
{ {
// get class_methodsmodel // get class_methodsmodel
$model = ComponentbuilderHelper::getModel('class_methods'); $model = ComponentbuilderHelper::getModel('class_methods');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -');
foreach ($results as $extension_type) foreach ($results as $extension_type)
{ {
// Translate the extension_type selection // Translate the extension_type selection
@ -65,8 +65,7 @@ class JFormFieldClassmethodsfilterextensiontype extends JFormFieldList
// Now add the extension_type and its text to the options array // Now add the extension_type and its text to the options array
$_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldClassmethodsfiltervisibility extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -');
if ($results) if ($results)
{ {
// get class_methodsmodel // get class_methodsmodel
$model = ComponentbuilderHelper::getModel('class_methods'); $model = ComponentbuilderHelper::getModel('class_methods');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -');
foreach ($results as $visibility) foreach ($results as $visibility)
{ {
// Translate the visibility selection // Translate the visibility selection
@ -65,8 +65,7 @@ class JFormFieldClassmethodsfiltervisibility extends JFormFieldList
// Now add the visibility and its text to the options array // Now add the visibility and its text to the options array
$_filter[] = JHtml::_('select.option', $visibility, JText::_($text)); $_filter[] = JHtml::_('select.option', $visibility, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldClasspropertiesfilterextensiontype extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -');
if ($results) if ($results)
{ {
// get class_propertiesmodel // get class_propertiesmodel
$model = ComponentbuilderHelper::getModel('class_properties'); $model = ComponentbuilderHelper::getModel('class_properties');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -');
foreach ($results as $extension_type) foreach ($results as $extension_type)
{ {
// Translate the extension_type selection // Translate the extension_type selection
@ -65,8 +65,7 @@ class JFormFieldClasspropertiesfilterextensiontype extends JFormFieldList
// Now add the extension_type and its text to the options array // Now add the extension_type and its text to the options array
$_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldClasspropertiesfiltervisibility extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -');
if ($results) if ($results)
{ {
// get class_propertiesmodel // get class_propertiesmodel
$model = ComponentbuilderHelper::getModel('class_properties'); $model = ComponentbuilderHelper::getModel('class_properties');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -');
foreach ($results as $visibility) foreach ($results as $visibility)
{ {
// Translate the visibility selection // Translate the visibility selection
@ -65,8 +65,7 @@ class JFormFieldClasspropertiesfiltervisibility extends JFormFieldList
// Now add the visibility and its text to the options array // Now add the visibility and its text to the options array
$_filter[] = JHtml::_('select.option', $visibility, JText::_($text)); $_filter[] = JHtml::_('select.option', $visibility, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldCustomadminviewsfilteraddcustombutton extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -');
if ($results) if ($results)
{ {
// get custom_admin_viewsmodel // get custom_admin_viewsmodel
$model = ComponentbuilderHelper::getModel('custom_admin_views'); $model = ComponentbuilderHelper::getModel('custom_admin_views');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -');
foreach ($results as $add_custom_button) foreach ($results as $add_custom_button)
{ {
// Translate the add_custom_button selection // Translate the add_custom_button selection
@ -65,8 +65,7 @@ class JFormFieldCustomadminviewsfilteraddcustombutton extends JFormFieldList
// Now add the add_custom_button and its text to the options array // Now add the add_custom_button and its text to the options array
$_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text)); $_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldCustomadminviewsfilteraddphpajax extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -');
if ($results) if ($results)
{ {
// get custom_admin_viewsmodel // get custom_admin_viewsmodel
$model = ComponentbuilderHelper::getModel('custom_admin_views'); $model = ComponentbuilderHelper::getModel('custom_admin_views');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -');
foreach ($results as $add_php_ajax) foreach ($results as $add_php_ajax)
{ {
// Translate the add_php_ajax selection // Translate the add_php_ajax selection
@ -65,8 +65,7 @@ class JFormFieldCustomadminviewsfilteraddphpajax extends JFormFieldList
// Now add the add_php_ajax and its text to the options array // Now add the add_php_ajax and its text to the options array
$_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text)); $_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldCustomcodesfiltercommenttype extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMMENT_TYPE') . ' -');
if ($results) if ($results)
{ {
// get custom_codesmodel // get custom_codesmodel
$model = ComponentbuilderHelper::getModel('custom_codes'); $model = ComponentbuilderHelper::getModel('custom_codes');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMMENT_TYPE') . ' -');
foreach ($results as $comment_type) foreach ($results as $comment_type)
{ {
// Translate the comment_type selection // Translate the comment_type selection
@ -65,8 +65,7 @@ class JFormFieldCustomcodesfiltercommenttype extends JFormFieldList
// Now add the comment_type and its text to the options array // Now add the comment_type and its text to the options array
$_filter[] = JHtml::_('select.option', $comment_type, JText::_($text)); $_filter[] = JHtml::_('select.option', $comment_type, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldCustomcodesfiltertarget extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -');
if ($results) if ($results)
{ {
// get custom_codesmodel // get custom_codesmodel
$model = ComponentbuilderHelper::getModel('custom_codes'); $model = ComponentbuilderHelper::getModel('custom_codes');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -');
foreach ($results as $target) foreach ($results as $target)
{ {
// Translate the target selection // Translate the target selection
@ -65,8 +65,7 @@ class JFormFieldCustomcodesfiltertarget extends JFormFieldList
// Now add the target and its text to the options array // Now add the target and its text to the options array
$_filter[] = JHtml::_('select.option', $target, JText::_($text)); $_filter[] = JHtml::_('select.option', $target, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldCustomcodesfiltertype extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
if ($results) if ($results)
{ {
// get custom_codesmodel // get custom_codesmodel
$model = ComponentbuilderHelper::getModel('custom_codes'); $model = ComponentbuilderHelper::getModel('custom_codes');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
foreach ($results as $type) foreach ($results as $type)
{ {
// Translate the type selection // Translate the type selection
@ -65,8 +65,7 @@ class JFormFieldCustomcodesfiltertype extends JFormFieldList
// Now add the type and its text to the options array // Now add the type and its text to the options array
$_filter[] = JHtml::_('select.option', $type, JText::_($text)); $_filter[] = JHtml::_('select.option', $type, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldDynamicgetsfiltergettype extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_GETTYPE') . ' -');
if ($results) if ($results)
{ {
// get dynamic_getsmodel // get dynamic_getsmodel
$model = ComponentbuilderHelper::getModel('dynamic_gets'); $model = ComponentbuilderHelper::getModel('dynamic_gets');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_GETTYPE') . ' -');
foreach ($results as $gettype) foreach ($results as $gettype)
{ {
// Translate the gettype selection // Translate the gettype selection
@ -65,8 +65,7 @@ class JFormFieldDynamicgetsfiltergettype extends JFormFieldList
// Now add the gettype and its text to the options array // Now add the gettype and its text to the options array
$_filter[] = JHtml::_('select.option', $gettype, JText::_($text)); $_filter[] = JHtml::_('select.option', $gettype, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldDynamicgetsfiltermainsource extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_SOURCE') . ' -');
if ($results) if ($results)
{ {
// get dynamic_getsmodel // get dynamic_getsmodel
$model = ComponentbuilderHelper::getModel('dynamic_gets'); $model = ComponentbuilderHelper::getModel('dynamic_gets');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_SOURCE') . ' -');
foreach ($results as $main_source) foreach ($results as $main_source)
{ {
// Translate the main_source selection // Translate the main_source selection
@ -65,8 +65,7 @@ class JFormFieldDynamicgetsfiltermainsource extends JFormFieldList
// Now add the main_source and its text to the options array // Now add the main_source and its text to the options array
$_filter[] = JHtml::_('select.option', $main_source, JText::_($text)); $_filter[] = JHtml::_('select.option', $main_source, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldFieldsfilterdatatype extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_DATATYPE') . ' -');
if ($results) if ($results)
{ {
// get fieldsmodel // get fieldsmodel
$model = ComponentbuilderHelper::getModel('fields'); $model = ComponentbuilderHelper::getModel('fields');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_DATATYPE') . ' -');
foreach ($results as $datatype) foreach ($results as $datatype)
{ {
// Translate the datatype selection // Translate the datatype selection
@ -65,8 +65,7 @@ class JFormFieldFieldsfilterdatatype extends JFormFieldList
// Now add the datatype and its text to the options array // Now add the datatype and its text to the options array
$_filter[] = JHtml::_('select.option', $datatype, JText::_($text)); $_filter[] = JHtml::_('select.option', $datatype, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldFieldsfilterindexes extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_INDEXES') . ' -');
if ($results) if ($results)
{ {
// get fieldsmodel // get fieldsmodel
$model = ComponentbuilderHelper::getModel('fields'); $model = ComponentbuilderHelper::getModel('fields');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_INDEXES') . ' -');
foreach ($results as $indexes) foreach ($results as $indexes)
{ {
// Translate the indexes selection // Translate the indexes selection
@ -65,8 +65,7 @@ class JFormFieldFieldsfilterindexes extends JFormFieldList
// Now add the indexes and its text to the options array // Now add the indexes and its text to the options array
$_filter[] = JHtml::_('select.option', $indexes, JText::_($text)); $_filter[] = JHtml::_('select.option', $indexes, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldFieldsfilternullswitch extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_NULL_SWITCH') . ' -');
if ($results) if ($results)
{ {
// get fieldsmodel // get fieldsmodel
$model = ComponentbuilderHelper::getModel('fields'); $model = ComponentbuilderHelper::getModel('fields');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_NULL_SWITCH') . ' -');
foreach ($results as $null_switch) foreach ($results as $null_switch)
{ {
// Translate the null_switch selection // Translate the null_switch selection
@ -65,8 +65,7 @@ class JFormFieldFieldsfilternullswitch extends JFormFieldList
// Now add the null_switch and its text to the options array // Now add the null_switch and its text to the options array
$_filter[] = JHtml::_('select.option', $null_switch, JText::_($text)); $_filter[] = JHtml::_('select.option', $null_switch, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldFieldsfilterstore extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_STORE') . ' -');
if ($results) if ($results)
{ {
// get fieldsmodel // get fieldsmodel
$model = ComponentbuilderHelper::getModel('fields'); $model = ComponentbuilderHelper::getModel('fields');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_STORE') . ' -');
foreach ($results as $store) foreach ($results as $store)
{ {
// Translate the store selection // Translate the store selection
@ -65,8 +65,7 @@ class JFormFieldFieldsfilterstore extends JFormFieldList
// Now add the store and its text to the options array // Now add the store and its text to the options array
$_filter[] = JHtml::_('select.option', $store, JText::_($text)); $_filter[] = JHtml::_('select.option', $store, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldHelpdocumentsfilterlocation extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_LOCATION') . ' -');
if ($results) if ($results)
{ {
// get help_documentsmodel // get help_documentsmodel
$model = ComponentbuilderHelper::getModel('help_documents'); $model = ComponentbuilderHelper::getModel('help_documents');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_LOCATION') . ' -');
foreach ($results as $location) foreach ($results as $location)
{ {
// Translate the location selection // Translate the location selection
@ -65,8 +65,7 @@ class JFormFieldHelpdocumentsfilterlocation extends JFormFieldList
// Now add the location and its text to the options array // Now add the location and its text to the options array
$_filter[] = JHtml::_('select.option', $location, JText::_($text)); $_filter[] = JHtml::_('select.option', $location, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldHelpdocumentsfiltertype extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
if ($results) if ($results)
{ {
// get help_documentsmodel // get help_documentsmodel
$model = ComponentbuilderHelper::getModel('help_documents'); $model = ComponentbuilderHelper::getModel('help_documents');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
foreach ($results as $type) foreach ($results as $type)
{ {
// Translate the type selection // Translate the type selection
@ -65,8 +65,7 @@ class JFormFieldHelpdocumentsfiltertype extends JFormFieldList
// Now add the type and its text to the options array // Now add the type and its text to the options array
$_filter[] = JHtml::_('select.option', $type, JText::_($text)); $_filter[] = JHtml::_('select.option', $type, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,19 +50,18 @@ class JFormFieldJoomlacomponentsfilterauthor extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_AUTHOR') . ' -');
if ($results) if ($results)
{ {
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_AUTHOR') . ' -');
foreach ($results as $author) foreach ($results as $author)
{ {
// Now add the author and its text to the options array // Now add the author and its text to the options array
$_filter[] = JHtml::_('select.option', $author, $author); $_filter[] = JHtml::_('select.option', $author, $author);
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,19 +50,18 @@ class JFormFieldJoomlacomponentsfiltercompanyname extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMPANYNAME') . ' -');
if ($results) if ($results)
{ {
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMPANYNAME') . ' -');
foreach ($results as $companyname) foreach ($results as $companyname)
{ {
// Now add the companyname and its text to the options array // Now add the companyname and its text to the options array
$_filter[] = JHtml::_('select.option', $companyname, $companyname); $_filter[] = JHtml::_('select.option', $companyname, $companyname);
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldJoomlamodulesfiltertarget extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -');
if ($results) if ($results)
{ {
// get joomla_modulesmodel // get joomla_modulesmodel
$model = ComponentbuilderHelper::getModel('joomla_modules'); $model = ComponentbuilderHelper::getModel('joomla_modules');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -');
foreach ($results as $target) foreach ($results as $target)
{ {
// Translate the target selection // Translate the target selection
@ -65,8 +65,7 @@ class JFormFieldJoomlamodulesfiltertarget extends JFormFieldList
// Now add the target and its text to the options array // Now add the target and its text to the options array
$_filter[] = JHtml::_('select.option', $target, JText::_($text)); $_filter[] = JHtml::_('select.option', $target, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldLayoutsfilteraddphpview extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW') . ' -');
if ($results) if ($results)
{ {
// get layoutsmodel // get layoutsmodel
$model = ComponentbuilderHelper::getModel('layouts'); $model = ComponentbuilderHelper::getModel('layouts');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW') . ' -');
foreach ($results as $add_php_view) foreach ($results as $add_php_view)
{ {
// Translate the add_php_view selection // Translate the add_php_view selection
@ -65,8 +65,7 @@ class JFormFieldLayoutsfilteraddphpview extends JFormFieldList
// Now add the add_php_view and its text to the options array // Now add the add_php_view and its text to the options array
$_filter[] = JHtml::_('select.option', $add_php_view, JText::_($text)); $_filter[] = JHtml::_('select.option', $add_php_view, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldLibrariesfiltertarget extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -');
if ($results) if ($results)
{ {
// get librariesmodel // get librariesmodel
$model = ComponentbuilderHelper::getModel('libraries'); $model = ComponentbuilderHelper::getModel('libraries');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -');
foreach ($results as $target) foreach ($results as $target)
{ {
// Translate the target selection // Translate the target selection
@ -65,8 +65,7 @@ class JFormFieldLibrariesfiltertarget extends JFormFieldList
// Now add the target and its text to the options array // Now add the target and its text to the options array
$_filter[] = JHtml::_('select.option', $target, JText::_($text)); $_filter[] = JHtml::_('select.option', $target, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldLibrariesfiltertype extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
if ($results) if ($results)
{ {
// get librariesmodel // get librariesmodel
$model = ComponentbuilderHelper::getModel('libraries'); $model = ComponentbuilderHelper::getModel('libraries');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
foreach ($results as $type) foreach ($results as $type)
{ {
// Translate the type selection // Translate the type selection
@ -65,8 +65,7 @@ class JFormFieldLibrariesfiltertype extends JFormFieldList
// Now add the type and its text to the options array // Now add the type and its text to the options array
$_filter[] = JHtml::_('select.option', $type, JText::_($text)); $_filter[] = JHtml::_('select.option', $type, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,19 +50,18 @@ class JFormFieldServersfiltername extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_NAME') . ' -');
if ($results) if ($results)
{ {
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_NAME') . ' -');
foreach ($results as $name) foreach ($results as $name)
{ {
// Now add the name and its text to the options array // Now add the name and its text to the options array
$_filter[] = JHtml::_('select.option', $name, $name); $_filter[] = JHtml::_('select.option', $name, $name);
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldServersfilterprotocol extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_PROTOCOL') . ' -');
if ($results) if ($results)
{ {
// get serversmodel // get serversmodel
$model = ComponentbuilderHelper::getModel('servers'); $model = ComponentbuilderHelper::getModel('servers');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_PROTOCOL') . ' -');
foreach ($results as $protocol) foreach ($results as $protocol)
{ {
// Translate the protocol selection // Translate the protocol selection
@ -65,8 +65,7 @@ class JFormFieldServersfilterprotocol extends JFormFieldList
// Now add the protocol and its text to the options array // Now add the protocol and its text to the options array
$_filter[] = JHtml::_('select.option', $protocol, JText::_($text)); $_filter[] = JHtml::_('select.option', $protocol, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldSiteviewsfilteraddcustombutton extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -');
if ($results) if ($results)
{ {
// get site_viewsmodel // get site_viewsmodel
$model = ComponentbuilderHelper::getModel('site_views'); $model = ComponentbuilderHelper::getModel('site_views');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -');
foreach ($results as $add_custom_button) foreach ($results as $add_custom_button)
{ {
// Translate the add_custom_button selection // Translate the add_custom_button selection
@ -65,8 +65,7 @@ class JFormFieldSiteviewsfilteraddcustombutton extends JFormFieldList
// Now add the add_custom_button and its text to the options array // Now add the add_custom_button and its text to the options array
$_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text)); $_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldSiteviewsfilteraddphpajax extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -');
if ($results) if ($results)
{ {
// get site_viewsmodel // get site_viewsmodel
$model = ComponentbuilderHelper::getModel('site_views'); $model = ComponentbuilderHelper::getModel('site_views');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -');
foreach ($results as $add_php_ajax) foreach ($results as $add_php_ajax)
{ {
// Translate the add_php_ajax selection // Translate the add_php_ajax selection
@ -65,8 +65,7 @@ class JFormFieldSiteviewsfilteraddphpajax extends JFormFieldList
// Now add the add_php_ajax and its text to the options array // Now add the add_php_ajax and its text to the options array
$_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text)); $_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -50,14 +50,14 @@ class JFormFieldTemplatesfilteraddphpview extends JFormFieldList
$db->setQuery($query); $db->setQuery($query);
$results = $db->loadColumn(); $results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW') . ' -');
if ($results) if ($results)
{ {
// get templatesmodel // get templatesmodel
$model = ComponentbuilderHelper::getModel('templates'); $model = ComponentbuilderHelper::getModel('templates');
$results = array_unique($results); $results = array_unique($results);
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW') . ' -');
foreach ($results as $add_php_view) foreach ($results as $add_php_view)
{ {
// Translate the add_php_view selection // Translate the add_php_view selection
@ -65,8 +65,7 @@ class JFormFieldTemplatesfilteraddphpview extends JFormFieldList
// Now add the add_php_view and its text to the options array // Now add the add_php_view and its text to the options array
$_filter[] = JHtml::_('select.option', $add_php_view, JText::_($text)); $_filter[] = JHtml::_('select.option', $add_php_view, JText::_($text));
} }
return $_filter;
} }
return false; return $_filter;
} }
} }

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name> <name>COM_COMPONENTBUILDER</name>
<creationDate>5th December, 2020</creationDate> <creationDate>7th December, 2020</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail> <authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl> <authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>