From 4d0097f8e4f9f546651f9d1a9dc37f036e3b4899 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Mon, 7 Dec 2020 17:44:16 +0200 Subject: [PATCH] Fixed Warning: Invalid argument supplied for foreach() in ../html/libraries/cms/html/select.php on line 592 by adding empty select option. --- README.md | 4 +-- admin/README.txt | 4 +-- admin/helpers/compiler/e_Interpretation.php | 36 +++++++++---------- .../adminviewsfilteraddcustombutton.php | 7 ++-- .../adminviewsfilteraddcustomimport.php | 7 ++-- .../fields/adminviewsfilteraddfadein.php | 7 ++-- .../fields/adminviewsfilteraddphpajax.php | 7 ++-- admin/models/fields/adminviewsfiltertype.php | 5 ++- .../classextendingsfilterextensiontype.php | 7 ++-- .../classmethodsfilterextensiontype.php | 7 ++-- .../fields/classmethodsfiltervisibility.php | 7 ++-- .../classpropertiesfilterextensiontype.php | 7 ++-- .../classpropertiesfiltervisibility.php | 7 ++-- .../customadminviewsfilteraddcustombutton.php | 7 ++-- .../customadminviewsfilteraddphpajax.php | 7 ++-- .../fields/customcodesfiltercommenttype.php | 7 ++-- .../models/fields/customcodesfiltertarget.php | 7 ++-- admin/models/fields/customcodesfiltertype.php | 7 ++-- .../fields/dynamicgetsfiltergettype.php | 7 ++-- .../fields/dynamicgetsfiltermainsource.php | 7 ++-- admin/models/fields/fieldsfilterdatatype.php | 7 ++-- admin/models/fields/fieldsfilterindexes.php | 7 ++-- .../models/fields/fieldsfilternullswitch.php | 7 ++-- admin/models/fields/fieldsfilterstore.php | 7 ++-- .../fields/helpdocumentsfilterlocation.php | 7 ++-- .../models/fields/helpdocumentsfiltertype.php | 7 ++-- .../fields/joomlacomponentsfilterauthor.php | 7 ++-- .../joomlacomponentsfiltercompanyname.php | 7 ++-- .../fields/joomlamodulesfiltertarget.php | 7 ++-- .../models/fields/layoutsfilteraddphpview.php | 7 ++-- admin/models/fields/librariesfiltertarget.php | 7 ++-- admin/models/fields/librariesfiltertype.php | 7 ++-- admin/models/fields/serversfiltername.php | 7 ++-- admin/models/fields/serversfilterprotocol.php | 7 ++-- .../fields/siteviewsfilteraddcustombutton.php | 7 ++-- .../fields/siteviewsfilteraddphpajax.php | 7 ++-- .../fields/templatesfilteraddphpview.php | 7 ++-- componentbuilder.xml | 2 +- 38 files changed, 122 insertions(+), 160 deletions(-) diff --git a/README.md b/README.md index 32364d302..7c160b90d 100644 --- a/README.md +++ b/README.md @@ -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*: 5th December, 2020 ++ *Last Build*: 7th December, 2020 + *Version*: 2.12.1 + *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*: **289032** ++ *Line count*: **288998** + *Field count*: **1537** + *File count*: **1902** + *Folder count*: **304** diff --git a/admin/README.txt b/admin/README.txt index 32364d302..7c160b90d 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -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*: 5th December, 2020 ++ *Last Build*: 7th December, 2020 + *Version*: 2.12.1 + *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*: **289032** ++ *Line count*: **288998** + *Field count*: **1537** + *File count*: **1902** + *Folder count*: **304** diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 9a171cb8e..61e0e05de 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -17645,28 +17645,26 @@ class Interpretation extends Fields $function[] = $this->_t(2) . "\$db->setQuery(\$query);"; $function[] = PHP_EOL . $this->_t(2) . "\$results = \$db->loadObjectList();"; - $function[] = $this->_t(2) . "if (\$results)"; - $function[] = $this->_t(2) . "{"; - $function[] = $this->_t(3) . "\$filter = array();"; - $function[] = $this->_t(3) . "\$batch = array();"; + $function[] = $this->_t(2) . "\$_filter = array();"; // if this is not a multi field if (!$funtion_path && $filter['multi'] == 1) { - $function[] = $this->_t(4) - . "\$filter[] = JHtml::_('select.option', '', '- Select ' . JText:" + $function[] = $this->_t(2) + . "\$_filter[] = JHtml::_('select.option', '', '- Select ' . JText:" . ":_('" . $filter['lang'] . "') . ' -');"; } + $function[] = $this->_t(2) . "if (\$results)"; + $function[] = $this->_t(2) . "{"; $function[] = $this->_t(3) . "foreach (\$results as \$result)"; $function[] = $this->_t(3) . "{"; $function[] = $this->_t(4) - . "\$filter[] = JHtml::_('select.option', \$result->" + . "\$_filter[] = JHtml::_('select.option', \$result->" . $filter['custom']['id'] . ", \$result->" . $filter['custom']['text'] . ");"; $function[] = $this->_t(3) . "}"; - $function[] = $this->_t(3) . "return \$filter;"; $function[] = $this->_t(2) . "}"; - $function[] = $this->_t(2) . "return false;"; + $function[] = $this->_t(2) . "return \$_filter;"; // add if this is a function path if ($funtion_path) { @@ -17799,7 +17797,14 @@ class Interpretation extends Fields $function[] = PHP_EOL . $this->_t(2) . "\$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[] = $this->_t(2) . "{"; @@ -17827,14 +17832,6 @@ class Interpretation extends Fields $function[] = $this->_t(3) . "\$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 \$" . $filter['code'] . ")"; $function[] = $this->_t(3) . "{"; @@ -17894,9 +17891,8 @@ class Interpretation extends Fields } } $function[] = $this->_t(3) . "}"; - $function[] = $this->_t(3) . "return \$_filter;"; $function[] = $this->_t(2) . "}"; - $function[] = $this->_t(2) . "return false;"; + $function[] = $this->_t(2) . "return \$_filter;"; // add if this is a function path if ($funtion_path) { diff --git a/admin/models/fields/adminviewsfilteraddcustombutton.php b/admin/models/fields/adminviewsfilteraddcustombutton.php index 1bce36980..1c5d4f8cf 100644 --- a/admin/models/fields/adminviewsfilteraddcustombutton.php +++ b/admin/models/fields/adminviewsfilteraddcustombutton.php @@ -50,14 +50,14 @@ class JFormFieldAdminviewsfilteraddcustombutton extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -'); if ($results) { // get admin_viewsmodel $model = ComponentbuilderHelper::getModel('admin_views'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -'); foreach ($results as $add_custom_button) { // 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 $_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/adminviewsfilteraddcustomimport.php b/admin/models/fields/adminviewsfilteraddcustomimport.php index 87e61454c..d70b97b9c 100644 --- a/admin/models/fields/adminviewsfilteraddcustomimport.php +++ b/admin/models/fields/adminviewsfilteraddcustomimport.php @@ -50,14 +50,14 @@ class JFormFieldAdminviewsfilteraddcustomimport extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_IMPORT') . ' -'); if ($results) { // get admin_viewsmodel $model = ComponentbuilderHelper::getModel('admin_views'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_IMPORT') . ' -'); foreach ($results as $add_custom_import) { // 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 $_filter[] = JHtml::_('select.option', $add_custom_import, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/adminviewsfilteraddfadein.php b/admin/models/fields/adminviewsfilteraddfadein.php index d6d673f01..6d56b2850 100644 --- a/admin/models/fields/adminviewsfilteraddfadein.php +++ b/admin/models/fields/adminviewsfilteraddfadein.php @@ -50,14 +50,14 @@ class JFormFieldAdminviewsfilteraddfadein extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_FADEIN') . ' -'); if ($results) { // get admin_viewsmodel $model = ComponentbuilderHelper::getModel('admin_views'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_FADEIN') . ' -'); foreach ($results as $add_fadein) { // 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 $_filter[] = JHtml::_('select.option', $add_fadein, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/adminviewsfilteraddphpajax.php b/admin/models/fields/adminviewsfilteraddphpajax.php index d05e413a3..256262d86 100644 --- a/admin/models/fields/adminviewsfilteraddphpajax.php +++ b/admin/models/fields/adminviewsfilteraddphpajax.php @@ -50,14 +50,14 @@ class JFormFieldAdminviewsfilteraddphpajax extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -'); if ($results) { // get admin_viewsmodel $model = ComponentbuilderHelper::getModel('admin_views'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -'); foreach ($results as $add_php_ajax) { // 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 $_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/adminviewsfiltertype.php b/admin/models/fields/adminviewsfiltertype.php index 75f995a3d..ca04fe13a 100644 --- a/admin/models/fields/adminviewsfiltertype.php +++ b/admin/models/fields/adminviewsfiltertype.php @@ -50,13 +50,13 @@ class JFormFieldAdminviewsfiltertype extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); if ($results) { // get admin_viewsmodel $model = ComponentbuilderHelper::getModel('admin_views'); $results = array_unique($results); - $_filter = array(); foreach ($results as $type) { // Translate the type selection @@ -64,8 +64,7 @@ class JFormFieldAdminviewsfiltertype extends JFormFieldList // Now add the type and its text to the options array $_filter[] = JHtml::_('select.option', $type, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/classextendingsfilterextensiontype.php b/admin/models/fields/classextendingsfilterextensiontype.php index 8a89da556..03328f045 100644 --- a/admin/models/fields/classextendingsfilterextensiontype.php +++ b/admin/models/fields/classextendingsfilterextensiontype.php @@ -50,14 +50,14 @@ class JFormFieldClassextendingsfilterextensiontype extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -'); if ($results) { // get class_extendingsmodel $model = ComponentbuilderHelper::getModel('class_extendings'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -'); foreach ($results as $extension_type) { // 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 $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/classmethodsfilterextensiontype.php b/admin/models/fields/classmethodsfilterextensiontype.php index dc1e827be..bdb0badd0 100644 --- a/admin/models/fields/classmethodsfilterextensiontype.php +++ b/admin/models/fields/classmethodsfilterextensiontype.php @@ -50,14 +50,14 @@ class JFormFieldClassmethodsfilterextensiontype extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -'); if ($results) { // get class_methodsmodel $model = ComponentbuilderHelper::getModel('class_methods'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -'); foreach ($results as $extension_type) { // 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 $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/classmethodsfiltervisibility.php b/admin/models/fields/classmethodsfiltervisibility.php index 6f3937849..f7ad02c29 100644 --- a/admin/models/fields/classmethodsfiltervisibility.php +++ b/admin/models/fields/classmethodsfiltervisibility.php @@ -50,14 +50,14 @@ class JFormFieldClassmethodsfiltervisibility extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -'); if ($results) { // get class_methodsmodel $model = ComponentbuilderHelper::getModel('class_methods'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -'); foreach ($results as $visibility) { // Translate the visibility selection @@ -65,8 +65,7 @@ class JFormFieldClassmethodsfiltervisibility extends JFormFieldList // Now add the visibility and its text to the options array $_filter[] = JHtml::_('select.option', $visibility, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/classpropertiesfilterextensiontype.php b/admin/models/fields/classpropertiesfilterextensiontype.php index 543cce231..23175fb16 100644 --- a/admin/models/fields/classpropertiesfilterextensiontype.php +++ b/admin/models/fields/classpropertiesfilterextensiontype.php @@ -50,14 +50,14 @@ class JFormFieldClasspropertiesfilterextensiontype extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -'); if ($results) { // get class_propertiesmodel $model = ComponentbuilderHelper::getModel('class_properties'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -'); foreach ($results as $extension_type) { // 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 $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/classpropertiesfiltervisibility.php b/admin/models/fields/classpropertiesfiltervisibility.php index 354ec431d..96575483a 100644 --- a/admin/models/fields/classpropertiesfiltervisibility.php +++ b/admin/models/fields/classpropertiesfiltervisibility.php @@ -50,14 +50,14 @@ class JFormFieldClasspropertiesfiltervisibility extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -'); if ($results) { // get class_propertiesmodel $model = ComponentbuilderHelper::getModel('class_properties'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -'); foreach ($results as $visibility) { // Translate the visibility selection @@ -65,8 +65,7 @@ class JFormFieldClasspropertiesfiltervisibility extends JFormFieldList // Now add the visibility and its text to the options array $_filter[] = JHtml::_('select.option', $visibility, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/customadminviewsfilteraddcustombutton.php b/admin/models/fields/customadminviewsfilteraddcustombutton.php index eface73ee..2b7141390 100644 --- a/admin/models/fields/customadminviewsfilteraddcustombutton.php +++ b/admin/models/fields/customadminviewsfilteraddcustombutton.php @@ -50,14 +50,14 @@ class JFormFieldCustomadminviewsfilteraddcustombutton extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -'); if ($results) { // get custom_admin_viewsmodel $model = ComponentbuilderHelper::getModel('custom_admin_views'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -'); foreach ($results as $add_custom_button) { // 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 $_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/customadminviewsfilteraddphpajax.php b/admin/models/fields/customadminviewsfilteraddphpajax.php index adfe747f8..d5c6530a7 100644 --- a/admin/models/fields/customadminviewsfilteraddphpajax.php +++ b/admin/models/fields/customadminviewsfilteraddphpajax.php @@ -50,14 +50,14 @@ class JFormFieldCustomadminviewsfilteraddphpajax extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -'); if ($results) { // get custom_admin_viewsmodel $model = ComponentbuilderHelper::getModel('custom_admin_views'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -'); foreach ($results as $add_php_ajax) { // 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 $_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/customcodesfiltercommenttype.php b/admin/models/fields/customcodesfiltercommenttype.php index 26af81b2f..126e7769e 100644 --- a/admin/models/fields/customcodesfiltercommenttype.php +++ b/admin/models/fields/customcodesfiltercommenttype.php @@ -50,14 +50,14 @@ class JFormFieldCustomcodesfiltercommenttype extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMMENT_TYPE') . ' -'); if ($results) { // get custom_codesmodel $model = ComponentbuilderHelper::getModel('custom_codes'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMMENT_TYPE') . ' -'); foreach ($results as $comment_type) { // 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 $_filter[] = JHtml::_('select.option', $comment_type, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/customcodesfiltertarget.php b/admin/models/fields/customcodesfiltertarget.php index 605d37176..4f36d830d 100644 --- a/admin/models/fields/customcodesfiltertarget.php +++ b/admin/models/fields/customcodesfiltertarget.php @@ -50,14 +50,14 @@ class JFormFieldCustomcodesfiltertarget extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -'); if ($results) { // get custom_codesmodel $model = ComponentbuilderHelper::getModel('custom_codes'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -'); foreach ($results as $target) { // Translate the target selection @@ -65,8 +65,7 @@ class JFormFieldCustomcodesfiltertarget extends JFormFieldList // Now add the target and its text to the options array $_filter[] = JHtml::_('select.option', $target, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/customcodesfiltertype.php b/admin/models/fields/customcodesfiltertype.php index 573a6466f..11bf6965a 100644 --- a/admin/models/fields/customcodesfiltertype.php +++ b/admin/models/fields/customcodesfiltertype.php @@ -50,14 +50,14 @@ class JFormFieldCustomcodesfiltertype extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -'); if ($results) { // get custom_codesmodel $model = ComponentbuilderHelper::getModel('custom_codes'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -'); foreach ($results as $type) { // Translate the type selection @@ -65,8 +65,7 @@ class JFormFieldCustomcodesfiltertype extends JFormFieldList // Now add the type and its text to the options array $_filter[] = JHtml::_('select.option', $type, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/dynamicgetsfiltergettype.php b/admin/models/fields/dynamicgetsfiltergettype.php index 171343be2..4dec0318d 100644 --- a/admin/models/fields/dynamicgetsfiltergettype.php +++ b/admin/models/fields/dynamicgetsfiltergettype.php @@ -50,14 +50,14 @@ class JFormFieldDynamicgetsfiltergettype extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_GETTYPE') . ' -'); if ($results) { // get dynamic_getsmodel $model = ComponentbuilderHelper::getModel('dynamic_gets'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_GETTYPE') . ' -'); foreach ($results as $gettype) { // Translate the gettype selection @@ -65,8 +65,7 @@ class JFormFieldDynamicgetsfiltergettype extends JFormFieldList // Now add the gettype and its text to the options array $_filter[] = JHtml::_('select.option', $gettype, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/dynamicgetsfiltermainsource.php b/admin/models/fields/dynamicgetsfiltermainsource.php index 4d16def53..7df765736 100644 --- a/admin/models/fields/dynamicgetsfiltermainsource.php +++ b/admin/models/fields/dynamicgetsfiltermainsource.php @@ -50,14 +50,14 @@ class JFormFieldDynamicgetsfiltermainsource extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_SOURCE') . ' -'); if ($results) { // get dynamic_getsmodel $model = ComponentbuilderHelper::getModel('dynamic_gets'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_SOURCE') . ' -'); foreach ($results as $main_source) { // 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 $_filter[] = JHtml::_('select.option', $main_source, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/fieldsfilterdatatype.php b/admin/models/fields/fieldsfilterdatatype.php index 894a13e89..cd1216c50 100644 --- a/admin/models/fields/fieldsfilterdatatype.php +++ b/admin/models/fields/fieldsfilterdatatype.php @@ -50,14 +50,14 @@ class JFormFieldFieldsfilterdatatype extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_DATATYPE') . ' -'); if ($results) { // get fieldsmodel $model = ComponentbuilderHelper::getModel('fields'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_DATATYPE') . ' -'); foreach ($results as $datatype) { // Translate the datatype selection @@ -65,8 +65,7 @@ class JFormFieldFieldsfilterdatatype extends JFormFieldList // Now add the datatype and its text to the options array $_filter[] = JHtml::_('select.option', $datatype, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/fieldsfilterindexes.php b/admin/models/fields/fieldsfilterindexes.php index c187c8891..6353c699b 100644 --- a/admin/models/fields/fieldsfilterindexes.php +++ b/admin/models/fields/fieldsfilterindexes.php @@ -50,14 +50,14 @@ class JFormFieldFieldsfilterindexes extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_INDEXES') . ' -'); if ($results) { // get fieldsmodel $model = ComponentbuilderHelper::getModel('fields'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_INDEXES') . ' -'); foreach ($results as $indexes) { // Translate the indexes selection @@ -65,8 +65,7 @@ class JFormFieldFieldsfilterindexes extends JFormFieldList // Now add the indexes and its text to the options array $_filter[] = JHtml::_('select.option', $indexes, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/fieldsfilternullswitch.php b/admin/models/fields/fieldsfilternullswitch.php index 43e3f2f8d..2b035ebab 100644 --- a/admin/models/fields/fieldsfilternullswitch.php +++ b/admin/models/fields/fieldsfilternullswitch.php @@ -50,14 +50,14 @@ class JFormFieldFieldsfilternullswitch extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_NULL_SWITCH') . ' -'); if ($results) { // get fieldsmodel $model = ComponentbuilderHelper::getModel('fields'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_NULL_SWITCH') . ' -'); foreach ($results as $null_switch) { // 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 $_filter[] = JHtml::_('select.option', $null_switch, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/fieldsfilterstore.php b/admin/models/fields/fieldsfilterstore.php index f94685398..ef6c7e296 100644 --- a/admin/models/fields/fieldsfilterstore.php +++ b/admin/models/fields/fieldsfilterstore.php @@ -50,14 +50,14 @@ class JFormFieldFieldsfilterstore extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_STORE') . ' -'); if ($results) { // get fieldsmodel $model = ComponentbuilderHelper::getModel('fields'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_STORE') . ' -'); foreach ($results as $store) { // Translate the store selection @@ -65,8 +65,7 @@ class JFormFieldFieldsfilterstore extends JFormFieldList // Now add the store and its text to the options array $_filter[] = JHtml::_('select.option', $store, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/helpdocumentsfilterlocation.php b/admin/models/fields/helpdocumentsfilterlocation.php index 20c42c2df..622365996 100644 --- a/admin/models/fields/helpdocumentsfilterlocation.php +++ b/admin/models/fields/helpdocumentsfilterlocation.php @@ -50,14 +50,14 @@ class JFormFieldHelpdocumentsfilterlocation extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_LOCATION') . ' -'); if ($results) { // get help_documentsmodel $model = ComponentbuilderHelper::getModel('help_documents'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_LOCATION') . ' -'); foreach ($results as $location) { // Translate the location selection @@ -65,8 +65,7 @@ class JFormFieldHelpdocumentsfilterlocation extends JFormFieldList // Now add the location and its text to the options array $_filter[] = JHtml::_('select.option', $location, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/helpdocumentsfiltertype.php b/admin/models/fields/helpdocumentsfiltertype.php index 3d43e3f44..c2df3b6b8 100644 --- a/admin/models/fields/helpdocumentsfiltertype.php +++ b/admin/models/fields/helpdocumentsfiltertype.php @@ -50,14 +50,14 @@ class JFormFieldHelpdocumentsfiltertype extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -'); if ($results) { // get help_documentsmodel $model = ComponentbuilderHelper::getModel('help_documents'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -'); foreach ($results as $type) { // Translate the type selection @@ -65,8 +65,7 @@ class JFormFieldHelpdocumentsfiltertype extends JFormFieldList // Now add the type and its text to the options array $_filter[] = JHtml::_('select.option', $type, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/joomlacomponentsfilterauthor.php b/admin/models/fields/joomlacomponentsfilterauthor.php index 3975831b9..77735e00e 100644 --- a/admin/models/fields/joomlacomponentsfilterauthor.php +++ b/admin/models/fields/joomlacomponentsfilterauthor.php @@ -50,19 +50,18 @@ class JFormFieldJoomlacomponentsfilterauthor extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_AUTHOR') . ' -'); if ($results) { $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_AUTHOR') . ' -'); foreach ($results as $author) { // Now add the author and its text to the options array $_filter[] = JHtml::_('select.option', $author, $author); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/joomlacomponentsfiltercompanyname.php b/admin/models/fields/joomlacomponentsfiltercompanyname.php index 932d7aa82..3b5b3e198 100644 --- a/admin/models/fields/joomlacomponentsfiltercompanyname.php +++ b/admin/models/fields/joomlacomponentsfiltercompanyname.php @@ -50,19 +50,18 @@ class JFormFieldJoomlacomponentsfiltercompanyname extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMPANYNAME') . ' -'); if ($results) { $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMPANYNAME') . ' -'); foreach ($results as $companyname) { // Now add the companyname and its text to the options array $_filter[] = JHtml::_('select.option', $companyname, $companyname); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/joomlamodulesfiltertarget.php b/admin/models/fields/joomlamodulesfiltertarget.php index 6cba43f71..f2e182739 100644 --- a/admin/models/fields/joomlamodulesfiltertarget.php +++ b/admin/models/fields/joomlamodulesfiltertarget.php @@ -50,14 +50,14 @@ class JFormFieldJoomlamodulesfiltertarget extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -'); if ($results) { // get joomla_modulesmodel $model = ComponentbuilderHelper::getModel('joomla_modules'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -'); foreach ($results as $target) { // Translate the target selection @@ -65,8 +65,7 @@ class JFormFieldJoomlamodulesfiltertarget extends JFormFieldList // Now add the target and its text to the options array $_filter[] = JHtml::_('select.option', $target, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/layoutsfilteraddphpview.php b/admin/models/fields/layoutsfilteraddphpview.php index 6837653db..7336ce4f9 100644 --- a/admin/models/fields/layoutsfilteraddphpview.php +++ b/admin/models/fields/layoutsfilteraddphpview.php @@ -50,14 +50,14 @@ class JFormFieldLayoutsfilteraddphpview extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW') . ' -'); if ($results) { // get layoutsmodel $model = ComponentbuilderHelper::getModel('layouts'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW') . ' -'); foreach ($results as $add_php_view) { // 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 $_filter[] = JHtml::_('select.option', $add_php_view, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/librariesfiltertarget.php b/admin/models/fields/librariesfiltertarget.php index 7032f8890..a10d9003b 100644 --- a/admin/models/fields/librariesfiltertarget.php +++ b/admin/models/fields/librariesfiltertarget.php @@ -50,14 +50,14 @@ class JFormFieldLibrariesfiltertarget extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -'); if ($results) { // get librariesmodel $model = ComponentbuilderHelper::getModel('libraries'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -'); foreach ($results as $target) { // Translate the target selection @@ -65,8 +65,7 @@ class JFormFieldLibrariesfiltertarget extends JFormFieldList // Now add the target and its text to the options array $_filter[] = JHtml::_('select.option', $target, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/librariesfiltertype.php b/admin/models/fields/librariesfiltertype.php index 5a85e5b14..1fc9d61ab 100644 --- a/admin/models/fields/librariesfiltertype.php +++ b/admin/models/fields/librariesfiltertype.php @@ -50,14 +50,14 @@ class JFormFieldLibrariesfiltertype extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -'); if ($results) { // get librariesmodel $model = ComponentbuilderHelper::getModel('libraries'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -'); foreach ($results as $type) { // Translate the type selection @@ -65,8 +65,7 @@ class JFormFieldLibrariesfiltertype extends JFormFieldList // Now add the type and its text to the options array $_filter[] = JHtml::_('select.option', $type, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/serversfiltername.php b/admin/models/fields/serversfiltername.php index f56c942e2..c46f59405 100644 --- a/admin/models/fields/serversfiltername.php +++ b/admin/models/fields/serversfiltername.php @@ -50,19 +50,18 @@ class JFormFieldServersfiltername extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_NAME') . ' -'); if ($results) { $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_NAME') . ' -'); foreach ($results as $name) { // Now add the name and its text to the options array $_filter[] = JHtml::_('select.option', $name, $name); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/serversfilterprotocol.php b/admin/models/fields/serversfilterprotocol.php index b097e393b..0c28a0cbf 100644 --- a/admin/models/fields/serversfilterprotocol.php +++ b/admin/models/fields/serversfilterprotocol.php @@ -50,14 +50,14 @@ class JFormFieldServersfilterprotocol extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_PROTOCOL') . ' -'); if ($results) { // get serversmodel $model = ComponentbuilderHelper::getModel('servers'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_PROTOCOL') . ' -'); foreach ($results as $protocol) { // Translate the protocol selection @@ -65,8 +65,7 @@ class JFormFieldServersfilterprotocol extends JFormFieldList // Now add the protocol and its text to the options array $_filter[] = JHtml::_('select.option', $protocol, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/siteviewsfilteraddcustombutton.php b/admin/models/fields/siteviewsfilteraddcustombutton.php index 584b1886a..a7fd728c5 100644 --- a/admin/models/fields/siteviewsfilteraddcustombutton.php +++ b/admin/models/fields/siteviewsfilteraddcustombutton.php @@ -50,14 +50,14 @@ class JFormFieldSiteviewsfilteraddcustombutton extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -'); if ($results) { // get site_viewsmodel $model = ComponentbuilderHelper::getModel('site_views'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -'); foreach ($results as $add_custom_button) { // 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 $_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/siteviewsfilteraddphpajax.php b/admin/models/fields/siteviewsfilteraddphpajax.php index 0260ca22e..2437db426 100644 --- a/admin/models/fields/siteviewsfilteraddphpajax.php +++ b/admin/models/fields/siteviewsfilteraddphpajax.php @@ -50,14 +50,14 @@ class JFormFieldSiteviewsfilteraddphpajax extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -'); if ($results) { // get site_viewsmodel $model = ComponentbuilderHelper::getModel('site_views'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -'); foreach ($results as $add_php_ajax) { // 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 $_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/models/fields/templatesfilteraddphpview.php b/admin/models/fields/templatesfilteraddphpview.php index 441b0408e..66e29a52d 100644 --- a/admin/models/fields/templatesfilteraddphpview.php +++ b/admin/models/fields/templatesfilteraddphpview.php @@ -50,14 +50,14 @@ class JFormFieldTemplatesfilteraddphpview extends JFormFieldList $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW') . ' -'); if ($results) { // get templatesmodel $model = ComponentbuilderHelper::getModel('templates'); $results = array_unique($results); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW') . ' -'); foreach ($results as $add_php_view) { // 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 $_filter[] = JHtml::_('select.option', $add_php_view, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/componentbuilder.xml b/componentbuilder.xml index f9564160b..8efde3ca5 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 5th December, 2020 + 7th December, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com