From f20039b3900aae0c494e7a5cbb2b64999b7efc12 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Mon, 30 Nov 2020 05:59:45 +0200 Subject: [PATCH] Added getListViewDefaultOrdering method to compiler. Moved getFieldDatabaseName to the get class of the compiler. Updated the setFieldFilterListSet method. Imporved the filter query code to ignore empty values. gh-378 --- README.md | 4 +- admin/README.txt | 4 +- admin/helpers/compiler/a_Get.php | 92 ++++++ admin/helpers/compiler/c_Fields.php | 311 ++++++++++++++---- admin/helpers/compiler/e_Interpretation.php | 174 ++++------ admin/helpers/compiler/f_Infusion.php | 1 - admin/models/admin_views.php | 80 ++++- admin/models/class_extendings.php | 16 +- admin/models/class_methods.php | 32 +- admin/models/class_properties.php | 32 +- admin/models/custom_admin_views.php | 48 ++- admin/models/custom_codes.php | 64 +++- admin/models/dynamic_gets.php | 32 +- admin/models/fields.php | 80 ++++- admin/models/help_documents.php | 64 +++- admin/models/joomla_components.php | 32 +- admin/models/joomla_modules.php | 16 +- admin/models/joomla_plugin_groups.php | 16 +- admin/models/joomla_plugins.php | 32 +- admin/models/layouts.php | 32 +- admin/models/libraries.php | 48 ++- admin/models/servers.php | 32 +- admin/models/site_views.php | 48 ++- admin/models/snippets.php | 32 +- admin/models/templates.php | 32 +- admin/sql/install.mysql.utf8.sql | 2 +- admin/views/admins_custom_tabs/view.html.php | 2 +- admin/views/admins_fields/view.html.php | 2 +- .../admins_fields_conditions/view.html.php | 2 +- .../admins_fields_relations/view.html.php | 2 +- admin/views/class_extendings/view.html.php | 2 +- .../components_admin_views/view.html.php | 2 +- admin/views/components_config/view.html.php | 2 +- .../view.html.php | 2 +- .../view.html.php | 2 +- .../views/components_dashboard/view.html.php | 2 +- .../components_files_folders/view.html.php | 2 +- admin/views/components_modules/view.html.php | 2 +- .../components_mysql_tweaks/view.html.php | 2 +- .../components_placeholders/view.html.php | 2 +- admin/views/components_plugins/view.html.php | 2 +- .../views/components_site_views/view.html.php | 2 +- admin/views/components_updates/view.html.php | 2 +- admin/views/custom_admin_views/view.html.php | 2 +- admin/views/custom_codes/view.html.php | 2 +- admin/views/fields/view.html.php | 2 +- admin/views/fieldtypes/view.html.php | 2 +- admin/views/help_documents/view.html.php | 6 +- .../view.html.php | 2 +- .../joomla_modules_updates/view.html.php | 2 +- .../views/joomla_plugin_groups/view.html.php | 4 +- admin/views/joomla_plugins/view.html.php | 4 +- .../view.html.php | 2 +- .../joomla_plugins_updates/view.html.php | 2 +- .../views/language_translations/view.html.php | 2 +- admin/views/languages/view.html.php | 2 +- admin/views/layouts/view.html.php | 2 +- admin/views/libraries/view.html.php | 2 +- admin/views/libraries_config/view.html.php | 2 +- .../view.html.php | 2 +- admin/views/servers/view.html.php | 2 +- admin/views/site_views/view.html.php | 2 +- admin/views/snippet_types/view.html.php | 2 +- admin/views/snippets/view.html.php | 4 +- admin/views/templates/view.html.php | 2 +- componentbuilder.xml | 2 +- 66 files changed, 1124 insertions(+), 322 deletions(-) diff --git a/README.md b/README.md index 1556f3749..c9eee0333 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*: 29th November, 2020 ++ *Last Build*: 30th November, 2020 + *Version*: 2.11.7 + *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*: **284144** ++ *Line count*: **284720** + *Field count*: **1537** + *File count*: **1799** + *Folder count*: **304** diff --git a/admin/README.txt b/admin/README.txt index 1556f3749..c9eee0333 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*: 29th November, 2020 ++ *Last Build*: 30th November, 2020 + *Version*: 2.11.7 + *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*: **284144** ++ *Line count*: **284720** + *Field count*: **1537** + *File count*: **1799** + *Folder count*: **304** diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 7cdec4777..1ecf32328 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -4143,6 +4143,98 @@ class Get } } + /** + * get the list default ordering values + * + * @param string $nameListCode The list view name + * + * @return array + * + */ + public function getListViewDefaultOrdering(&$nameListCode) + { + if (isset($this->viewsDefaultOrdering[$nameListCode]) + && $this->viewsDefaultOrdering[$nameListCode]['add_admin_ordering'] == 1) + { + foreach ( + $this->viewsDefaultOrdering[$nameListCode]['admin_ordering_fields'] + as $order_field + ) + { + if (($order_field_name = $this->getFieldDatabaseName( + $nameListCode, $order_field['field'] + )) !== false) + { + // just the first field is the based ordering state + return array( + 'name' => $order_field_name, + 'direction' => $order_field['direction'] + ); + } + } + } + // the default + return array( + 'name' => 'a.id', + 'direction' => 'DESC' + ); + } + + /** + * get the field database name and AS prefix + * + * @param string $nameListCode The list view name + * @param int $fieldId The field ID + * @param string $targetArea The area being targeted + * + * @return string + * + */ + public function getFieldDatabaseName($nameListCode, int $fieldId, + $targetArea = 'listBuilder' + ) { + if (isset($this->{$targetArea}[$nameListCode])) + { + if ($fieldId < 0) + { + switch ($fieldId) + { + case -1: + return 'a.id'; + case -2: + return 'a.ordering'; + case -3: + return 'a.published'; + } + } + foreach ($this->{$targetArea}[$nameListCode] as $field) + { + if ($field['id'] == $fieldId) + { + // now check if this is a category + if ($field['type'] === 'category') + { + return 'c.title'; + } + // set the custom code + elseif (ComponentbuilderHelper::checkArray( + $field['custom'] + )) + { + return $field['custom']['db'] . "." + . $field['custom']['text']; + } + else + { + return 'a.' . $field['code']; + } + } + } + } + + return false; + } + /** * Get the field's actual type * diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 3ec806ce1..5ea05552d 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -4559,10 +4559,11 @@ class Fields extends Structure // set lang $listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($tempName, true); + // set field name + $listFieldName = ComponentbuilderHelper::safeString($tempName, 'W'); // add to lang array $this->setLangContent( - $this->lang, $listLangName, - ComponentbuilderHelper::safeString($tempName, 'W') + $this->lang, $listLangName, $listFieldName ); } else @@ -4570,10 +4571,11 @@ class Fields extends Structure // set lang (just in case) $listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($name, true); + // set field name + $listFieldName = ComponentbuilderHelper::safeString($name, 'W'); // add to lang array $this->setLangContent( - $this->lang, $listLangName, - ComponentbuilderHelper::safeString($name, 'W') + $this->lang, $listLangName, $listFieldName ); // if label was set use instead if (ComponentbuilderHelper::checkString($langLabel)) @@ -4971,6 +4973,8 @@ class Fields extends Structure $this->selectionTranslationFixBuilder[$nameListCode][$name] = $options; } + // main lang filter prefix + $lang_filter_ = $this->langPrefix . '_FILTER_'; // build the sort values if ($dbSwitch && (isset($field['sort']) && $field['sort'] == 1) && ($listSwitch || $listJoin) @@ -4979,11 +4983,40 @@ class Fields extends Structure && $typeName != 'repeatable' && $typeName != 'subform')) { - $this->sortBuilder[$nameListCode][] = array('type' => $typeName, - 'code' => $name, - 'lang' => $listLangName, - 'custom' => $custom, - 'options' => $options); + // add the language only for new filter option + $filter_name_asc_lang = ''; + $filter_name_desc_lang = ''; + if (isset($this->adminFilterType[$nameListCode]) + && $this->adminFilterType[$nameListCode] == 2) + { + // set the language strings for ascending + $filter_name_asc = $listFieldName . ' ascending'; + $filter_name_asc_lang = $lang_filter_ + . ComponentbuilderHelper::safeString( + $filter_name_asc, 'U' + ); + // and to translation + $this->setLangContent( + $this->lang, $filter_name_asc_lang, $filter_name_asc + ); + // set the language strings for descending + $filter_name_desc = $listFieldName . ' descending'; + $filter_name_desc_lang = $lang_filter_ + . ComponentbuilderHelper::safeString( + $filter_name_desc, 'U' + ); + // and to translation + $this->setLangContent( + $this->lang, $filter_name_desc_lang, $filter_name_desc + ); + } + $this->sortBuilder[$nameListCode][] = array('type' => $typeName, + 'code' => $name, + 'lang' => $listLangName, + 'lang_asc' => $filter_name_asc_lang, + 'lang_desc' => $filter_name_desc_lang, + 'custom' => $custom, + 'options' => $options); } // build the search values if ($dbSwitch && isset($field['search']) && $field['search'] == 1) @@ -5011,6 +5044,23 @@ class Fields extends Structure $filter_function_name = ComponentbuilderHelper::safeString( $name, 'F' ); + // add the language only for new filter option + $filter_name_select_lang = ''; + if (isset($this->adminFilterType[$nameListCode]) + && $this->adminFilterType[$nameListCode] == 2) + { + // set the language strings for selection + $filter_name_select = 'Select ' . $listFieldName; + $filter_name_select_lang = $lang_filter_ + . ComponentbuilderHelper::safeString( + $filter_name_select, 'U' + ); + // and to translation + $this->setLangContent( + $this->lang, $filter_name_select_lang, $filter_name_select + ); + } + // add the filter details $this->filterBuilder[$nameListCode][] = array( 'id' => (int) $field['field'], @@ -5019,6 +5069,7 @@ class Fields extends Structure 'code' => $name, 'label' => $langLabel, 'lang' => $listLangName, + 'lang_select' => $filter_name_select_lang, 'database' => $nameSingleCode, 'function' => $filter_function_name, 'custom' => $custom, @@ -5498,17 +5549,29 @@ class Fields extends Structure { // check if this is the above/new filter option if (isset($this->adminFilterType[$nameListCode]) - && $this->adminFilterType[$nameListCode] == 2 - && isset($this->filterBuilder[$nameListCode]) - && ComponentbuilderHelper::checkArray( - $this->filterBuilder[$nameListCode] - )) + && $this->adminFilterType[$nameListCode] == 2) { // we first create the file $target = array('admin' => 'filter_' . $nameListCode); $this->buildDynamique( $target, 'filter' ); + // the search language string + $lang_search = $this->langPrefix . '_FILTER_SEARCH'; + // and to translation + $this->setLangContent( + $this->lang, $lang_search, 'Search' + . ComponentbuilderHelper::safeString($nameListCode, 'w') + ); + // the search description language string + $lang_search_desc = $this->langPrefix . '_FILTER_SEARCH_' + . strtoupper($nameListCode); + // and to translation + $this->setLangContent( + $this->lang, $lang_search_desc, 'Search the ' + . ComponentbuilderHelper::safeString($nameSingleCode, 'w') + . ' items. Prefix with ID: to search for an item by ID.' + ); // now build the XML $field_filter_sets = array(); $field_filter_sets[] = $this->_t(1) . ''; @@ -5518,21 +5581,35 @@ class Fields extends Structure $field_filter_sets[] = $this->_t(3) . 'name="search"'; $field_filter_sets[] = $this->_t(3) . 'inputmode="search"'; $field_filter_sets[] = $this->_t(3) - . 'label="COM_CONTENT_FILTER_SEARCH_LABEL"'; + . 'label="' . $lang_search . '"'; $field_filter_sets[] = $this->_t(3) - . 'description="COM_CONTENT_FILTER_SEARCH_DESC"'; + . 'description="' . $lang_search_desc . '"'; $field_filter_sets[] = $this->_t(3) . 'hint="JSEARCH_FILTER"'; $field_filter_sets[] = $this->_t(2) . '/>'; // add the published filter if published is not set if (!isset($this->fieldsNames[$nameSingleCode]['published'])) { + // the published language string + $lang_published = $this->langPrefix . '_FILTER_PUBLISHED'; + // and to translation + $this->setLangContent( + $this->lang, $lang_published, 'Status' + ); + // the published description language string + $lang_published_desc = $this->langPrefix . '_FILTER_PUBLISHED_' + . strtoupper($nameListCode); + // and to translation + $this->setLangContent( + $this->lang, $lang_published_desc, 'Status options for ' + . ComponentbuilderHelper::safeString($nameListCode, 'w') + ); $field_filter_sets[] = $this->_t(2) . '_t(3) . 'type="status"'; $field_filter_sets[] = $this->_t(3) . 'name="published"'; $field_filter_sets[] = $this->_t(3) - . 'label="COM_CONTENT_FILTER_PUBLISHED"'; + . 'label="' . $lang_published . '"'; $field_filter_sets[] = $this->_t(3) - . 'description="COM_CONTENT_FILTER_PUBLISHED_DESC"'; + . 'description="' . $lang_published_desc . '"'; $field_filter_sets[] = $this->_t(3) . 'onchange="this.form.submit();"'; $field_filter_sets[] = $this->_t(2) . '>'; @@ -5563,49 +5640,57 @@ class Fields extends Structure $field_filter_sets[] = $this->_t(2) . '/>'; } // now add the dynamic fields - foreach ($this->filterBuilder[$nameListCode] as $r => &$filter) + if (isset($this->filterBuilder[$nameListCode]) + && ComponentbuilderHelper::checkArray( + $this->filterBuilder[$nameListCode] + )) { - if ($filter['type'] != 'category') + foreach ($this->filterBuilder[$nameListCode] as $r => &$filter) { - $field_filter_sets[] = $this->_t(2) . '_t(3) . 'type="' - . $filter['type'] . '"'; - // set css classname of this field - $filter['class'] = ucfirst($filter['type']); - } - else - { - // we use the filter field type that was build - $field_filter_sets[] = $this->_t(3) . 'type="' - . $filter['filter_type'] . '"'; - // set css classname of this field - $filter['class'] = ucfirst($filter['filter_type']); - } - $field_filter_sets[] = $this->_t(3) . 'name="' - . $filter['code'] . '"'; - $field_filter_sets[] = $this->_t(3) . 'label="' - . $filter['label'] . '"'; - // if this is a multi field - if ($filter['multi'] == 2) - { - $field_filter_sets[] = $this->_t(3) . 'class="multiple' - . $filter['class'] . '"'; - $field_filter_sets[] = $this->_t(3) . 'multiple="true"'; - } - else + if ($filter['type'] != 'category') { + $field_filter_sets[] = $this->_t(2) . '_t(3) . 'type="' + . $filter['type'] . '"'; + // set css classname of this field + $filter['class'] = ucfirst($filter['type']); + } + else + { + // we use the filter field type that was build + $field_filter_sets[] = $this->_t(3) . 'type="' + . $filter['filter_type'] . '"'; + // set css classname of this field + $filter['class'] = ucfirst($filter['filter_type']); + } + $field_filter_sets[] = $this->_t(3) . 'name="' + . $filter['code'] . '"'; + $field_filter_sets[] = $this->_t(3) . 'label="' + . $filter['label'] . '"'; + // if this is a multi field + if ($filter['multi'] == 2) + { + $field_filter_sets[] = $this->_t(3) + . 'class="multiple' + . $filter['class'] . '"'; + $field_filter_sets[] = $this->_t(3) + . 'multiple="true"'; + } + else + { + $field_filter_sets[] = $this->_t(3) + . 'multiple="false"'; + } $field_filter_sets[] = $this->_t(3) - . 'multiple="false"'; + . 'onchange="this.form.submit();"'; + $field_filter_sets[] = $this->_t(2) . '/>'; } - $field_filter_sets[] = $this->_t(3) - . 'onchange="this.form.submit();"'; - $field_filter_sets[] = $this->_t(2) . '/>'; } } $field_filter_sets[] = $this->_t(2) @@ -5630,7 +5715,119 @@ class Fields extends Structure */ public function setFieldFilterListSet(&$nameSingleCode, &$nameListCode) { - // soon we will add this TODO + // check if this is the above/new filter option + if (isset($this->adminFilterType[$nameListCode]) + && $this->adminFilterType[$nameListCode] == 2) + { + // keep track of all fields already added + $donelist = array('ordering' => true, 'id' => true); + // now build the XML + $list_sets = array(); + $list_sets[] = $this->_t(1) . ''; + $list_sets[] = $this->_t(2) . '_t(3) . 'name="fullordering"'; + $list_sets[] = $this->_t(3) . 'type="list"'; + $list_sets[] = $this->_t(3) + . 'label="COM_CONTENT_LIST_FULL_ORDERING"'; + $list_sets[] = $this->_t(3) + . 'description="COM_CONTENT_LIST_FULL_ORDERING_DESC"'; + $list_sets[] = $this->_t(3) . 'onchange="this.form.submit();"'; + // add dynamic ordering (Admin view) + $default_ordering = $this->getListViewDefaultOrdering( + $nameListCode + ); + // set the default ordering + $list_sets[] = $this->_t(3) . 'default="' + . $default_ordering['name'] . ' ' + . $default_ordering['direction'] . '"'; + $list_sets[] = $this->_t(3) . 'validate="options"'; + $list_sets[] = $this->_t(2) . '>'; + $list_sets[] = $this->_t(3) + . ''; + $list_sets[] = $this->_t(3) + . ''; + $list_sets[] = $this->_t(3) + . ''; + // add the published filter if published is not set + if (!isset($this->fieldsNames[$nameSingleCode]['published'])) + { + // add to done list + $donelist['published'] = true; + // add to xml :) + $list_sets[] = $this->_t(3) + . ''; + $list_sets[] = $this->_t(3) + . ''; + } + + // add the rest of the set filters + if (isset($this->sortBuilder[$nameListCode]) + && ComponentbuilderHelper::checkArray( + $this->sortBuilder[$nameListCode] + )) + { + foreach ($this->sortBuilder[$nameListCode] as $filter) + { + if (!isset($donelist[$filter['code']])) + { + if ($filter['type'] === 'category') + { + $list_sets[] = $this->_t(3) + . ''; + $list_sets[] = $this->_t(3) + . ''; + } + elseif (ComponentbuilderHelper::checkArray( + $filter['custom'] + )) + { + $list_sets[] = $this->_t(3) . ''; + $list_sets[] = $this->_t(3) . ''; + } + else + { + $list_sets[] = $this->_t(3) . ''; + $list_sets[] = $this->_t(3) . ''; + } + // do not add again + $donelist[$filter['code']] = true; + } + } + } + + $list_sets[] = $this->_t(3) + . ''; + $list_sets[] = $this->_t(3) + . ''; + $list_sets[] = $this->_t(2) . '' . PHP_EOL; + + $list_sets[] = $this->_t(2) . '_t(3) . 'name="limit"'; + $list_sets[] = $this->_t(3) . 'type="limitbox"'; + $list_sets[] = $this->_t(3) . 'label="COM_CONTENT_LIST_LIMIT"'; + $list_sets[] = $this->_t(3) + . 'description="COM_CONTENT_LIST_LIMIT_DESC"'; + $list_sets[] = $this->_t(3) . 'class="input-mini"'; + $list_sets[] = $this->_t(3) . 'default="25"'; + $list_sets[] = $this->_t(3) . 'onchange="this.form.submit();"'; + $list_sets[] = $this->_t(2) . '/>'; + $list_sets[] = $this->_t(1) . ''; + + return implode(PHP_EOL, $list_sets); + } + return ''; } diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 35eb9410b..ce7bae67a 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -5121,49 +5121,19 @@ class Interpretation extends Fields $script .= PHP_EOL . $this->_t(2) . "\$this->activeFilters " . "= \$this->get('ActiveFilters');"; } - // add the custom ordering if set - if (isset($this->viewsDefaultOrdering[$nameListCode]) - && $this->viewsDefaultOrdering[$nameListCode]['add_admin_ordering'] - == 1) - { - // the first is from the state - $order_first = true; - foreach ( - $this->viewsDefaultOrdering[$nameListCode]['admin_ordering_fields'] - as $order_field - ) - { - if ($order_first - && ($order_field_name = $this->getFieldDatabaseName( - $nameListCode, $order_field['field'] - )) !== false) - { - // just the first field is based on state - $order_first = false; - $script .= PHP_EOL . $this->_t(2) . "//" - . $this->setLine( - __LINE__ - ) . " Add the list ordering clause."; - $script .= PHP_EOL . $this->_t(2) - . "\$this->listOrder = \$this->escape(\$this->state->get('list.ordering', '" - . $order_field_name . "'));"; - $script .= PHP_EOL . $this->_t(2) - . "\$this->listDirn = \$this->escape(\$this->state->get('list.direction', '" - . $order_field['direction'] . "'));"; - } - } - } - // if no ordering is added we must add default - if (!ComponentbuilderHelper::checkString($script)) - { - $script .= PHP_EOL . $this->_t(2) . "//" . $this->setLine( - __LINE__ - ) . " Add the list ordering clause."; - $script .= PHP_EOL . $this->_t(2) - . "\$this->listOrder = \$this->escape(\$this->state->get('list.ordering', 'a.id'));"; - $script .= PHP_EOL . $this->_t(2) - . "\$this->listDirn = \$this->escape(\$this->state->get('list.direction', 'asc'));"; - } + // get the default ordering values + $default_ordering = $this->getListViewDefaultOrdering($nameListCode); + // now add the default ordering + $script .= PHP_EOL . $this->_t(2) . "//" + . $this->setLine( + __LINE__ + ) . " Add the list ordering clause."; + $script .= PHP_EOL . $this->_t(2) + . "\$this->listOrder = \$this->escape(\$this->state->get('list.ordering', '" + . $default_ordering['name'] . "'));"; + $script .= PHP_EOL . $this->_t(2) + . "\$this->listDirn = \$this->escape(\$this->state->get('list.direction', '" + . $default_ordering['direction'] . "'));"; return $script; } @@ -15507,57 +15477,6 @@ class Interpretation extends Fields return $query; } - /** - * get the field database name and AS prefix - * - * @return string - * - */ - protected function getFieldDatabaseName($nameListCode, int $fieldId, - $targetArea = 'listBuilder' - ) { - if (isset($this->{$targetArea}[$nameListCode])) - { - if ($fieldId < 0) - { - switch ($fieldId) - { - case -1: - return 'a.id'; - case -2: - return 'a.ordering'; - case -3: - return 'a.published'; - } - } - foreach ($this->{$targetArea}[$nameListCode] as $field) - { - if ($field['id'] == $fieldId) - { - // now check if this is a category - if ($field['type'] === 'category') - { - return 'c.title'; - } - // set the custom code - elseif (ComponentbuilderHelper::checkArray( - $field['custom'] - )) - { - return $field['custom']['db'] . "." - . $field['custom']['text']; - } - else - { - return 'a.' . $field['code']; - } - } - } - } - - return false; - } - public function setSearchQuery($nameListCode) { if (isset($this->searchBuilder[$nameListCode]) @@ -15739,7 +15658,7 @@ class Interpretation extends Fields else { $filterQuery .= $this->setSingleFilterQuery( - $filter + $filter, $Helper ); } } @@ -15755,21 +15674,40 @@ class Interpretation extends Fields * build single filter query * * @param array $filter The field/filter + * @param string $Helper The helper name of the component being build * @param string $a The db table target name (a) * * @return string The php to place in model to filter this field * */ - protected function setSingleFilterQuery($filter, $a = "a") + protected function setSingleFilterQuery($filter, $Helper, $a = "a") { - $filterQuery = PHP_EOL . $this->_t(2) . "if (\$" + $filterQuery = PHP_EOL . $this->_t(2) . "\$_" . $filter['code'] . " = \$this->getState('filter." - . $filter['code'] . "'))"; + . $filter['code'] . "');"; + $filterQuery .= PHP_EOL . $this->_t(2) . "if (is_numeric(\$_" + . $filter['code'] . "))"; + $filterQuery .= PHP_EOL . $this->_t(2) . "{"; + $filterQuery .= PHP_EOL . $this->_t(3) . "if (is_float(\$_" + . $filter['code'] . "))"; + $filterQuery .= PHP_EOL . $this->_t(3) . "{"; + $filterQuery .= PHP_EOL . $this->_t(4) + . "\$query->where('" . $a . "." . $filter['code'] + . " = ' . (float) \$_" . $filter['code'] . ");"; + $filterQuery .= PHP_EOL . $this->_t(3) . "}"; + $filterQuery .= PHP_EOL . $this->_t(3) . "else"; + $filterQuery .= PHP_EOL . $this->_t(3) . "{"; + $filterQuery .= PHP_EOL . $this->_t(4) + . "\$query->where('" . $a . "." . $filter['code'] + . " = ' . (int) \$_" . $filter['code'] . ");"; + $filterQuery .= PHP_EOL . $this->_t(3) . "}"; + $filterQuery .= PHP_EOL . $this->_t(2) . "}"; + $filterQuery .= PHP_EOL . $this->_t(2) . "elseif (" + . $Helper . "::checkString(\$_" . $filter['code'] . "))"; $filterQuery .= PHP_EOL . $this->_t(2) . "{"; $filterQuery .= PHP_EOL . $this->_t(3) . "\$query->where('" . $a . "." . $filter['code'] - . " = ' . \$db->quote(\$db->escape(\$" - . $filter['code'] + . " = ' . \$db->quote(\$db->escape(\$_" . $filter['code'] . ")));"; $filterQuery .= PHP_EOL . $this->_t(2) . "}"; @@ -17637,6 +17575,13 @@ class Interpretation extends Fields $function[] = $this->_t(2) . "{"; $function[] = $this->_t(3) . "\$filter = array();"; $function[] = $this->_t(3) . "\$batch = array();"; + // if this is not a multi field + if (!$funtion_path && $filter['multi'] == 1) + { + $function[] = $this->_t(4) + . "\$filter[] = JHtml::_('select.option', '', '- Select ' . JText:" + . ":_('" . $filter['lang'] . "') . ' -');"; + } $function[] = $this->_t(3) . "foreach (\$results as \$result)"; $function[] = $this->_t(3) . "{"; @@ -17802,6 +17747,13 @@ class Interpretation extends Fields . "\$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', '', '- Select ' . JText:" + . ":_('" . $filter['lang'] . "') . ' -');"; + } $function[] = $this->_t(3) . "foreach (\$results as \$" . $filter['code'] . ")"; $function[] = $this->_t(3) . "{"; @@ -17878,8 +17830,6 @@ class Interpretation extends Fields && $filter['multi'] == 2 && ComponentbuilderHelper::checkArray($filter['custom'])) { - //var_dump($filter); - //jexit(); // get the field code $field_code = $this->getCustomFieldCode( $filter['custom'] @@ -18068,8 +18018,8 @@ class Interpretation extends Fields __LINE__ ) . " " . $CodeName . " Filter"; $fieldFilters[] = $this->_t(3) . "JHtmlSidebar::addFilter("; - $fieldFilters[] = $this->_t(4) . "'- Select '.JText:" - . ":_('" . $filter['lang'] . "').' -',"; + $fieldFilters[] = $this->_t(4) . "'- Select ' . JText:" + . ":_('" . $filter['lang'] . "') . ' -',"; $fieldFilters[] = $this->_t(4) . "'filter_" . $filter['code'] . "',"; @@ -21873,30 +21823,18 @@ class Interpretation extends Fields $this->filterBuilder[$nameListCode] )) { - // main lang prefix - $lang_ = $this->langPrefix . '_FILTER_'; foreach ($this->filterBuilder[$nameListCode] as $filter) { // we need this only for filters that are multi if (isset($filter['multi']) && $filter['multi'] == 2) { - // set the selection string (not ideal) - $select_name = "Select " . strip_tags($filter['name']); - // set the language - $select_lang = $lang_ . ComponentbuilderHelper::safeString( - $select_name, 'U' - ); - // set selection lang - $this->setLangContent( - $this->lang, $select_lang, $select_name - ); // add the header $headers[] = 'JHtml::_(\'formbehavior.chosen\', \'.multiple' . $filter['class'] - . '\', null, array(\'placeholder_text_multiple\' => JText::_(\'' - . $select_lang . '\')));'; + . '\', null, array(\'placeholder_text_multiple\' => \'- \' . JText::_(\'' + . $filter['lang_select'] . '\') . \' -\'));'; } } } diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index d3a69a991..6c41d475a 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -1486,7 +1486,6 @@ class Infusion extends Interpretation . 'CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT' . $this->hhh] = $this->setCustomViewSubmitButtonScript($view); - // setup the templates $this->setCustomViewTemplateBody($view); diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index 659fee20b..5b17926ed 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -302,29 +302,89 @@ class ComponentbuilderModelAdmin_views extends JModelList } // Filter by Add_fadein. - if ($add_fadein = $this->getState('filter.add_fadein')) + $_add_fadein = $this->getState('filter.add_fadein'); + if (is_numeric($_add_fadein)) { - $query->where('a.add_fadein = ' . $db->quote($db->escape($add_fadein))); + if (is_float($_add_fadein)) + { + $query->where('a.add_fadein = ' . (float) $_add_fadein); + } + else + { + $query->where('a.add_fadein = ' . (int) $_add_fadein); + } + } + elseif (ComponentbuilderHelper::checkString($_add_fadein)) + { + $query->where('a.add_fadein = ' . $db->quote($db->escape($_add_fadein))); } // Filter by Type. - if ($type = $this->getState('filter.type')) + $_type = $this->getState('filter.type'); + if (is_numeric($_type)) { - $query->where('a.type = ' . $db->quote($db->escape($type))); + if (is_float($_type)) + { + $query->where('a.type = ' . (float) $_type); + } + else + { + $query->where('a.type = ' . (int) $_type); + } + } + elseif (ComponentbuilderHelper::checkString($_type)) + { + $query->where('a.type = ' . $db->quote($db->escape($_type))); } // Filter by Add_custom_button. - if ($add_custom_button = $this->getState('filter.add_custom_button')) + $_add_custom_button = $this->getState('filter.add_custom_button'); + if (is_numeric($_add_custom_button)) { - $query->where('a.add_custom_button = ' . $db->quote($db->escape($add_custom_button))); + if (is_float($_add_custom_button)) + { + $query->where('a.add_custom_button = ' . (float) $_add_custom_button); + } + else + { + $query->where('a.add_custom_button = ' . (int) $_add_custom_button); + } + } + elseif (ComponentbuilderHelper::checkString($_add_custom_button)) + { + $query->where('a.add_custom_button = ' . $db->quote($db->escape($_add_custom_button))); } // Filter by Add_php_ajax. - if ($add_php_ajax = $this->getState('filter.add_php_ajax')) + $_add_php_ajax = $this->getState('filter.add_php_ajax'); + if (is_numeric($_add_php_ajax)) { - $query->where('a.add_php_ajax = ' . $db->quote($db->escape($add_php_ajax))); + if (is_float($_add_php_ajax)) + { + $query->where('a.add_php_ajax = ' . (float) $_add_php_ajax); + } + else + { + $query->where('a.add_php_ajax = ' . (int) $_add_php_ajax); + } + } + elseif (ComponentbuilderHelper::checkString($_add_php_ajax)) + { + $query->where('a.add_php_ajax = ' . $db->quote($db->escape($_add_php_ajax))); } // Filter by Add_custom_import. - if ($add_custom_import = $this->getState('filter.add_custom_import')) + $_add_custom_import = $this->getState('filter.add_custom_import'); + if (is_numeric($_add_custom_import)) { - $query->where('a.add_custom_import = ' . $db->quote($db->escape($add_custom_import))); + if (is_float($_add_custom_import)) + { + $query->where('a.add_custom_import = ' . (float) $_add_custom_import); + } + else + { + $query->where('a.add_custom_import = ' . (int) $_add_custom_import); + } + } + elseif (ComponentbuilderHelper::checkString($_add_custom_import)) + { + $query->where('a.add_custom_import = ' . $db->quote($db->escape($_add_custom_import))); } // Add the list ordering clause. diff --git a/admin/models/class_extendings.php b/admin/models/class_extendings.php index d8b01e73e..0f2e47158 100644 --- a/admin/models/class_extendings.php +++ b/admin/models/class_extendings.php @@ -220,9 +220,21 @@ class ComponentbuilderModelClass_extendings extends JModelList } // Filter by Extension_type. - if ($extension_type = $this->getState('filter.extension_type')) + $_extension_type = $this->getState('filter.extension_type'); + if (is_numeric($_extension_type)) { - $query->where('a.extension_type = ' . $db->quote($db->escape($extension_type))); + if (is_float($_extension_type)) + { + $query->where('a.extension_type = ' . (float) $_extension_type); + } + else + { + $query->where('a.extension_type = ' . (int) $_extension_type); + } + } + elseif (ComponentbuilderHelper::checkString($_extension_type)) + { + $query->where('a.extension_type = ' . $db->quote($db->escape($_extension_type))); } // Add the list ordering clause. diff --git a/admin/models/class_methods.php b/admin/models/class_methods.php index 3a97cbfbd..c444452ef 100644 --- a/admin/models/class_methods.php +++ b/admin/models/class_methods.php @@ -244,14 +244,38 @@ class ComponentbuilderModelClass_methods extends JModelList } // Filter by Visibility. - if ($visibility = $this->getState('filter.visibility')) + $_visibility = $this->getState('filter.visibility'); + if (is_numeric($_visibility)) { - $query->where('a.visibility = ' . $db->quote($db->escape($visibility))); + if (is_float($_visibility)) + { + $query->where('a.visibility = ' . (float) $_visibility); + } + else + { + $query->where('a.visibility = ' . (int) $_visibility); + } + } + elseif (ComponentbuilderHelper::checkString($_visibility)) + { + $query->where('a.visibility = ' . $db->quote($db->escape($_visibility))); } // Filter by Extension_type. - if ($extension_type = $this->getState('filter.extension_type')) + $_extension_type = $this->getState('filter.extension_type'); + if (is_numeric($_extension_type)) { - $query->where('a.extension_type = ' . $db->quote($db->escape($extension_type))); + if (is_float($_extension_type)) + { + $query->where('a.extension_type = ' . (float) $_extension_type); + } + else + { + $query->where('a.extension_type = ' . (int) $_extension_type); + } + } + elseif (ComponentbuilderHelper::checkString($_extension_type)) + { + $query->where('a.extension_type = ' . $db->quote($db->escape($_extension_type))); } // Add the list ordering clause. diff --git a/admin/models/class_properties.php b/admin/models/class_properties.php index 02d1ca5c0..9e633399f 100644 --- a/admin/models/class_properties.php +++ b/admin/models/class_properties.php @@ -244,14 +244,38 @@ class ComponentbuilderModelClass_properties extends JModelList } // Filter by Visibility. - if ($visibility = $this->getState('filter.visibility')) + $_visibility = $this->getState('filter.visibility'); + if (is_numeric($_visibility)) { - $query->where('a.visibility = ' . $db->quote($db->escape($visibility))); + if (is_float($_visibility)) + { + $query->where('a.visibility = ' . (float) $_visibility); + } + else + { + $query->where('a.visibility = ' . (int) $_visibility); + } + } + elseif (ComponentbuilderHelper::checkString($_visibility)) + { + $query->where('a.visibility = ' . $db->quote($db->escape($_visibility))); } // Filter by Extension_type. - if ($extension_type = $this->getState('filter.extension_type')) + $_extension_type = $this->getState('filter.extension_type'); + if (is_numeric($_extension_type)) { - $query->where('a.extension_type = ' . $db->quote($db->escape($extension_type))); + if (is_float($_extension_type)) + { + $query->where('a.extension_type = ' . (float) $_extension_type); + } + else + { + $query->where('a.extension_type = ' . (int) $_extension_type); + } + } + elseif (ComponentbuilderHelper::checkString($_extension_type)) + { + $query->where('a.extension_type = ' . $db->quote($db->escape($_extension_type))); } // Add the list ordering clause. diff --git a/admin/models/custom_admin_views.php b/admin/models/custom_admin_views.php index 5271a8931..84dd49fa8 100644 --- a/admin/models/custom_admin_views.php +++ b/admin/models/custom_admin_views.php @@ -253,19 +253,55 @@ class ComponentbuilderModelCustom_admin_views extends JModelList } // Filter by Main_get. - if ($main_get = $this->getState('filter.main_get')) + $_main_get = $this->getState('filter.main_get'); + if (is_numeric($_main_get)) { - $query->where('a.main_get = ' . $db->quote($db->escape($main_get))); + if (is_float($_main_get)) + { + $query->where('a.main_get = ' . (float) $_main_get); + } + else + { + $query->where('a.main_get = ' . (int) $_main_get); + } + } + elseif (ComponentbuilderHelper::checkString($_main_get)) + { + $query->where('a.main_get = ' . $db->quote($db->escape($_main_get))); } // Filter by Add_php_ajax. - if ($add_php_ajax = $this->getState('filter.add_php_ajax')) + $_add_php_ajax = $this->getState('filter.add_php_ajax'); + if (is_numeric($_add_php_ajax)) { - $query->where('a.add_php_ajax = ' . $db->quote($db->escape($add_php_ajax))); + if (is_float($_add_php_ajax)) + { + $query->where('a.add_php_ajax = ' . (float) $_add_php_ajax); + } + else + { + $query->where('a.add_php_ajax = ' . (int) $_add_php_ajax); + } + } + elseif (ComponentbuilderHelper::checkString($_add_php_ajax)) + { + $query->where('a.add_php_ajax = ' . $db->quote($db->escape($_add_php_ajax))); } // Filter by Add_custom_button. - if ($add_custom_button = $this->getState('filter.add_custom_button')) + $_add_custom_button = $this->getState('filter.add_custom_button'); + if (is_numeric($_add_custom_button)) { - $query->where('a.add_custom_button = ' . $db->quote($db->escape($add_custom_button))); + if (is_float($_add_custom_button)) + { + $query->where('a.add_custom_button = ' . (float) $_add_custom_button); + } + else + { + $query->where('a.add_custom_button = ' . (int) $_add_custom_button); + } + } + elseif (ComponentbuilderHelper::checkString($_add_custom_button)) + { + $query->where('a.add_custom_button = ' . $db->quote($db->escape($_add_custom_button))); } // Add the list ordering clause. diff --git a/admin/models/custom_codes.php b/admin/models/custom_codes.php index 126aba124..e827c0395 100644 --- a/admin/models/custom_codes.php +++ b/admin/models/custom_codes.php @@ -281,24 +281,72 @@ class ComponentbuilderModelCustom_codes extends JModelList } // Filter by Component. - if ($component = $this->getState('filter.component')) + $_component = $this->getState('filter.component'); + if (is_numeric($_component)) { - $query->where('a.component = ' . $db->quote($db->escape($component))); + if (is_float($_component)) + { + $query->where('a.component = ' . (float) $_component); + } + else + { + $query->where('a.component = ' . (int) $_component); + } + } + elseif (ComponentbuilderHelper::checkString($_component)) + { + $query->where('a.component = ' . $db->quote($db->escape($_component))); } // Filter by Target. - if ($target = $this->getState('filter.target')) + $_target = $this->getState('filter.target'); + if (is_numeric($_target)) { - $query->where('a.target = ' . $db->quote($db->escape($target))); + if (is_float($_target)) + { + $query->where('a.target = ' . (float) $_target); + } + else + { + $query->where('a.target = ' . (int) $_target); + } + } + elseif (ComponentbuilderHelper::checkString($_target)) + { + $query->where('a.target = ' . $db->quote($db->escape($_target))); } // Filter by Type. - if ($type = $this->getState('filter.type')) + $_type = $this->getState('filter.type'); + if (is_numeric($_type)) { - $query->where('a.type = ' . $db->quote($db->escape($type))); + if (is_float($_type)) + { + $query->where('a.type = ' . (float) $_type); + } + else + { + $query->where('a.type = ' . (int) $_type); + } + } + elseif (ComponentbuilderHelper::checkString($_type)) + { + $query->where('a.type = ' . $db->quote($db->escape($_type))); } // Filter by Comment_type. - if ($comment_type = $this->getState('filter.comment_type')) + $_comment_type = $this->getState('filter.comment_type'); + if (is_numeric($_comment_type)) { - $query->where('a.comment_type = ' . $db->quote($db->escape($comment_type))); + if (is_float($_comment_type)) + { + $query->where('a.comment_type = ' . (float) $_comment_type); + } + else + { + $query->where('a.comment_type = ' . (int) $_comment_type); + } + } + elseif (ComponentbuilderHelper::checkString($_comment_type)) + { + $query->where('a.comment_type = ' . $db->quote($db->escape($_comment_type))); } // Add the list ordering clause. diff --git a/admin/models/dynamic_gets.php b/admin/models/dynamic_gets.php index abfc22c8e..a76ac2665 100644 --- a/admin/models/dynamic_gets.php +++ b/admin/models/dynamic_gets.php @@ -241,14 +241,38 @@ class ComponentbuilderModelDynamic_gets extends JModelList } // Filter by Main_source. - if ($main_source = $this->getState('filter.main_source')) + $_main_source = $this->getState('filter.main_source'); + if (is_numeric($_main_source)) { - $query->where('a.main_source = ' . $db->quote($db->escape($main_source))); + if (is_float($_main_source)) + { + $query->where('a.main_source = ' . (float) $_main_source); + } + else + { + $query->where('a.main_source = ' . (int) $_main_source); + } + } + elseif (ComponentbuilderHelper::checkString($_main_source)) + { + $query->where('a.main_source = ' . $db->quote($db->escape($_main_source))); } // Filter by Gettype. - if ($gettype = $this->getState('filter.gettype')) + $_gettype = $this->getState('filter.gettype'); + if (is_numeric($_gettype)) { - $query->where('a.gettype = ' . $db->quote($db->escape($gettype))); + if (is_float($_gettype)) + { + $query->where('a.gettype = ' . (float) $_gettype); + } + else + { + $query->where('a.gettype = ' . (int) $_gettype); + } + } + elseif (ComponentbuilderHelper::checkString($_gettype)) + { + $query->where('a.gettype = ' . $db->quote($db->escape($_gettype))); } // Add the list ordering clause. diff --git a/admin/models/fields.php b/admin/models/fields.php index 68aadb2c1..ca76072bf 100644 --- a/admin/models/fields.php +++ b/admin/models/fields.php @@ -320,29 +320,89 @@ class ComponentbuilderModelFields extends JModelList } // Filter by Fieldtype. - if ($fieldtype = $this->getState('filter.fieldtype')) + $_fieldtype = $this->getState('filter.fieldtype'); + if (is_numeric($_fieldtype)) { - $query->where('a.fieldtype = ' . $db->quote($db->escape($fieldtype))); + if (is_float($_fieldtype)) + { + $query->where('a.fieldtype = ' . (float) $_fieldtype); + } + else + { + $query->where('a.fieldtype = ' . (int) $_fieldtype); + } + } + elseif (ComponentbuilderHelper::checkString($_fieldtype)) + { + $query->where('a.fieldtype = ' . $db->quote($db->escape($_fieldtype))); } // Filter by Datatype. - if ($datatype = $this->getState('filter.datatype')) + $_datatype = $this->getState('filter.datatype'); + if (is_numeric($_datatype)) { - $query->where('a.datatype = ' . $db->quote($db->escape($datatype))); + if (is_float($_datatype)) + { + $query->where('a.datatype = ' . (float) $_datatype); + } + else + { + $query->where('a.datatype = ' . (int) $_datatype); + } + } + elseif (ComponentbuilderHelper::checkString($_datatype)) + { + $query->where('a.datatype = ' . $db->quote($db->escape($_datatype))); } // Filter by Indexes. - if ($indexes = $this->getState('filter.indexes')) + $_indexes = $this->getState('filter.indexes'); + if (is_numeric($_indexes)) { - $query->where('a.indexes = ' . $db->quote($db->escape($indexes))); + if (is_float($_indexes)) + { + $query->where('a.indexes = ' . (float) $_indexes); + } + else + { + $query->where('a.indexes = ' . (int) $_indexes); + } + } + elseif (ComponentbuilderHelper::checkString($_indexes)) + { + $query->where('a.indexes = ' . $db->quote($db->escape($_indexes))); } // Filter by Null_switch. - if ($null_switch = $this->getState('filter.null_switch')) + $_null_switch = $this->getState('filter.null_switch'); + if (is_numeric($_null_switch)) { - $query->where('a.null_switch = ' . $db->quote($db->escape($null_switch))); + if (is_float($_null_switch)) + { + $query->where('a.null_switch = ' . (float) $_null_switch); + } + else + { + $query->where('a.null_switch = ' . (int) $_null_switch); + } + } + elseif (ComponentbuilderHelper::checkString($_null_switch)) + { + $query->where('a.null_switch = ' . $db->quote($db->escape($_null_switch))); } // Filter by Store. - if ($store = $this->getState('filter.store')) + $_store = $this->getState('filter.store'); + if (is_numeric($_store)) { - $query->where('a.store = ' . $db->quote($db->escape($store))); + if (is_float($_store)) + { + $query->where('a.store = ' . (float) $_store); + } + else + { + $query->where('a.store = ' . (int) $_store); + } + } + elseif (ComponentbuilderHelper::checkString($_store)) + { + $query->where('a.store = ' . $db->quote($db->escape($_store))); } // Filter by a single or group of categories. diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php index 03f222f94..7a19a5d8c 100644 --- a/admin/models/help_documents.php +++ b/admin/models/help_documents.php @@ -243,24 +243,72 @@ class ComponentbuilderModelHelp_documents extends JModelList } // Filter by Type. - if ($type = $this->getState('filter.type')) + $_type = $this->getState('filter.type'); + if (is_numeric($_type)) { - $query->where('a.type = ' . $db->quote($db->escape($type))); + if (is_float($_type)) + { + $query->where('a.type = ' . (float) $_type); + } + else + { + $query->where('a.type = ' . (int) $_type); + } + } + elseif (ComponentbuilderHelper::checkString($_type)) + { + $query->where('a.type = ' . $db->quote($db->escape($_type))); } // Filter by Location. - if ($location = $this->getState('filter.location')) + $_location = $this->getState('filter.location'); + if (is_numeric($_location)) { - $query->where('a.location = ' . $db->quote($db->escape($location))); + if (is_float($_location)) + { + $query->where('a.location = ' . (float) $_location); + } + else + { + $query->where('a.location = ' . (int) $_location); + } + } + elseif (ComponentbuilderHelper::checkString($_location)) + { + $query->where('a.location = ' . $db->quote($db->escape($_location))); } // Filter by Admin_view. - if ($admin_view = $this->getState('filter.admin_view')) + $_admin_view = $this->getState('filter.admin_view'); + if (is_numeric($_admin_view)) { - $query->where('a.admin_view = ' . $db->quote($db->escape($admin_view))); + if (is_float($_admin_view)) + { + $query->where('a.admin_view = ' . (float) $_admin_view); + } + else + { + $query->where('a.admin_view = ' . (int) $_admin_view); + } + } + elseif (ComponentbuilderHelper::checkString($_admin_view)) + { + $query->where('a.admin_view = ' . $db->quote($db->escape($_admin_view))); } // Filter by Site_view. - if ($site_view = $this->getState('filter.site_view')) + $_site_view = $this->getState('filter.site_view'); + if (is_numeric($_site_view)) { - $query->where('a.site_view = ' . $db->quote($db->escape($site_view))); + if (is_float($_site_view)) + { + $query->where('a.site_view = ' . (float) $_site_view); + } + else + { + $query->where('a.site_view = ' . (int) $_site_view); + } + } + elseif (ComponentbuilderHelper::checkString($_site_view)) + { + $query->where('a.site_view = ' . $db->quote($db->escape($_site_view))); } // Add the list ordering clause. diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index 47d22d640..853586910 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -2232,14 +2232,38 @@ class ComponentbuilderModelJoomla_components extends JModelList } // Filter by Companyname. - if ($companyname = $this->getState('filter.companyname')) + $_companyname = $this->getState('filter.companyname'); + if (is_numeric($_companyname)) { - $query->where('a.companyname = ' . $db->quote($db->escape($companyname))); + if (is_float($_companyname)) + { + $query->where('a.companyname = ' . (float) $_companyname); + } + else + { + $query->where('a.companyname = ' . (int) $_companyname); + } + } + elseif (ComponentbuilderHelper::checkString($_companyname)) + { + $query->where('a.companyname = ' . $db->quote($db->escape($_companyname))); } // Filter by Author. - if ($author = $this->getState('filter.author')) + $_author = $this->getState('filter.author'); + if (is_numeric($_author)) { - $query->where('a.author = ' . $db->quote($db->escape($author))); + if (is_float($_author)) + { + $query->where('a.author = ' . (float) $_author); + } + else + { + $query->where('a.author = ' . (int) $_author); + } + } + elseif (ComponentbuilderHelper::checkString($_author)) + { + $query->where('a.author = ' . $db->quote($db->escape($_author))); } // Add the list ordering clause. diff --git a/admin/models/joomla_modules.php b/admin/models/joomla_modules.php index 282871b8d..d336d0651 100644 --- a/admin/models/joomla_modules.php +++ b/admin/models/joomla_modules.php @@ -222,9 +222,21 @@ class ComponentbuilderModelJoomla_modules extends JModelList } // Filter by Target. - if ($target = $this->getState('filter.target')) + $_target = $this->getState('filter.target'); + if (is_numeric($_target)) { - $query->where('a.target = ' . $db->quote($db->escape($target))); + if (is_float($_target)) + { + $query->where('a.target = ' . (float) $_target); + } + else + { + $query->where('a.target = ' . (int) $_target); + } + } + elseif (ComponentbuilderHelper::checkString($_target)) + { + $query->where('a.target = ' . $db->quote($db->escape($_target))); } // Add the list ordering clause. diff --git a/admin/models/joomla_plugin_groups.php b/admin/models/joomla_plugin_groups.php index c9153e67e..bba10de1b 100644 --- a/admin/models/joomla_plugin_groups.php +++ b/admin/models/joomla_plugin_groups.php @@ -167,9 +167,21 @@ class ComponentbuilderModelJoomla_plugin_groups extends JModelList } // Filter by Class_extends. - if ($class_extends = $this->getState('filter.class_extends')) + $_class_extends = $this->getState('filter.class_extends'); + if (is_numeric($_class_extends)) { - $query->where('a.class_extends = ' . $db->quote($db->escape($class_extends))); + if (is_float($_class_extends)) + { + $query->where('a.class_extends = ' . (float) $_class_extends); + } + else + { + $query->where('a.class_extends = ' . (int) $_class_extends); + } + } + elseif (ComponentbuilderHelper::checkString($_class_extends)) + { + $query->where('a.class_extends = ' . $db->quote($db->escape($_class_extends))); } // Add the list ordering clause. diff --git a/admin/models/joomla_plugins.php b/admin/models/joomla_plugins.php index 517a66daf..bcfb68fc3 100644 --- a/admin/models/joomla_plugins.php +++ b/admin/models/joomla_plugins.php @@ -366,14 +366,38 @@ class ComponentbuilderModelJoomla_plugins extends JModelList } // Filter by Class_extends. - if ($class_extends = $this->getState('filter.class_extends')) + $_class_extends = $this->getState('filter.class_extends'); + if (is_numeric($_class_extends)) { - $query->where('a.class_extends = ' . $db->quote($db->escape($class_extends))); + if (is_float($_class_extends)) + { + $query->where('a.class_extends = ' . (float) $_class_extends); + } + else + { + $query->where('a.class_extends = ' . (int) $_class_extends); + } + } + elseif (ComponentbuilderHelper::checkString($_class_extends)) + { + $query->where('a.class_extends = ' . $db->quote($db->escape($_class_extends))); } // Filter by Joomla_plugin_group. - if ($joomla_plugin_group = $this->getState('filter.joomla_plugin_group')) + $_joomla_plugin_group = $this->getState('filter.joomla_plugin_group'); + if (is_numeric($_joomla_plugin_group)) { - $query->where('a.joomla_plugin_group = ' . $db->quote($db->escape($joomla_plugin_group))); + if (is_float($_joomla_plugin_group)) + { + $query->where('a.joomla_plugin_group = ' . (float) $_joomla_plugin_group); + } + else + { + $query->where('a.joomla_plugin_group = ' . (int) $_joomla_plugin_group); + } + } + elseif (ComponentbuilderHelper::checkString($_joomla_plugin_group)) + { + $query->where('a.joomla_plugin_group = ' . $db->quote($db->escape($_joomla_plugin_group))); } // Add the list ordering clause. diff --git a/admin/models/layouts.php b/admin/models/layouts.php index 6cd7c05cb..5e71fc8c2 100644 --- a/admin/models/layouts.php +++ b/admin/models/layouts.php @@ -230,14 +230,38 @@ class ComponentbuilderModelLayouts extends JModelList } // Filter by Dynamic_get. - if ($dynamic_get = $this->getState('filter.dynamic_get')) + $_dynamic_get = $this->getState('filter.dynamic_get'); + if (is_numeric($_dynamic_get)) { - $query->where('a.dynamic_get = ' . $db->quote($db->escape($dynamic_get))); + if (is_float($_dynamic_get)) + { + $query->where('a.dynamic_get = ' . (float) $_dynamic_get); + } + else + { + $query->where('a.dynamic_get = ' . (int) $_dynamic_get); + } + } + elseif (ComponentbuilderHelper::checkString($_dynamic_get)) + { + $query->where('a.dynamic_get = ' . $db->quote($db->escape($_dynamic_get))); } // Filter by Add_php_view. - if ($add_php_view = $this->getState('filter.add_php_view')) + $_add_php_view = $this->getState('filter.add_php_view'); + if (is_numeric($_add_php_view)) { - $query->where('a.add_php_view = ' . $db->quote($db->escape($add_php_view))); + if (is_float($_add_php_view)) + { + $query->where('a.add_php_view = ' . (float) $_add_php_view); + } + else + { + $query->where('a.add_php_view = ' . (int) $_add_php_view); + } + } + elseif (ComponentbuilderHelper::checkString($_add_php_view)) + { + $query->where('a.add_php_view = ' . $db->quote($db->escape($_add_php_view))); } // Add the list ordering clause. diff --git a/admin/models/libraries.php b/admin/models/libraries.php index 9f1891655..38606ae02 100644 --- a/admin/models/libraries.php +++ b/admin/models/libraries.php @@ -267,19 +267,55 @@ class ComponentbuilderModelLibraries extends JModelList } // Filter by Target. - if ($target = $this->getState('filter.target')) + $_target = $this->getState('filter.target'); + if (is_numeric($_target)) { - $query->where('a.target = ' . $db->quote($db->escape($target))); + if (is_float($_target)) + { + $query->where('a.target = ' . (float) $_target); + } + else + { + $query->where('a.target = ' . (int) $_target); + } + } + elseif (ComponentbuilderHelper::checkString($_target)) + { + $query->where('a.target = ' . $db->quote($db->escape($_target))); } // Filter by How. - if ($how = $this->getState('filter.how')) + $_how = $this->getState('filter.how'); + if (is_numeric($_how)) { - $query->where('a.how = ' . $db->quote($db->escape($how))); + if (is_float($_how)) + { + $query->where('a.how = ' . (float) $_how); + } + else + { + $query->where('a.how = ' . (int) $_how); + } + } + elseif (ComponentbuilderHelper::checkString($_how)) + { + $query->where('a.how = ' . $db->quote($db->escape($_how))); } // Filter by Type. - if ($type = $this->getState('filter.type')) + $_type = $this->getState('filter.type'); + if (is_numeric($_type)) { - $query->where('a.type = ' . $db->quote($db->escape($type))); + if (is_float($_type)) + { + $query->where('a.type = ' . (float) $_type); + } + else + { + $query->where('a.type = ' . (int) $_type); + } + } + elseif (ComponentbuilderHelper::checkString($_type)) + { + $query->where('a.type = ' . $db->quote($db->escape($_type))); } // Add the list ordering clause. diff --git a/admin/models/servers.php b/admin/models/servers.php index cc96d64d0..4eceb0595 100644 --- a/admin/models/servers.php +++ b/admin/models/servers.php @@ -219,14 +219,38 @@ class ComponentbuilderModelServers extends JModelList } // Filter by Name. - if ($name = $this->getState('filter.name')) + $_name = $this->getState('filter.name'); + if (is_numeric($_name)) { - $query->where('a.name = ' . $db->quote($db->escape($name))); + if (is_float($_name)) + { + $query->where('a.name = ' . (float) $_name); + } + else + { + $query->where('a.name = ' . (int) $_name); + } + } + elseif (ComponentbuilderHelper::checkString($_name)) + { + $query->where('a.name = ' . $db->quote($db->escape($_name))); } // Filter by Protocol. - if ($protocol = $this->getState('filter.protocol')) + $_protocol = $this->getState('filter.protocol'); + if (is_numeric($_protocol)) { - $query->where('a.protocol = ' . $db->quote($db->escape($protocol))); + if (is_float($_protocol)) + { + $query->where('a.protocol = ' . (float) $_protocol); + } + else + { + $query->where('a.protocol = ' . (int) $_protocol); + } + } + elseif (ComponentbuilderHelper::checkString($_protocol)) + { + $query->where('a.protocol = ' . $db->quote($db->escape($_protocol))); } // Add the list ordering clause. diff --git a/admin/models/site_views.php b/admin/models/site_views.php index 69f52a51d..03692d7ce 100644 --- a/admin/models/site_views.php +++ b/admin/models/site_views.php @@ -257,19 +257,55 @@ class ComponentbuilderModelSite_views extends JModelList } // Filter by Main_get. - if ($main_get = $this->getState('filter.main_get')) + $_main_get = $this->getState('filter.main_get'); + if (is_numeric($_main_get)) { - $query->where('a.main_get = ' . $db->quote($db->escape($main_get))); + if (is_float($_main_get)) + { + $query->where('a.main_get = ' . (float) $_main_get); + } + else + { + $query->where('a.main_get = ' . (int) $_main_get); + } + } + elseif (ComponentbuilderHelper::checkString($_main_get)) + { + $query->where('a.main_get = ' . $db->quote($db->escape($_main_get))); } // Filter by Add_php_ajax. - if ($add_php_ajax = $this->getState('filter.add_php_ajax')) + $_add_php_ajax = $this->getState('filter.add_php_ajax'); + if (is_numeric($_add_php_ajax)) { - $query->where('a.add_php_ajax = ' . $db->quote($db->escape($add_php_ajax))); + if (is_float($_add_php_ajax)) + { + $query->where('a.add_php_ajax = ' . (float) $_add_php_ajax); + } + else + { + $query->where('a.add_php_ajax = ' . (int) $_add_php_ajax); + } + } + elseif (ComponentbuilderHelper::checkString($_add_php_ajax)) + { + $query->where('a.add_php_ajax = ' . $db->quote($db->escape($_add_php_ajax))); } // Filter by Add_custom_button. - if ($add_custom_button = $this->getState('filter.add_custom_button')) + $_add_custom_button = $this->getState('filter.add_custom_button'); + if (is_numeric($_add_custom_button)) { - $query->where('a.add_custom_button = ' . $db->quote($db->escape($add_custom_button))); + if (is_float($_add_custom_button)) + { + $query->where('a.add_custom_button = ' . (float) $_add_custom_button); + } + else + { + $query->where('a.add_custom_button = ' . (int) $_add_custom_button); + } + } + elseif (ComponentbuilderHelper::checkString($_add_custom_button)) + { + $query->where('a.add_custom_button = ' . $db->quote($db->escape($_add_custom_button))); } // Add the list ordering clause. diff --git a/admin/models/snippets.php b/admin/models/snippets.php index ff66ebae1..099b5ba6f 100644 --- a/admin/models/snippets.php +++ b/admin/models/snippets.php @@ -318,14 +318,38 @@ class ComponentbuilderModelSnippets extends JModelList } // Filter by Type. - if ($type = $this->getState('filter.type')) + $_type = $this->getState('filter.type'); + if (is_numeric($_type)) { - $query->where('a.type = ' . $db->quote($db->escape($type))); + if (is_float($_type)) + { + $query->where('a.type = ' . (float) $_type); + } + else + { + $query->where('a.type = ' . (int) $_type); + } + } + elseif (ComponentbuilderHelper::checkString($_type)) + { + $query->where('a.type = ' . $db->quote($db->escape($_type))); } // Filter by Library. - if ($library = $this->getState('filter.library')) + $_library = $this->getState('filter.library'); + if (is_numeric($_library)) { - $query->where('a.library = ' . $db->quote($db->escape($library))); + if (is_float($_library)) + { + $query->where('a.library = ' . (float) $_library); + } + else + { + $query->where('a.library = ' . (int) $_library); + } + } + elseif (ComponentbuilderHelper::checkString($_library)) + { + $query->where('a.library = ' . $db->quote($db->escape($_library))); } // Add the list ordering clause. diff --git a/admin/models/templates.php b/admin/models/templates.php index 3bfc36da6..520a2a71c 100644 --- a/admin/models/templates.php +++ b/admin/models/templates.php @@ -230,14 +230,38 @@ class ComponentbuilderModelTemplates extends JModelList } // Filter by Dynamic_get. - if ($dynamic_get = $this->getState('filter.dynamic_get')) + $_dynamic_get = $this->getState('filter.dynamic_get'); + if (is_numeric($_dynamic_get)) { - $query->where('a.dynamic_get = ' . $db->quote($db->escape($dynamic_get))); + if (is_float($_dynamic_get)) + { + $query->where('a.dynamic_get = ' . (float) $_dynamic_get); + } + else + { + $query->where('a.dynamic_get = ' . (int) $_dynamic_get); + } + } + elseif (ComponentbuilderHelper::checkString($_dynamic_get)) + { + $query->where('a.dynamic_get = ' . $db->quote($db->escape($_dynamic_get))); } // Filter by Add_php_view. - if ($add_php_view = $this->getState('filter.add_php_view')) + $_add_php_view = $this->getState('filter.add_php_view'); + if (is_numeric($_add_php_view)) { - $query->where('a.add_php_view = ' . $db->quote($db->escape($add_php_view))); + if (is_float($_add_php_view)) + { + $query->where('a.add_php_view = ' . (float) $_add_php_view); + } + else + { + $query->where('a.add_php_view = ' . (int) $_add_php_view); + } + } + elseif (ComponentbuilderHelper::checkString($_add_php_view)) + { + $query->where('a.add_php_view = ' . $db->quote($db->escape($_add_php_view))); } // Add the list ordering clause. diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 6b2822c2a..bb6fe81cd 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -2136,7 +2136,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name (3, '', 'The checkbox form field type provides a single checkbox. If the parameter has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Checkbox', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkbox\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be checkbox\"},\"properties1\":{\"name\":\"name\",\"example\":\"show_title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Show title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"value\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) is the value of the parameter if this checkbox is set (usually 1).\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value (usually 0 or 1).\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Show the title of the item\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties7\":{\"name\":\"class\",\"example\":\"inputbox\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties9\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (JavaScript use)\"}}', 'provides a single checkbox to be checked or unchecked', '', 1, 7, '', '', '10066262-b6e3-4f82-941e-cbe4f61ddd6c'), (4, '', 'The checkboxes form field type provides a set of checkboxes. Note: unlike most standard form field types, such as textfield or checkbox, this field is not an \"out of the box\" solution. It will create checkboxes for you, and submit their values in form of ', 'Checkboxes', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkboxes\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be checkboxs\"},\"properties1\":{\"name\":\"name\",\"example\":\"toppings\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select Toppings\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"option\",\"example\":\"anch|Anchovies,chor|Chorizo,on|Onions,mush|Mushrooms\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value.\"},\"properties5\":{\"name\":\"description\",\"example\":\"Select the topping of your choice\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'provides unlimited checkboxes that can be used for multi-select.', '', 1, 4, '', '', 'ac10859b-58da-4584-9682-36a6c2c8d04d'), (5, '', 'Provides a color picker. Enter the color as #ff00ff or pick it from the palet.', 'Color', '{\"properties0\":{\"name\":\"type\",\"example\":\"color\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be color.\"},\"properties1\":{\"name\":\"name\",\"example\":\"backgroundcolor\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"default\",\"example\":\"#FFFFFF\",\"adjustable\":\"1\",\"description\":\"(optional) provides a color when not set.\"},\"properties3\":{\"name\":\"label\",\"example\":\"Background\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties4\":{\"name\":\"description\",\"example\":\"Select the background color here.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) tooltip for the form field.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'provides a color picker when clicking the input box.', '', 1, 5, '', '', '7f60f198-53e7-4fe9-813f-d1b6c553680e'), -(6, '', 'The list form field type provides a drop down list or a list box of other current component table entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Custom', '{\"properties0\":{\"name\":\"type\",\"example\":\"subjects\",\"mandatory\":\"1\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type. You can also not use the \\\"_\\\" (underscore) or \\\"-\\\" (hyphen) in the type name, and no spaces.\"},\"properties1\":{\"name\":\"name\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a Subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties7\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties11\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties13\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"},\"properties14\":{\"name\":\"extends\",\"example\":\"list\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties15\":{\"name\":\"button\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) to add new button next to field in edit view\"},\"properties16\":{\"name\":\"table\",\"example\":\"#__###component###_subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The table being linked to. The ###TABLE### placeholder holds the table in the php.\"},\"properties17\":{\"name\":\"component\",\"example\":\"com_###component###\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties18\":{\"name\":\"view\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties19\":{\"name\":\"views\",\"example\":\"subjects\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties20\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the text field in table linked to. The ###TEXT### placeholder holds the value_field in the php.\"},\"properties21\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key. The ###ID### placeholder holds the key_field in the php.\"},\"properties22\":{\"name\":\"prime_php\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"This field makes sure that the PHP used here is used to build the field type, and other are custom fields with the same field type are ignored. So to avoid that they over write the PHP added here. You should only have one prime per\\/type. To disable remove the field or set to 0\"},\"properties23\":{\"name\":\"type_php_1\",\"example\":\"\\/\\/ Get the user object.\\r\\n\\t\\t$user = JFactory::getUser();\\r\\n\\t\\t\\/\\/ Get the databse object.\\r\\n\\t\\t$db = JFactory::getDBO();\\r\\n\\t\\t$query = $db->getQuery(true);\\r\\n\\t\\t$query->select($db->quoteName(array(\'a.###ID###\',\'a.###TEXT###\'),array(\'###ID###\',\'###CODE_TEXT###\')));\\r\\n\\t\\t$query->from($db->quoteName(\'###TABLE###\', \'a\'));\\r\\n\\t\\t$query->where($db->quoteName(\'a.published\') . \' = 1\');\\r\\n\\t\\t$query->order(\'a.###TEXT### ASC\');\\r\\n\\t\\t\\/\\/ Implement View Level Access (if set in table)\\r\\n\\t\\tif (!$user->authorise(\'core.options\', \'[[[com_component]]]\'))\\r\\n\\t\\t{\\r\\n\\t\\t\\t$columns = $db->getTableColumns(\'###TABLE###\');\\r\\n\\t\\t\\tif(isset($columns[\'access\']))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$groups = implode(\',\', $user->getAuthorisedViewLevels());\\r\\n\\t\\t\\t\\t$query->where(\'a.access IN (\' . $groups . \')\');\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t$db->setQuery((string)$query);\\r\\n\\t\\t$items = $db->loadObjectList();\\r\\n\\t\\t$options = array();\\r\\n\\t\\tif ($items)\\r\\n\\t\\t{\\r\\n\\t\\t\\t$options[] = JHtml::_(\'select.option\', \'\', \'Select an option\');\\r\\n\\t\\t\\tforeach($items as $item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$options[] = JHtml::_(\'select.option\', $item->###ID###, $item->###CODE_TEXT###);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn $options;\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"}}', 'provides a drop down list of items entries.', '', 1, 25, '', '', 'dd2e1f4b-f5db-45e8-85fa-efd27bae7b6a'), +(6, '', 'The list form field type provides a drop down list or a list box of other current component table entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Custom', '{\"properties0\":{\"name\":\"type\",\"example\":\"subjects\",\"mandatory\":\"1\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type. You can also not use the \\\"_\\\" (underscore) or \\\"-\\\" (hyphen) in the type name, and no spaces.\"},\"properties1\":{\"name\":\"name\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a Subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties7\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties11\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties13\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"},\"properties14\":{\"name\":\"extends\",\"example\":\"list\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties15\":{\"name\":\"button\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) to add new button next to field in edit view\"},\"properties16\":{\"name\":\"table\",\"example\":\"#__###component###_subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The table being linked to. The ###TABLE### placeholder holds the table in the php.\"},\"properties17\":{\"name\":\"component\",\"example\":\"com_###component###\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties18\":{\"name\":\"view\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties19\":{\"name\":\"views\",\"example\":\"subjects\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties20\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the text field in table linked to. The ###TEXT### placeholder holds the value_field in the php.\"},\"properties21\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key. The ###ID### placeholder holds the key_field in the php.\"},\"properties22\":{\"name\":\"prime_php\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"This field makes sure that the PHP used here is used to build the field type, and other are custom fields with the same field type are ignored. So to avoid that they over write the PHP added here. You should only have one prime per\\/type. To disable remove the field or set to 0\"},\"properties23\":{\"name\":\"type_php_1\",\"example\":\"\\/\\/ Get the user object.\\r\\n\\t\\t$user = JFactory::getUser();\\r\\n\\t\\t\\/\\/ Get the databse object.\\r\\n\\t\\t$db = JFactory::getDBO();\\r\\n\\t\\t$query = $db->getQuery(true);\\r\\n\\t\\t$query->select($db->quoteName(array(\'a.###ID###\',\'a.###TEXT###\'),array(\'###ID###\',\'###CODE_TEXT###\')));\\r\\n\\t\\t$query->from($db->quoteName(\'###TABLE###\', \'a\'));\\r\\n\\t\\t$query->where($db->quoteName(\'a.published\') . \' = 1\');\\r\\n\\t\\t$query->order(\'a.###TEXT### ASC\');\\r\\n\\t\\t\\/\\/ Implement View Level Access (if set in table)\\r\\n\\t\\tif (!$user->authorise(\'core.options\', \'[[[com_component]]]\'))\\r\\n\\t\\t{\\r\\n\\t\\t\\t$columns = $db->getTableColumns(\'###TABLE###\');\\r\\n\\t\\t\\tif(isset($columns[\'access\']))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$groups = implode(\',\', $user->getAuthorisedViewLevels());\\r\\n\\t\\t\\t\\t$query->where(\'a.access IN (\' . $groups . \')\');\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t$db->setQuery((string)$query);\\r\\n\\t\\t$items = $db->loadObjectList();\\r\\n\\t\\t$options = array();\\r\\n\\t\\tif ($items)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif ($this->multiple === false)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$options[] = JHtml::_(\'select.option\', \'\', JText::(\'Select an option\'));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tforeach($items as $item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$options[] = JHtml::_(\'select.option\', $item->###ID###, $item->###CODE_TEXT###);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn $options;\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"}}', 'provides a drop down list of items entries.', '', 1, 26, '', '', 'dd2e1f4b-f5db-45e8-85fa-efd27bae7b6a'), (7, '', 'The a list of users that can be targeting one or more groups and excluded users that already belongs to an item in a view.', 'CustomUser', '{\"properties0\":{\"name\":\"type\",\"example\":\"staffusers\",\"mandatory\":\"1\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type.\"},\"properties1\":{\"name\":\"name\",\"example\":\"staff\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Staff\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties5\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties8\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties9\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"\"},\"properties10\":{\"name\":\"hint\",\"example\":\"select a user\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties12\":{\"name\":\"extends\",\"example\":\"user\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties13\":{\"name\":\"table\",\"example\":\"#__users\",\"mandatory\":\"1\",\"description\":\"(mandatory) The table being linked to. Must be #__users\"},\"properties14\":{\"name\":\"component\",\"example\":\"com_users\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties15\":{\"name\":\"view\",\"example\":\"###view###\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties16\":{\"name\":\"views\",\"example\":\"###views###\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties17\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the text field in table linked to.\"},\"properties18\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key.\"},\"properties19\":{\"name\":\"type_php_1\",\"example\":\"\\/\\/ set the groups array\",\"adjustable\":\"1\",\"description\":\"The php for the getGroups method.\"},\"properties20\":{\"name\":\"type_php_2\",\"example\":\"$groups = JComponentHelper::getParams(\'com_###component###\')->get(\'###type###\');\",\"adjustable\":\"1\",\"description\":\"The php for the getGroups method.\"},\"properties21\":{\"name\":\"type_php_3\",\"example\":\"return $groups;\",\"adjustable\":\"1\",\"description\":\"The php for the getGroups method.\"},\"properties22\":{\"name\":\"type_phpx_1\",\"example\":\"\\/\\/ To ensure that there is only one record per user\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties23\":{\"name\":\"type_phpx_2\",\"example\":\"\\/\\/ Get a db connection.\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties24\":{\"name\":\"type_phpx_3\",\"example\":\"$db = JFactory::getDbo();\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties25\":{\"name\":\"type_phpx_4\",\"example\":\"\\/\\/ Create a new query object.\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties26\":{\"name\":\"type_phpx_5\",\"example\":\"$query = $db->getQuery(true);\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties27\":{\"name\":\"type_phpx_6\",\"example\":\"\\/\\/ Select all records from the #__###component###_###view### table from ###CODE### column\\\".\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties28\":{\"name\":\"type_phpx_7\",\"example\":\"$query->select($db->quoteName(\'###CODE###\'));\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties29\":{\"name\":\"type_phpx_8\",\"example\":\"$query->from($db->quoteName(\'#__###component###_###view###\'));\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties30\":{\"name\":\"type_phpx_9\",\"example\":\"$db->setQuery($query);\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties31\":{\"name\":\"type_phpx_10\",\"example\":\"$db->execute();\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties32\":{\"name\":\"type_phpx_11\",\"example\":\"$found = $db->getNumRows();\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties33\":{\"name\":\"type_phpx_12\",\"example\":\"if ($found)\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties34\":{\"name\":\"type_phpx_13\",\"example\":\"{\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties35\":{\"name\":\"type_phpx_14\",\"example\":\"\\\\t\\/\\/ return all users already used\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties36\":{\"name\":\"type_phpx_15\",\"example\":\"\\\\treturn array_unique($db->loadColumn());\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties37\":{\"name\":\"type_phpx_16\",\"example\":\"}\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties38\":{\"name\":\"type_phpx_17\",\"example\":\"return null;\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"}}', 'Provides list of users.', '', 1, 5, '', '', 'a4a39f70-070f-459c-be4b-0ac103a29b9a'), (8, '', 'The Editor field type provides a WYSIWYG editor.', 'Editor', '{\"properties0\":{\"name\":\"type\",\"example\":\"editor\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be editor.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mytextblock\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Test Field\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"Some text\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties5\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties6\":{\"name\":\"width\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the width (in pixels) of the wysiwyg editor and defaults to 100%.\"},\"properties7\":{\"name\":\"height\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the height (in pixels) of the wysiwyg editor and defaults to 250px.\"},\"properties8\":{\"name\":\"cols\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the width of the editor (in columns).\"},\"properties9\":{\"name\":\"rows\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the height of the editor (in rows).\"},\"properties10\":{\"name\":\"buttons\",\"example\":\"no\",\"adjustable\":\"1\",\"description\":\"(optional) can be an array of plugin buttons to be excluded or set to false. The default editors-xtd are: article, image, pagebreak and readmore.\"},\"properties11\":{\"name\":\"syntax\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) can be used to set the code syntax matching for this field.\"},\"properties12\":{\"name\":\"hide\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) array of plugin buttons to be hidden. eg... set buttons=\\\"true\\\" hide=\\\"readmore,pagebreak\\\"\"},\"properties13\":{\"name\":\"editor\",\"example\":\"codemirror|none\",\"adjustable\":\"1\",\"description\":\"specifies the editor to be used and can include two options (editor=\\\"desired|alternative\\\")\"},\"properties14\":{\"name\":\"filter\",\"example\":\"safehtml\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties15\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties16\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties17\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'provides an editor area field.', '', 1, 11, '', '', '51f288d2-6eaa-42bc-a182-a6f69b3032b8'), (9, '', 'The hidden form field type provides a hidden field for saving a field whose value cannot be altered directly by a user in the Administrator (it can be altered in code or by editing the params.ini file). If the parameter has a saved value this is entered i', 'Hidden', '{\"properties0\":{\"name\":\"type\",\"example\":\"hidden\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be hidden.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mysecretvariable\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"default\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the data which needs to be collected.\"},\"properties5\":{\"name\":\"filter\",\"example\":\"STRING\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties4\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"}}', 'provides a hidden field for saving a form field whose value cannot be altered directly by a user.', '', 1, 2, '', '', '82f1b5ca-bb9b-44d7-9a7a-9a03fb2a31dd'), diff --git a/admin/views/admins_custom_tabs/view.html.php b/admin/views/admins_custom_tabs/view.html.php index 55730342d..6b4e2a5f8 100644 --- a/admin/views/admins_custom_tabs/view.html.php +++ b/admin/views/admins_custom_tabs/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewAdmins_custom_tabs extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/admins_fields/view.html.php b/admin/views/admins_fields/view.html.php index e86d00c01..ffac7d551 100644 --- a/admin/views/admins_fields/view.html.php +++ b/admin/views/admins_fields/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/admins_fields_conditions/view.html.php b/admin/views/admins_fields_conditions/view.html.php index b4a113ae9..836cf2244 100644 --- a/admin/views/admins_fields_conditions/view.html.php +++ b/admin/views/admins_fields_conditions/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/admins_fields_relations/view.html.php b/admin/views/admins_fields_relations/view.html.php index 913407d67..bd0c23f0b 100644 --- a/admin/views/admins_fields_relations/view.html.php +++ b/admin/views/admins_fields_relations/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewAdmins_fields_relations extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/class_extendings/view.html.php b/admin/views/class_extendings/view.html.php index d07a6d71b..31d5517eb 100644 --- a/admin/views/class_extendings/view.html.php +++ b/admin/views/class_extendings/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewClass_extendings extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/components_admin_views/view.html.php b/admin/views/components_admin_views/view.html.php index 2003e7c67..74e2ad2ee 100644 --- a/admin/views/components_admin_views/view.html.php +++ b/admin/views/components_admin_views/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/components_config/view.html.php b/admin/views/components_config/view.html.php index 47ef9cc4a..a20c3dd9e 100644 --- a/admin/views/components_config/view.html.php +++ b/admin/views/components_config/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewComponents_config extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/components_custom_admin_menus/view.html.php b/admin/views/components_custom_admin_menus/view.html.php index 8a5350db5..6dc35be6c 100644 --- a/admin/views/components_custom_admin_menus/view.html.php +++ b/admin/views/components_custom_admin_menus/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/components_custom_admin_views/view.html.php b/admin/views/components_custom_admin_views/view.html.php index 02dc1a2ed..2eb2cb027 100644 --- a/admin/views/components_custom_admin_views/view.html.php +++ b/admin/views/components_custom_admin_views/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/components_dashboard/view.html.php b/admin/views/components_dashboard/view.html.php index 54503b921..51f11e7dc 100644 --- a/admin/views/components_dashboard/view.html.php +++ b/admin/views/components_dashboard/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/components_files_folders/view.html.php b/admin/views/components_files_folders/view.html.php index bc3ccb92f..78bda1670 100644 --- a/admin/views/components_files_folders/view.html.php +++ b/admin/views/components_files_folders/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/components_modules/view.html.php b/admin/views/components_modules/view.html.php index 33dcac9b9..eb045dafb 100644 --- a/admin/views/components_modules/view.html.php +++ b/admin/views/components_modules/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewComponents_modules extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/components_mysql_tweaks/view.html.php b/admin/views/components_mysql_tweaks/view.html.php index f3d65de03..87dbbbdb9 100644 --- a/admin/views/components_mysql_tweaks/view.html.php +++ b/admin/views/components_mysql_tweaks/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/components_placeholders/view.html.php b/admin/views/components_placeholders/view.html.php index 6d12dd367..4dc369296 100644 --- a/admin/views/components_placeholders/view.html.php +++ b/admin/views/components_placeholders/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewComponents_placeholders extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/components_plugins/view.html.php b/admin/views/components_plugins/view.html.php index f1a3bf390..a1f3bf575 100644 --- a/admin/views/components_plugins/view.html.php +++ b/admin/views/components_plugins/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewComponents_plugins extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/components_site_views/view.html.php b/admin/views/components_site_views/view.html.php index ad274f544..c5876a804 100644 --- a/admin/views/components_site_views/view.html.php +++ b/admin/views/components_site_views/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/components_updates/view.html.php b/admin/views/components_updates/view.html.php index 62dc86a37..9deca770f 100644 --- a/admin/views/components_updates/view.html.php +++ b/admin/views/components_updates/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/custom_admin_views/view.html.php b/admin/views/custom_admin_views/view.html.php index 367c10389..09e557e5e 100644 --- a/admin/views/custom_admin_views/view.html.php +++ b/admin/views/custom_admin_views/view.html.php @@ -189,7 +189,7 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy { // Main Get Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL').' -', + '- Select ' . JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL') . ' -', 'filter_main_get', JHtml::_('select.options', $this->main_getNameOptions, 'value', 'text', $this->state->get('filter.main_get')) ); diff --git a/admin/views/custom_codes/view.html.php b/admin/views/custom_codes/view.html.php index 0069a9def..9dbc0f36d 100644 --- a/admin/views/custom_codes/view.html.php +++ b/admin/views/custom_codes/view.html.php @@ -189,7 +189,7 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy { // Component System Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL').' -', + '- Select ' . JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL') . ' -', 'filter_component', JHtml::_('select.options', $this->componentSystem_nameOptions, 'value', 'text', $this->state->get('filter.component')) ); diff --git a/admin/views/fields/view.html.php b/admin/views/fields/view.html.php index 27627e70f..411b5b195 100644 --- a/admin/views/fields/view.html.php +++ b/admin/views/fields/view.html.php @@ -196,7 +196,7 @@ class ComponentbuilderViewFields extends JViewLegacy { // Fieldtype Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_FIELD_FIELDTYPE_LABEL').' -', + '- Select ' . JText::_('COM_COMPONENTBUILDER_FIELD_FIELDTYPE_LABEL') . ' -', 'filter_fieldtype', JHtml::_('select.options', $this->fieldtypeNameOptions, 'value', 'text', $this->state->get('filter.fieldtype')) ); diff --git a/admin/views/fieldtypes/view.html.php b/admin/views/fieldtypes/view.html.php index 4085d4612..84e74c90d 100644 --- a/admin/views/fieldtypes/view.html.php +++ b/admin/views/fieldtypes/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/help_documents/view.html.php b/admin/views/help_documents/view.html.php index 7e50b6715..68f5a0212 100644 --- a/admin/views/help_documents/view.html.php +++ b/admin/views/help_documents/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); @@ -218,7 +218,7 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy { // Admin View Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_ADMIN_VIEW_LABEL').' -', + '- Select ' . JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_ADMIN_VIEW_LABEL') . ' -', 'filter_admin_view', JHtml::_('select.options', $this->admin_viewOptions, 'value', 'text', $this->state->get('filter.admin_view')) ); @@ -238,7 +238,7 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy { // Site View Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_SITE_VIEW_LABEL').' -', + '- Select ' . JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_SITE_VIEW_LABEL') . ' -', 'filter_site_view', JHtml::_('select.options', $this->site_viewOptions, 'value', 'text', $this->state->get('filter.site_view')) ); diff --git a/admin/views/joomla_modules_files_folders_urls/view.html.php b/admin/views/joomla_modules_files_folders_urls/view.html.php index 918a901a7..028d8b69a 100644 --- a/admin/views/joomla_modules_files_folders_urls/view.html.php +++ b/admin/views/joomla_modules_files_folders_urls/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewJoomla_modules_files_folders_urls extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/joomla_modules_updates/view.html.php b/admin/views/joomla_modules_updates/view.html.php index c3994a707..9caeee6ff 100644 --- a/admin/views/joomla_modules_updates/view.html.php +++ b/admin/views/joomla_modules_updates/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewJoomla_modules_updates extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/joomla_plugin_groups/view.html.php b/admin/views/joomla_plugin_groups/view.html.php index 43b6d2264..3ef4e9056 100644 --- a/admin/views/joomla_plugin_groups/view.html.php +++ b/admin/views/joomla_plugin_groups/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewJoomla_plugin_groups extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); @@ -174,7 +174,7 @@ class ComponentbuilderViewJoomla_plugin_groups extends JViewLegacy { // Class Extends Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_LABEL').' -', + '- Select ' . JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_LABEL') . ' -', 'filter_class_extends', JHtml::_('select.options', $this->class_extendsNameOptions, 'value', 'text', $this->state->get('filter.class_extends')) ); diff --git a/admin/views/joomla_plugins/view.html.php b/admin/views/joomla_plugins/view.html.php index 662b29902..487170ec4 100644 --- a/admin/views/joomla_plugins/view.html.php +++ b/admin/views/joomla_plugins/view.html.php @@ -194,7 +194,7 @@ class ComponentbuilderViewJoomla_plugins extends JViewLegacy { // Class Extends Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_LABEL').' -', + '- Select ' . JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_LABEL') . ' -', 'filter_class_extends', JHtml::_('select.options', $this->class_extendsNameOptions, 'value', 'text', $this->state->get('filter.class_extends')) ); @@ -214,7 +214,7 @@ class ComponentbuilderViewJoomla_plugins extends JViewLegacy { // Joomla Plugin Group Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_LABEL').' -', + '- Select ' . JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_LABEL') . ' -', 'filter_joomla_plugin_group', JHtml::_('select.options', $this->joomla_plugin_groupNameOptions, 'value', 'text', $this->state->get('filter.joomla_plugin_group')) ); diff --git a/admin/views/joomla_plugins_files_folders_urls/view.html.php b/admin/views/joomla_plugins_files_folders_urls/view.html.php index 2b5b69c8e..7354eee9e 100644 --- a/admin/views/joomla_plugins_files_folders_urls/view.html.php +++ b/admin/views/joomla_plugins_files_folders_urls/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewJoomla_plugins_files_folders_urls extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/joomla_plugins_updates/view.html.php b/admin/views/joomla_plugins_updates/view.html.php index 66e7e7f0b..17870d572 100644 --- a/admin/views/joomla_plugins_updates/view.html.php +++ b/admin/views/joomla_plugins_updates/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewJoomla_plugins_updates extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/language_translations/view.html.php b/admin/views/language_translations/view.html.php index 2319dba62..3c1681432 100644 --- a/admin/views/language_translations/view.html.php +++ b/admin/views/language_translations/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/languages/view.html.php b/admin/views/languages/view.html.php index 1a8858a8e..a7c31cbea 100644 --- a/admin/views/languages/view.html.php +++ b/admin/views/languages/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewLanguages extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/layouts/view.html.php b/admin/views/layouts/view.html.php index 317c1b274..89db5a228 100644 --- a/admin/views/layouts/view.html.php +++ b/admin/views/layouts/view.html.php @@ -189,7 +189,7 @@ class ComponentbuilderViewLayouts extends JViewLegacy { // Dynamic Get Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_LAYOUT_DYNAMIC_GET_LABEL').' -', + '- Select ' . JText::_('COM_COMPONENTBUILDER_LAYOUT_DYNAMIC_GET_LABEL') . ' -', 'filter_dynamic_get', JHtml::_('select.options', $this->dynamic_getNameOptions, 'value', 'text', $this->state->get('filter.dynamic_get')) ); diff --git a/admin/views/libraries/view.html.php b/admin/views/libraries/view.html.php index 9e32756be..271709900 100644 --- a/admin/views/libraries/view.html.php +++ b/admin/views/libraries/view.html.php @@ -199,7 +199,7 @@ class ComponentbuilderViewLibraries extends JViewLegacy { // How Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_LIBRARY_HOW_LABEL').' -', + '- Select ' . JText::_('COM_COMPONENTBUILDER_LIBRARY_HOW_LABEL') . ' -', 'filter_how', JHtml::_('select.options', $this->howOptions, 'value', 'text', $this->state->get('filter.how')) ); diff --git a/admin/views/libraries_config/view.html.php b/admin/views/libraries_config/view.html.php index a276ccae3..94fb45a50 100644 --- a/admin/views/libraries_config/view.html.php +++ b/admin/views/libraries_config/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/libraries_files_folders_urls/view.html.php b/admin/views/libraries_files_folders_urls/view.html.php index a1dec4d3a..089c4b28f 100644 --- a/admin/views/libraries_files_folders_urls/view.html.php +++ b/admin/views/libraries_files_folders_urls/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/servers/view.html.php b/admin/views/servers/view.html.php index 56bde83c3..3ccee9b76 100644 --- a/admin/views/servers/view.html.php +++ b/admin/views/servers/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewServers extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/site_views/view.html.php b/admin/views/site_views/view.html.php index 12591203c..c6aa5bd98 100644 --- a/admin/views/site_views/view.html.php +++ b/admin/views/site_views/view.html.php @@ -189,7 +189,7 @@ class ComponentbuilderViewSite_views extends JViewLegacy { // Main Get Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL').' -', + '- Select ' . JText::_('COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL') . ' -', 'filter_main_get', JHtml::_('select.options', $this->main_getNameOptions, 'value', 'text', $this->state->get('filter.main_get')) ); diff --git a/admin/views/snippet_types/view.html.php b/admin/views/snippet_types/view.html.php index cfed2c494..e30b1cd30 100644 --- a/admin/views/snippet_types/view.html.php +++ b/admin/views/snippet_types/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/snippets/view.html.php b/admin/views/snippets/view.html.php index 820b215dd..7bd398e1e 100644 --- a/admin/views/snippets/view.html.php +++ b/admin/views/snippets/view.html.php @@ -194,7 +194,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy { // Type Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_LABEL').' -', + '- Select ' . JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_LABEL') . ' -', 'filter_type', JHtml::_('select.options', $this->typeNameOptions, 'value', 'text', $this->state->get('filter.type')) ); @@ -214,7 +214,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy { // Library Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_SNIPPET_LIBRARY_LABEL').' -', + '- Select ' . JText::_('COM_COMPONENTBUILDER_SNIPPET_LIBRARY_LABEL') . ' -', 'filter_library', JHtml::_('select.options', $this->libraryNameOptions, 'value', 'text', $this->state->get('filter.library')) ); diff --git a/admin/views/templates/view.html.php b/admin/views/templates/view.html.php index 2c4c61334..8547f2dee 100644 --- a/admin/views/templates/view.html.php +++ b/admin/views/templates/view.html.php @@ -189,7 +189,7 @@ class ComponentbuilderViewTemplates extends JViewLegacy { // Dynamic Get Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_GET_LABEL').' -', + '- Select ' . JText::_('COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_GET_LABEL') . ' -', 'filter_dynamic_get', JHtml::_('select.options', $this->dynamic_getNameOptions, 'value', 'text', $this->state->get('filter.dynamic_get')) ); diff --git a/componentbuilder.xml b/componentbuilder.xml index b05fb7c96..8d03370fd 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 29th November, 2020 + 30th November, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com