diff --git a/README.md b/README.md index 9571a3a9c..600aac664 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ TODO + *Version*: 2.12.2 + *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*: **290337** ++ *Line count*: **290450** + *Field count*: **1555** + *File count*: **1923** + *Folder count*: **316** diff --git a/admin/README.txt b/admin/README.txt index 9571a3a9c..600aac664 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -148,7 +148,7 @@ TODO + *Version*: 2.12.2 + *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*: **290337** ++ *Line count*: **290450** + *Field count*: **1555** + *File count*: **1923** + *Folder count*: **316** diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index e19401579..1bc5b0fd8 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -20515,30 +20515,7 @@ class Interpretation extends Fields { // top bar selection can result in // an array due to multi selection - $stored .= PHP_EOL . $this->_t(2) - . "//" . $this->setLine(__LINE__) - . " Check if the value is an array"; - $stored .= PHP_EOL . $this->_t(2) - . "\$_filter = \$this->getState('filter.access');"; - $stored .= PHP_EOL . $this->_t(2) - . "if (" . $Component . "Helper::checkArray(\$_filter))"; - $stored .= PHP_EOL . $this->_t(2) - . "{"; - $stored .= PHP_EOL . $this->_t(3) - . "\$id .= ':' . implode(':', \$_filter);"; - $stored .= PHP_EOL . $this->_t(2) - . "}"; - $stored .= PHP_EOL . $this->_t(2) - . "//" . $this->setLine(__LINE__) - . " This should not happen, but we try"; - $stored .= PHP_EOL . $this->_t(2) - . "elseif (is_numeric(\$_filter))"; - $stored .= PHP_EOL . $this->_t(2) - . "{"; - $stored .= PHP_EOL . $this->_t(3) - . "\$id .= ':' . \$_filter;"; - $stored .= PHP_EOL . $this->_t(2) - . "}"; + $stored .= $this->getStoredIdCodeMulti('access', $Component); } } $stored .= PHP_EOL . $this->_t(2) @@ -20566,7 +20543,7 @@ class Interpretation extends Fields if (!isset($donelist[$filter['code']])) { $stored .= $this->getStoredIdCode( - $filter, $Component + $filter, $nameListCode, $Component ); $donelist[$filter['code']] = true; } @@ -20583,7 +20560,7 @@ class Interpretation extends Fields if (!isset($donelist[$filter['code']])) { $stored .= $this->getStoredIdCode( - $filter, $Component + $filter, $nameListCode, $Component ); $donelist[$filter['code']] = true; } @@ -20596,59 +20573,52 @@ class Interpretation extends Fields /** * Add the code of the stored ids * - * @param array $filter The field/filter array - * @param string $Component The Component name + * @param array $filter The field/filter array + * @param string $nameListCode The list view name + * @param string $Component The Component name * * @return string The code for the stored IDs * */ - protected function getStoredIdCode(&$filter, &$Component) + protected function getStoredIdCode(&$filter, &$nameListCode, &$Component) { if ($filter['type'] === 'category') { - $stored = PHP_EOL . $this->_t(2) - . "\$id .= ':' . \$this->getState('filter.category');"; - $stored .= PHP_EOL . $this->_t(2) - . "\$id .= ':' . \$this->getState('filter.category_id');"; - if ($filter['code'] != 'category') + // the side bar option is single (1 = sidebar) + if (isset($this->adminFilterType[$nameListCode]) + && $this->adminFilterType[$nameListCode] == 1) { + $stored = PHP_EOL . $this->_t(2) + . "\$id .= ':' . \$this->getState('filter.category');"; $stored .= PHP_EOL . $this->_t(2) - . "\$id .= ':' . \$this->getState('filter." - . $filter['code'] . "');"; + . "\$id .= ':' . \$this->getState('filter.category_id');"; + if ($filter['code'] != 'category') + { + $stored .= PHP_EOL . $this->_t(2) + . "\$id .= ':' . \$this->getState('filter." + . $filter['code'] . "');"; + } + } + else + { + $stored = $this->getStoredIdCodeMulti('category', $Component); + $stored .= $this->getStoredIdCodeMulti('category_id', $Component); + if ($filter['code'] != 'category') + { + $stored .= $this->getStoredIdCodeMulti($filter['code'], $Component); + } } } else { - if ($filter['multi'] == 2) + // check if this is the topbar filter, and multi option (2 = topbar) + if ($filter['multi'] == 2 + && isset($this->adminFilterType[$nameListCode]) + && $this->adminFilterType[$nameListCode] == 2) { // top bar selection can result in // an array due to multi selection - $stored .= PHP_EOL . $this->_t(2) - . "//" . $this->setLine(__LINE__) - . " Check if the value is an array"; - $stored .= PHP_EOL . $this->_t(2) - . "\$_" . $filter['code'] . " = \$this->getState('filter." - . $filter['code'] . "');"; - $stored .= PHP_EOL . $this->_t(2) - . "if (" . $Component . "Helper::checkArray(\$_" - . $filter['code'] . "))"; - $stored .= PHP_EOL . $this->_t(2) - . "{"; - $stored .= PHP_EOL . $this->_t(3) - . "\$id .= ':' . implode(':', \$_" . $filter['code'] . ");"; - $stored .= PHP_EOL . $this->_t(2) - . "}"; - $stored .= PHP_EOL . $this->_t(2) - . "//" . $this->setLine(__LINE__) - . " This should not happen, but we try"; - $stored .= PHP_EOL . $this->_t(2) - . "elseif (is_numeric(\$_" . $filter['code'] . "))"; - $stored .= PHP_EOL . $this->_t(2) - . "{"; - $stored .= PHP_EOL . $this->_t(3) - . "\$id .= ':' . \$_" . $filter['code'] . ";"; - $stored .= PHP_EOL . $this->_t(2) - . "}"; + $stored = $this->getStoredIdCodeMulti($filter['code'], $Component); } else { @@ -20661,6 +20631,51 @@ class Interpretation extends Fields return $stored; } + /** + * Add the code of the stored multi ids + * + * @param string $key The key field name + * @param string $Component The Component name + * + * @return string The code for the stored IDs + * + */ + protected function getStoredIdCodeMulti($key, &$Component) + { + // top bar selection can result in + // an array due to multi selection + $stored = PHP_EOL . $this->_t(2) + . "//" . $this->setLine(__LINE__) + . " Check if the value is an array"; + $stored .= PHP_EOL . $this->_t(2) + . "\$_" . $key . " = \$this->getState('filter." + . $key . "');"; + $stored .= PHP_EOL . $this->_t(2) + . "if (" . $Component . "Helper::checkArray(\$_" + . $key . "))"; + $stored .= PHP_EOL . $this->_t(2) + . "{"; + $stored .= PHP_EOL . $this->_t(3) + . "\$id .= ':' . implode(':', \$_" . $key . ");"; + $stored .= PHP_EOL . $this->_t(2) + . "}"; + $stored .= PHP_EOL . $this->_t(2) + . "//" . $this->setLine(__LINE__) + . " Check if this is only an int or string"; + $stored .= PHP_EOL . $this->_t(2) + . "elseif (is_numeric(\$_" . $key . ")"; + $stored .= PHP_EOL . $this->_t(2) + . " || " . $Component . "Helper::checkString(\$_" . $key . "))"; + $stored .= PHP_EOL . $this->_t(2) + . "{"; + $stored .= PHP_EOL . $this->_t(3) + . "\$id .= ':' . \$_" . $key . ";"; + $stored .= PHP_EOL . $this->_t(2) + . "}"; + + return $stored; + } + public function setAddToolBar(&$view) { // set view name diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index 8931bf9b4..450cb98a8 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -680,15 +680,16 @@ class ComponentbuilderModelAdmin_views extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); @@ -700,8 +701,9 @@ class ComponentbuilderModelAdmin_views extends JModelList { $id .= ':' . implode(':', $_type); } - // This should not happen, but we try - elseif (is_numeric($_type)) + // Check if this is only an int or string + elseif (is_numeric($_type) + || ComponentbuilderHelper::checkString($_type)) { $id .= ':' . $_type; } diff --git a/admin/models/admins_custom_tabs.php b/admin/models/admins_custom_tabs.php index eca17e12c..9a65ad024 100644 --- a/admin/models/admins_custom_tabs.php +++ b/admin/models/admins_custom_tabs.php @@ -205,15 +205,16 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/admins_fields.php b/admin/models/admins_fields.php index 01036d6a2..840b6d443 100644 --- a/admin/models/admins_fields.php +++ b/admin/models/admins_fields.php @@ -205,15 +205,16 @@ class ComponentbuilderModelAdmins_fields extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/admins_fields_conditions.php b/admin/models/admins_fields_conditions.php index 1cef82ca1..4139aa5f4 100644 --- a/admin/models/admins_fields_conditions.php +++ b/admin/models/admins_fields_conditions.php @@ -205,15 +205,16 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/admins_fields_relations.php b/admin/models/admins_fields_relations.php index 71448255f..b859e5ac6 100644 --- a/admin/models/admins_fields_relations.php +++ b/admin/models/admins_fields_relations.php @@ -205,15 +205,16 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/class_extendings.php b/admin/models/class_extendings.php index 4b052ca88..a99dda834 100644 --- a/admin/models/class_extendings.php +++ b/admin/models/class_extendings.php @@ -285,15 +285,16 @@ class ComponentbuilderModelClass_extendings extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/class_methods.php b/admin/models/class_methods.php index fe0f77883..0736ca5d7 100644 --- a/admin/models/class_methods.php +++ b/admin/models/class_methods.php @@ -458,15 +458,16 @@ class ComponentbuilderModelClass_methods extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/class_properties.php b/admin/models/class_properties.php index 463587c7b..ba7c42714 100644 --- a/admin/models/class_properties.php +++ b/admin/models/class_properties.php @@ -456,15 +456,16 @@ class ComponentbuilderModelClass_properties extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/components_admin_views.php b/admin/models/components_admin_views.php index 04c86467d..2d0d9e7d3 100644 --- a/admin/models/components_admin_views.php +++ b/admin/models/components_admin_views.php @@ -205,15 +205,16 @@ class ComponentbuilderModelComponents_admin_views extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/components_config.php b/admin/models/components_config.php index 32ebdf777..68431a56e 100644 --- a/admin/models/components_config.php +++ b/admin/models/components_config.php @@ -205,15 +205,16 @@ class ComponentbuilderModelComponents_config extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/components_custom_admin_menus.php b/admin/models/components_custom_admin_menus.php index fdc4bfbb0..1637b03fe 100644 --- a/admin/models/components_custom_admin_menus.php +++ b/admin/models/components_custom_admin_menus.php @@ -205,15 +205,16 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/components_custom_admin_views.php b/admin/models/components_custom_admin_views.php index b45955984..4ac7142f7 100644 --- a/admin/models/components_custom_admin_views.php +++ b/admin/models/components_custom_admin_views.php @@ -205,15 +205,16 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/components_dashboard.php b/admin/models/components_dashboard.php index d27a32e20..111597186 100644 --- a/admin/models/components_dashboard.php +++ b/admin/models/components_dashboard.php @@ -205,15 +205,16 @@ class ComponentbuilderModelComponents_dashboard extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/components_files_folders.php b/admin/models/components_files_folders.php index dc0807c3c..85b03e6f0 100644 --- a/admin/models/components_files_folders.php +++ b/admin/models/components_files_folders.php @@ -205,15 +205,16 @@ class ComponentbuilderModelComponents_files_folders extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/components_modules.php b/admin/models/components_modules.php index 76121cf24..9b6bcd006 100644 --- a/admin/models/components_modules.php +++ b/admin/models/components_modules.php @@ -205,15 +205,16 @@ class ComponentbuilderModelComponents_modules extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/components_mysql_tweaks.php b/admin/models/components_mysql_tweaks.php index 1aab5f630..d32ef356c 100644 --- a/admin/models/components_mysql_tweaks.php +++ b/admin/models/components_mysql_tweaks.php @@ -205,15 +205,16 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/components_placeholders.php b/admin/models/components_placeholders.php index bcdb62bba..c7cdb9b5a 100644 --- a/admin/models/components_placeholders.php +++ b/admin/models/components_placeholders.php @@ -205,15 +205,16 @@ class ComponentbuilderModelComponents_placeholders extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/components_plugins.php b/admin/models/components_plugins.php index 75183b57d..fb0f42954 100644 --- a/admin/models/components_plugins.php +++ b/admin/models/components_plugins.php @@ -205,15 +205,16 @@ class ComponentbuilderModelComponents_plugins extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/components_site_views.php b/admin/models/components_site_views.php index aa3080caf..436951d1b 100644 --- a/admin/models/components_site_views.php +++ b/admin/models/components_site_views.php @@ -205,15 +205,16 @@ class ComponentbuilderModelComponents_site_views extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/components_updates.php b/admin/models/components_updates.php index 4808ddc29..5fa4ba231 100644 --- a/admin/models/components_updates.php +++ b/admin/models/components_updates.php @@ -205,15 +205,16 @@ class ComponentbuilderModelComponents_updates extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/custom_admin_views.php b/admin/models/custom_admin_views.php index 20a8109ae..3de52a967 100644 --- a/admin/models/custom_admin_views.php +++ b/admin/models/custom_admin_views.php @@ -514,15 +514,16 @@ class ComponentbuilderModelCustom_admin_views extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/custom_codes.php b/admin/models/custom_codes.php index 2c61f7028..01ed00528 100644 --- a/admin/models/custom_codes.php +++ b/admin/models/custom_codes.php @@ -550,15 +550,16 @@ class ComponentbuilderModelCustom_codes extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/dynamic_gets.php b/admin/models/dynamic_gets.php index 329ee30b3..aea7abf8c 100644 --- a/admin/models/dynamic_gets.php +++ b/admin/models/dynamic_gets.php @@ -465,15 +465,16 @@ class ComponentbuilderModelDynamic_gets extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/fields.php b/admin/models/fields.php index 310c61733..4510f5e4d 100644 --- a/admin/models/fields.php +++ b/admin/models/fields.php @@ -633,15 +633,16 @@ class ComponentbuilderModelFields extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); @@ -651,9 +652,42 @@ class ComponentbuilderModelFields extends JModelList $id .= ':' . $this->getState('filter.indexes'); $id .= ':' . $this->getState('filter.null_switch'); $id .= ':' . $this->getState('filter.store'); - $id .= ':' . $this->getState('filter.category'); - $id .= ':' . $this->getState('filter.category_id'); - $id .= ':' . $this->getState('filter.catid'); + // Check if the value is an array + $_category = $this->getState('filter.category'); + if (ComponentbuilderHelper::checkArray($_category)) + { + $id .= ':' . implode(':', $_category); + } + // Check if this is only an int or string + elseif (is_numeric($_category) + || ComponentbuilderHelper::checkString($_category)) + { + $id .= ':' . $_category; + } + // Check if the value is an array + $_category_id = $this->getState('filter.category_id'); + if (ComponentbuilderHelper::checkArray($_category_id)) + { + $id .= ':' . implode(':', $_category_id); + } + // Check if this is only an int or string + elseif (is_numeric($_category_id) + || ComponentbuilderHelper::checkString($_category_id)) + { + $id .= ':' . $_category_id; + } + // Check if the value is an array + $_catid = $this->getState('filter.catid'); + if (ComponentbuilderHelper::checkArray($_catid)) + { + $id .= ':' . implode(':', $_catid); + } + // Check if this is only an int or string + elseif (is_numeric($_catid) + || ComponentbuilderHelper::checkString($_catid)) + { + $id .= ':' . $_catid; + } $id .= ':' . $this->getState('filter.name'); return parent::getStoreId($id); diff --git a/admin/models/fieldtypes.php b/admin/models/fieldtypes.php index 46b7b714a..27eec758e 100644 --- a/admin/models/fieldtypes.php +++ b/admin/models/fieldtypes.php @@ -394,22 +394,56 @@ class ComponentbuilderModelFieldtypes extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.modified_by'); - $id .= ':' . $this->getState('filter.category'); - $id .= ':' . $this->getState('filter.category_id'); - $id .= ':' . $this->getState('filter.catid'); + // Check if the value is an array + $_category = $this->getState('filter.category'); + if (ComponentbuilderHelper::checkArray($_category)) + { + $id .= ':' . implode(':', $_category); + } + // Check if this is only an int or string + elseif (is_numeric($_category) + || ComponentbuilderHelper::checkString($_category)) + { + $id .= ':' . $_category; + } + // Check if the value is an array + $_category_id = $this->getState('filter.category_id'); + if (ComponentbuilderHelper::checkArray($_category_id)) + { + $id .= ':' . implode(':', $_category_id); + } + // Check if this is only an int or string + elseif (is_numeric($_category_id) + || ComponentbuilderHelper::checkString($_category_id)) + { + $id .= ':' . $_category_id; + } + // Check if the value is an array + $_catid = $this->getState('filter.catid'); + if (ComponentbuilderHelper::checkArray($_catid)) + { + $id .= ':' . implode(':', $_catid); + } + // Check if this is only an int or string + elseif (is_numeric($_catid) + || ComponentbuilderHelper::checkString($_catid)) + { + $id .= ':' . $_catid; + } $id .= ':' . $this->getState('filter.name'); $id .= ':' . $this->getState('filter.short_description'); diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index 17f97a648..19c71ecea 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -2512,15 +2512,16 @@ class ComponentbuilderModelJoomla_components extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/joomla_modules.php b/admin/models/joomla_modules.php index 9054a340c..06cd3d68f 100644 --- a/admin/models/joomla_modules.php +++ b/admin/models/joomla_modules.php @@ -291,15 +291,16 @@ class ComponentbuilderModelJoomla_modules extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/joomla_modules_files_folders_urls.php b/admin/models/joomla_modules_files_folders_urls.php index a8c0151d4..6fffef411 100644 --- a/admin/models/joomla_modules_files_folders_urls.php +++ b/admin/models/joomla_modules_files_folders_urls.php @@ -205,15 +205,16 @@ class ComponentbuilderModelJoomla_modules_files_folders_urls extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/joomla_modules_updates.php b/admin/models/joomla_modules_updates.php index f6d6d71a2..9cf22bccc 100644 --- a/admin/models/joomla_modules_updates.php +++ b/admin/models/joomla_modules_updates.php @@ -205,15 +205,16 @@ class ComponentbuilderModelJoomla_modules_updates extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/joomla_plugin_groups.php b/admin/models/joomla_plugin_groups.php index e1b0fe3b0..edcd23c2c 100644 --- a/admin/models/joomla_plugin_groups.php +++ b/admin/models/joomla_plugin_groups.php @@ -232,15 +232,16 @@ class ComponentbuilderModelJoomla_plugin_groups extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/joomla_plugins.php b/admin/models/joomla_plugins.php index b77d3b8a2..d0cd00eed 100644 --- a/admin/models/joomla_plugins.php +++ b/admin/models/joomla_plugins.php @@ -452,15 +452,16 @@ class ComponentbuilderModelJoomla_plugins extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/joomla_plugins_files_folders_urls.php b/admin/models/joomla_plugins_files_folders_urls.php index bdfc44211..dc4918b83 100644 --- a/admin/models/joomla_plugins_files_folders_urls.php +++ b/admin/models/joomla_plugins_files_folders_urls.php @@ -205,15 +205,16 @@ class ComponentbuilderModelJoomla_plugins_files_folders_urls extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/joomla_plugins_updates.php b/admin/models/joomla_plugins_updates.php index a0ba866fa..c5761e8da 100644 --- a/admin/models/joomla_plugins_updates.php +++ b/admin/models/joomla_plugins_updates.php @@ -205,15 +205,16 @@ class ComponentbuilderModelJoomla_plugins_updates extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/language_translations.php b/admin/models/language_translations.php index eb64dee0d..0709e65e2 100644 --- a/admin/models/language_translations.php +++ b/admin/models/language_translations.php @@ -451,15 +451,16 @@ class ComponentbuilderModelLanguage_translations extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/languages.php b/admin/models/languages.php index 01bbbccb8..9976645b5 100644 --- a/admin/models/languages.php +++ b/admin/models/languages.php @@ -477,15 +477,16 @@ class ComponentbuilderModelLanguages extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/layouts.php b/admin/models/layouts.php index f89753e1f..db4e5aaeb 100644 --- a/admin/models/layouts.php +++ b/admin/models/layouts.php @@ -446,15 +446,16 @@ class ComponentbuilderModelLayouts extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/libraries.php b/admin/models/libraries.php index 67b769367..89b9bc6b6 100644 --- a/admin/models/libraries.php +++ b/admin/models/libraries.php @@ -378,15 +378,16 @@ class ComponentbuilderModelLibraries extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/libraries_config.php b/admin/models/libraries_config.php index 7926c4c79..df0c18479 100644 --- a/admin/models/libraries_config.php +++ b/admin/models/libraries_config.php @@ -205,15 +205,16 @@ class ComponentbuilderModelLibraries_config extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/libraries_files_folders_urls.php b/admin/models/libraries_files_folders_urls.php index d573a9f0a..1faeef8a5 100644 --- a/admin/models/libraries_files_folders_urls.php +++ b/admin/models/libraries_files_folders_urls.php @@ -205,15 +205,16 @@ class ComponentbuilderModelLibraries_files_folders_urls extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/placeholders.php b/admin/models/placeholders.php index 4ff20c219..b7fc3408f 100644 --- a/admin/models/placeholders.php +++ b/admin/models/placeholders.php @@ -358,15 +358,16 @@ class ComponentbuilderModelPlaceholders extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/servers.php b/admin/models/servers.php index 46bca9476..224d7a0af 100644 --- a/admin/models/servers.php +++ b/admin/models/servers.php @@ -473,15 +473,16 @@ class ComponentbuilderModelServers extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/site_views.php b/admin/models/site_views.php index 8059aeb58..735139494 100644 --- a/admin/models/site_views.php +++ b/admin/models/site_views.php @@ -522,15 +522,16 @@ class ComponentbuilderModelSite_views extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/snippet_types.php b/admin/models/snippet_types.php index d127fa3a0..04110553c 100644 --- a/admin/models/snippet_types.php +++ b/admin/models/snippet_types.php @@ -232,15 +232,16 @@ class ComponentbuilderModelSnippet_types extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/snippets.php b/admin/models/snippets.php index e04c2ca48..70570d13c 100644 --- a/admin/models/snippets.php +++ b/admin/models/snippets.php @@ -536,15 +536,16 @@ class ComponentbuilderModelSnippets extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/templates.php b/admin/models/templates.php index a2e7105bc..aa9b761a7 100644 --- a/admin/models/templates.php +++ b/admin/models/templates.php @@ -446,15 +446,16 @@ class ComponentbuilderModelTemplates extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); diff --git a/admin/models/validation_rules.php b/admin/models/validation_rules.php index 427255941..9f83ada48 100644 --- a/admin/models/validation_rules.php +++ b/admin/models/validation_rules.php @@ -356,15 +356,16 @@ class ComponentbuilderModelValidation_rules extends JModelList $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); // Check if the value is an array - $_filter = $this->getState('filter.access'); - if (ComponentbuilderHelper::checkArray($_filter)) + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) { - $id .= ':' . implode(':', $_filter); + $id .= ':' . implode(':', $_access); } - // This should not happen, but we try - elseif (is_numeric($_filter)) + // Check if this is only an int or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) { - $id .= ':' . $_filter; + $id .= ':' . $_access; } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by');