From f3144645755c0913ea340483e12991c878795e54 Mon Sep 17 00:00:00 2001 From: Emmanuel Danan Date: Tue, 19 May 2020 12:09:56 +0200 Subject: [PATCH 1/4] Small fixes concerning the sorting list and the column headers/arrows. Now both are synchronized. --- admin/helpers/compiler/e_Interpretation.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index d573e9de8..84e79c8e9 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -11651,7 +11651,7 @@ class Interpretation extends Fields if ($item['sort']) { $title = "listDirn, \$this->listOrder); ?>"; } $head .= PHP_EOL . $this->_t(1) . ''; $head .= PHP_EOL . $this->_t(3) . "listDirn, \$this->listOrder); ?>"; + . "', 'a.published', \$this->listDirn, \$this->listOrder); ?>"; $head .= PHP_EOL . $this->_t(2) . ""; $head .= PHP_EOL . $this->_t(1) . ""; $head .= PHP_EOL . $this->_t(2) @@ -11686,7 +11686,7 @@ class Interpretation extends Fields . ''; $head .= PHP_EOL . $this->_t(3) . "listDirn, \$this->listOrder); ?>"; + . "', 'a.id', \$this->listDirn, \$this->listOrder); ?>"; $head .= PHP_EOL . $this->_t(1) . ""; } $head .= PHP_EOL . ""; @@ -19553,10 +19553,10 @@ class Interpretation extends Fields public function setSortFields(&$view) { // keep track of all fields already added - $donelist = array('sorting', 'published'); + $donelist = array('ordering', 'published'); // set the default first $fields = "return array("; - $fields .= PHP_EOL . $this->_t(3) . "'a.sorting' => JText:" + $fields .= PHP_EOL . $this->_t(3) . "'ordering' => JText:" . ":_('JGRID_HEADING_ORDERING')"; $fields .= "," . PHP_EOL . $this->_t(3) . "'a.published' => JText:" . ":_('JSTATUS')"; -- 2.40.1 From 2564b75e5dddf32b5cce62ecc3d9a628d2c3f39f Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 22 May 2020 01:38:20 +0200 Subject: [PATCH 2/4] Changed JArrayHelper to use ArrayHelper and added the use namespace to the files needed. Changed JString to use StringHelper and added the use namespace to the files needed. Fixed the spelling mistake of uniqe. Made changes to compiler to accomidate the new pro member feature that added viewsDefaultOrdering options. Fixed the moving of custom fields found in subforms of a plugin or module. Improved the sorting options to correctly map for custom fields and the category field. --- README.md | 14 +- admin/README.txt | 14 +- admin/assets/css/admin.css | 1 + admin/compiler/joomla_3/JModelAdmin.php | 14 +- admin/compiler/joomla_3/JModelAdmin_site.php | 14 +- admin/compiler/joomla_3/JModelList.php | 2 + admin/compiler/joomla_3/JModelListAjax.php | 2 + .../compiler/joomla_3/JModelListAjaxSite.php | 2 +- .../joomla_3/JModelList_custom_admin.php | 2 + admin/compiler/joomla_3/JModelList_site.php | 2 + admin/controllers/admin_views.php | 2 +- admin/controllers/class_methods.php | 2 +- admin/controllers/class_properties.php | 2 +- admin/controllers/custom_admin_views.php | 2 +- admin/controllers/custom_codes.php | 2 +- admin/controllers/dynamic_gets.php | 2 +- admin/controllers/fields.php | 2 +- admin/controllers/fieldtypes.php | 2 +- admin/controllers/help_documents.php | 2 +- admin/controllers/joomla_components.php | 2 +- admin/controllers/language_translations.php | 2 +- admin/controllers/languages.php | 2 +- admin/controllers/layouts.php | 2 +- admin/controllers/placeholders.php | 2 +- admin/controllers/servers.php | 2 +- admin/controllers/site_views.php | 2 +- admin/controllers/snippets.php | 2 +- admin/controllers/templates.php | 2 +- admin/controllers/validation_rules.php | 2 +- admin/helpers/compiler/a_Get.php | 11 +- admin/helpers/compiler/b_Structure.php | 126 +++-- admin/helpers/compiler/e_Interpretation.php | 497 ++++++++++++------ .../en-GB/en-GB.com_componentbuilder.ini | 8 +- admin/models/admin_custom_tabs.php | 44 +- admin/models/admin_fields.php | 44 +- admin/models/admin_fields_conditions.php | 44 +- admin/models/admin_fields_relations.php | 44 +- admin/models/admin_view.php | 42 +- admin/models/admin_views.php | 6 +- admin/models/admins_custom_tabs.php | 4 +- admin/models/admins_fields.php | 4 +- admin/models/admins_fields_conditions.php | 4 +- admin/models/admins_fields_relations.php | 4 +- admin/models/ajax.php | 2 + admin/models/class_extendings.php | 4 +- admin/models/class_extends.php | 44 +- admin/models/class_method.php | 46 +- admin/models/class_methods.php | 4 +- admin/models/class_properties.php | 4 +- admin/models/class_property.php | 46 +- admin/models/compiler.php | 2 + admin/models/component_admin_views.php | 44 +- admin/models/component_config.php | 44 +- admin/models/component_custom_admin_menus.php | 44 +- admin/models/component_custom_admin_views.php | 44 +- admin/models/component_dashboard.php | 44 +- admin/models/component_files_folders.php | 44 +- admin/models/component_modules.php | 44 +- admin/models/component_mysql_tweaks.php | 44 +- admin/models/component_placeholders.php | 44 +- admin/models/component_plugins.php | 44 +- admin/models/component_site_views.php | 44 +- admin/models/component_updates.php | 44 +- admin/models/components_admin_views.php | 4 +- admin/models/components_config.php | 4 +- .../models/components_custom_admin_menus.php | 4 +- .../models/components_custom_admin_views.php | 4 +- admin/models/components_dashboard.php | 4 +- admin/models/components_files_folders.php | 4 +- admin/models/components_modules.php | 4 +- admin/models/components_mysql_tweaks.php | 4 +- admin/models/components_placeholders.php | 4 +- admin/models/components_plugins.php | 4 +- admin/models/components_site_views.php | 4 +- admin/models/components_updates.php | 4 +- admin/models/custom_admin_view.php | 46 +- admin/models/custom_admin_views.php | 8 +- admin/models/custom_code.php | 44 +- admin/models/custom_codes.php | 8 +- admin/models/dynamic_get.php | 46 +- admin/models/dynamic_gets.php | 6 +- admin/models/field.php | 44 +- admin/models/fields.php | 10 +- admin/models/fields/libconfigfield.php | 2 +- admin/models/fields/listfields.php | 7 +- admin/models/fields/matchfield.php | 7 +- admin/models/fields/targetfields.php | 5 +- admin/models/fieldtype.php | 44 +- admin/models/fieldtypes.php | 6 +- .../models/forms/admin_fields_conditions.xml | 12 +- admin/models/forms/admin_fields_relations.xml | 13 +- admin/models/forms/dynamic_get.xml | 7 +- admin/models/forms/library.xml | 11 +- admin/models/get_snippets.php | 2 + admin/models/help_document.php | 46 +- admin/models/help_documents.php | 8 +- admin/models/joomla_component.php | 46 +- admin/models/joomla_components.php | 6 +- admin/models/joomla_module.php | 46 +- .../joomla_module_files_folders_urls.php | 44 +- admin/models/joomla_module_updates.php | 44 +- admin/models/joomla_modules.php | 4 +- .../joomla_modules_files_folders_urls.php | 4 +- admin/models/joomla_modules_updates.php | 4 +- admin/models/joomla_plugin.php | 46 +- .../joomla_plugin_files_folders_urls.php | 44 +- admin/models/joomla_plugin_group.php | 44 +- admin/models/joomla_plugin_groups.php | 6 +- admin/models/joomla_plugin_updates.php | 44 +- admin/models/joomla_plugins.php | 8 +- .../joomla_plugins_files_folders_urls.php | 4 +- admin/models/joomla_plugins_updates.php | 4 +- admin/models/language.php | 44 +- admin/models/language_translation.php | 44 +- admin/models/language_translations.php | 4 +- admin/models/languages.php | 4 +- admin/models/layout.php | 46 +- admin/models/layouts.php | 8 +- admin/models/libraries.php | 4 +- admin/models/libraries_config.php | 4 +- admin/models/libraries_files_folders_urls.php | 4 +- admin/models/library.php | 46 +- admin/models/library_config.php | 44 +- admin/models/library_files_folders_urls.php | 44 +- admin/models/placeholder.php | 44 +- admin/models/placeholders.php | 4 +- admin/models/server.php | 44 +- admin/models/servers.php | 4 +- admin/models/site_view.php | 46 +- admin/models/site_views.php | 8 +- admin/models/snippet.php | 46 +- admin/models/snippet_type.php | 44 +- admin/models/snippet_types.php | 4 +- admin/models/snippets.php | 8 +- admin/models/template.php | 46 +- admin/models/templates.php | 8 +- admin/models/validation_rule.php | 44 +- admin/models/validation_rules.php | 4 +- admin/sql/install.mysql.utf8.sql | 34 +- admin/views/admin_views/tmpl/default_head.php | 10 +- admin/views/admin_views/view.html.php | 2 +- .../admins_custom_tabs/tmpl/default_head.php | 4 +- admin/views/admins_custom_tabs/view.html.php | 2 +- .../views/admins_fields/tmpl/default_head.php | 4 +- admin/views/admins_fields/view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../admins_fields_conditions/view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../admins_fields_relations/view.html.php | 2 +- .../class_extendings/tmpl/default_head.php | 8 +- admin/views/class_extendings/view.html.php | 2 +- .../views/class_methods/tmpl/default_head.php | 10 +- admin/views/class_methods/view.html.php | 2 +- .../class_properties/tmpl/default_head.php | 10 +- admin/views/class_properties/view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../components_admin_views/view.html.php | 2 +- .../components_config/tmpl/default_head.php | 4 +- admin/views/components_config/view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../views/components_dashboard/view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../components_files_folders/view.html.php | 2 +- .../components_modules/tmpl/default_head.php | 4 +- admin/views/components_modules/view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../components_mysql_tweaks/view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../components_placeholders/view.html.php | 2 +- .../components_plugins/tmpl/default_head.php | 4 +- admin/views/components_plugins/view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../views/components_site_views/view.html.php | 2 +- .../components_updates/tmpl/default_head.php | 4 +- admin/views/components_updates/view.html.php | 2 +- .../custom_admin_views/tmpl/default_head.php | 12 +- admin/views/custom_admin_views/view.html.php | 2 +- .../views/custom_codes/tmpl/default_head.php | 14 +- admin/views/custom_codes/view.html.php | 2 +- .../views/dynamic_gets/tmpl/default_head.php | 10 +- admin/views/dynamic_gets/view.html.php | 2 +- admin/views/fields/tmpl/default_head.php | 18 +- admin/views/fields/view.html.php | 4 +- admin/views/fieldtypes/tmpl/default_head.php | 10 +- admin/views/fieldtypes/view.html.php | 4 +- .../help_documents/tmpl/default_head.php | 14 +- admin/views/help_documents/view.html.php | 2 +- .../joomla_components/tmpl/default_head.php | 12 +- admin/views/joomla_components/view.html.php | 2 +- .../joomla_modules/tmpl/default_head.php | 8 +- admin/views/joomla_modules/view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../joomla_modules_updates/view.html.php | 2 +- .../tmpl/default_head.php | 8 +- .../views/joomla_plugin_groups/view.html.php | 2 +- .../joomla_plugins/tmpl/default_head.php | 10 +- admin/views/joomla_plugins/view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../joomla_plugins_updates/view.html.php | 2 +- .../tmpl/default_head.php | 6 +- .../views/language_translations/view.html.php | 2 +- admin/views/languages/tmpl/default_head.php | 8 +- admin/views/languages/view.html.php | 2 +- admin/views/layouts/tmpl/default_head.php | 10 +- admin/views/layouts/view.html.php | 2 +- admin/views/libraries/tmpl/default_head.php | 12 +- admin/views/libraries/view.html.php | 2 +- .../libraries_config/tmpl/default_head.php | 4 +- admin/views/libraries_config/view.html.php | 2 +- .../tmpl/default_head.php | 4 +- .../view.html.php | 2 +- .../views/placeholders/tmpl/default_head.php | 8 +- admin/views/placeholders/view.html.php | 2 +- admin/views/servers/tmpl/default_head.php | 8 +- admin/views/servers/view.html.php | 2 +- admin/views/site_views/tmpl/default_head.php | 12 +- admin/views/site_views/view.html.php | 2 +- .../views/snippet_types/tmpl/default_head.php | 8 +- admin/views/snippet_types/view.html.php | 2 +- admin/views/snippets/tmpl/default_head.php | 14 +- admin/views/snippets/view.html.php | 2 +- admin/views/templates/tmpl/default_head.php | 10 +- admin/views/templates/view.html.php | 2 +- .../validation_rules/tmpl/default_head.php | 8 +- admin/views/validation_rules/view.html.php | 2 +- componentbuilder.xml | 6 +- componentbuilder_update_server.xml | 4 +- script.php | 2 +- 236 files changed, 2041 insertions(+), 1594 deletions(-) diff --git a/README.md b/README.md index a9172ecc4..f609a17bf 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.11.0) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.11.1) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,14 +144,14 @@ 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*: 23rd April, 2020 -+ *Version*: 2.11.0 ++ *Last Build*: 21st May, 2020 ++ *Version*: 2.11.1 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **280795** -+ *Field count*: **1514** -+ *File count*: **1769** -+ *Folder count*: **286** ++ *Line count*: **281703** ++ *Field count*: **1522** ++ *File count*: **1783** ++ *Folder count*: **295** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/README.txt b/admin/README.txt index a9172ecc4..f609a17bf 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.11.0) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.11.1) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,14 +144,14 @@ 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*: 23rd April, 2020 -+ *Version*: 2.11.0 ++ *Last Build*: 21st May, 2020 ++ *Version*: 2.11.1 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **280795** -+ *Field count*: **1514** -+ *File count*: **1769** -+ *Folder count*: **286** ++ *Line count*: **281703** ++ *Field count*: **1522** ++ *File count*: **1783** ++ *Folder count*: **295** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index c218cd5cf..863247ed7 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -13,6 +13,7 @@ pointer-events: none; } .fieldMedium { width: 120px; } +.fieldLarge { width: 320px; } .fieldMid { width: 80px; } .fieldFull { width: 100%; } .fieldSmall { width: 60px; } diff --git a/admin/compiler/joomla_3/JModelAdmin.php b/admin/compiler/joomla_3/JModelAdmin.php index 30020d7f2..82b952d90 100644 --- a/admin/compiler/joomla_3/JModelAdmin.php +++ b/admin/compiler/joomla_3/JModelAdmin.php @@ -18,6 +18,8 @@ defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * ###Component### ###View### Model @@ -303,7 +305,7 @@ class ###Component###Model###View### extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -344,7 +346,7 @@ class ###Component###Model###View### extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -424,7 +426,7 @@ class ###Component###Model###View### extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -433,15 +435,15 @@ class ###Component###Model###View### extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; diff --git a/admin/compiler/joomla_3/JModelAdmin_site.php b/admin/compiler/joomla_3/JModelAdmin_site.php index 30020d7f2..82b952d90 100644 --- a/admin/compiler/joomla_3/JModelAdmin_site.php +++ b/admin/compiler/joomla_3/JModelAdmin_site.php @@ -18,6 +18,8 @@ defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * ###Component### ###View### Model @@ -303,7 +305,7 @@ class ###Component###Model###View### extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -344,7 +346,7 @@ class ###Component###Model###View### extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -424,7 +426,7 @@ class ###Component###Model###View### extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -433,15 +435,15 @@ class ###Component###Model###View### extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; diff --git a/admin/compiler/joomla_3/JModelList.php b/admin/compiler/joomla_3/JModelList.php index d92dfc532..1e55315b5 100644 --- a/admin/compiler/joomla_3/JModelList.php +++ b/admin/compiler/joomla_3/JModelList.php @@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * ###Views### Model */ diff --git a/admin/compiler/joomla_3/JModelListAjax.php b/admin/compiler/joomla_3/JModelListAjax.php index 5b155ff87..154d31638 100644 --- a/admin/compiler/joomla_3/JModelListAjax.php +++ b/admin/compiler/joomla_3/JModelListAjax.php @@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * ###Component### Ajax Model */ diff --git a/admin/compiler/joomla_3/JModelListAjaxSite.php b/admin/compiler/joomla_3/JModelListAjaxSite.php index a401f616f..294b7cd7b 100644 --- a/admin/compiler/joomla_3/JModelListAjaxSite.php +++ b/admin/compiler/joomla_3/JModelListAjaxSite.php @@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); -jimport('joomla.application.component.helper'); +use Joomla\Utilities\ArrayHelper; /** * ###Component### Ajax Model diff --git a/admin/compiler/joomla_3/JModelList_custom_admin.php b/admin/compiler/joomla_3/JModelList_custom_admin.php index 5676136ed..3c1e96d4a 100644 --- a/admin/compiler/joomla_3/JModelList_custom_admin.php +++ b/admin/compiler/joomla_3/JModelList_custom_admin.php @@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * ###Component### Model for ###SViews### */ diff --git a/admin/compiler/joomla_3/JModelList_site.php b/admin/compiler/joomla_3/JModelList_site.php index 09caef245..bbfeefed0 100644 --- a/admin/compiler/joomla_3/JModelList_site.php +++ b/admin/compiler/joomla_3/JModelList_site.php @@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * ###Component### Model for ###SViews### */ diff --git a/admin/controllers/admin_views.php b/admin/controllers/admin_views.php index c1634d053..28e1a3772 100644 --- a/admin/controllers/admin_views.php +++ b/admin/controllers/admin_views.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerAdmin_views extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Admin_views'); // get the data to export diff --git a/admin/controllers/class_methods.php b/admin/controllers/class_methods.php index b61b3863c..9b03042d5 100644 --- a/admin/controllers/class_methods.php +++ b/admin/controllers/class_methods.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerClass_methods extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Class_methods'); // get the data to export diff --git a/admin/controllers/class_properties.php b/admin/controllers/class_properties.php index d0b3210d7..bf2f89cfb 100644 --- a/admin/controllers/class_properties.php +++ b/admin/controllers/class_properties.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerClass_properties extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Class_properties'); // get the data to export diff --git a/admin/controllers/custom_admin_views.php b/admin/controllers/custom_admin_views.php index 6287a4822..a8bfbf399 100644 --- a/admin/controllers/custom_admin_views.php +++ b/admin/controllers/custom_admin_views.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerCustom_admin_views extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Custom_admin_views'); // get the data to export diff --git a/admin/controllers/custom_codes.php b/admin/controllers/custom_codes.php index b63d0e817..6da166f40 100644 --- a/admin/controllers/custom_codes.php +++ b/admin/controllers/custom_codes.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerCustom_codes extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Custom_codes'); // get the data to export diff --git a/admin/controllers/dynamic_gets.php b/admin/controllers/dynamic_gets.php index bd027015b..717b291a4 100644 --- a/admin/controllers/dynamic_gets.php +++ b/admin/controllers/dynamic_gets.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerDynamic_gets extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Dynamic_gets'); // get the data to export diff --git a/admin/controllers/fields.php b/admin/controllers/fields.php index 1c58985d0..629856ae6 100644 --- a/admin/controllers/fields.php +++ b/admin/controllers/fields.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerFields extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Fields'); // get the data to export diff --git a/admin/controllers/fieldtypes.php b/admin/controllers/fieldtypes.php index 8afaf604b..b9ce8c65e 100644 --- a/admin/controllers/fieldtypes.php +++ b/admin/controllers/fieldtypes.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerFieldtypes extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Fieldtypes'); // get the data to export diff --git a/admin/controllers/help_documents.php b/admin/controllers/help_documents.php index e751e14f7..9d76a261d 100644 --- a/admin/controllers/help_documents.php +++ b/admin/controllers/help_documents.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerHelp_documents extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Help_documents'); // get the data to export diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php index d4bcd8acd..97b865a52 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Joomla_components'); // get the data to export diff --git a/admin/controllers/language_translations.php b/admin/controllers/language_translations.php index 55ab798d2..85693f011 100644 --- a/admin/controllers/language_translations.php +++ b/admin/controllers/language_translations.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerLanguage_translations extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Language_translations'); // get the data to export diff --git a/admin/controllers/languages.php b/admin/controllers/languages.php index 5eb80a1df..97f5e2130 100644 --- a/admin/controllers/languages.php +++ b/admin/controllers/languages.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerLanguages extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Languages'); // get the data to export diff --git a/admin/controllers/layouts.php b/admin/controllers/layouts.php index 3cce7e28e..3ed1b3554 100644 --- a/admin/controllers/layouts.php +++ b/admin/controllers/layouts.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerLayouts extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Layouts'); // get the data to export diff --git a/admin/controllers/placeholders.php b/admin/controllers/placeholders.php index 87a1002ca..0649336ac 100644 --- a/admin/controllers/placeholders.php +++ b/admin/controllers/placeholders.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerPlaceholders extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Placeholders'); // get the data to export diff --git a/admin/controllers/servers.php b/admin/controllers/servers.php index 03720c0fd..d1948dfb5 100644 --- a/admin/controllers/servers.php +++ b/admin/controllers/servers.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerServers extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Servers'); // get the data to export diff --git a/admin/controllers/site_views.php b/admin/controllers/site_views.php index 3a69b9061..f8c6d8e6f 100644 --- a/admin/controllers/site_views.php +++ b/admin/controllers/site_views.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerSite_views extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Site_views'); // get the data to export diff --git a/admin/controllers/snippets.php b/admin/controllers/snippets.php index 0fdffaf47..0c0c97617 100644 --- a/admin/controllers/snippets.php +++ b/admin/controllers/snippets.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerSnippets extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Snippets'); // get the data to export diff --git a/admin/controllers/templates.php b/admin/controllers/templates.php index 915eceb64..9ec42868f 100644 --- a/admin/controllers/templates.php +++ b/admin/controllers/templates.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerTemplates extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Templates'); // get the data to export diff --git a/admin/controllers/validation_rules.php b/admin/controllers/validation_rules.php index 067d07e29..ee7195018 100644 --- a/admin/controllers/validation_rules.php +++ b/admin/controllers/validation_rules.php @@ -53,7 +53,7 @@ class ComponentbuilderControllerValidation_rules extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Validation_rules'); // get the data to export diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 5c5e419bb..95c6cfe7c 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -589,6 +589,13 @@ class Get */ public $fieldRelations = array(); + /** + * The views default ordering + * + * @var array + */ + public $viewsDefaultOrdering = array(); + /** * Default Fields * @@ -1406,7 +1413,7 @@ class Get ? json_decode($component->addadmin_views, true) : null; if (ComponentbuilderHelper::checkArray($component->addadmin_views)) { - // sort the views acording to order + // sort the views according to order usort( $component->addadmin_views, function ($a, $b) { if ($a['order'] != 0 && $b['order'] != 0) @@ -2443,7 +2450,7 @@ class Get // clear this data unset($old_view); } - // sort the fields acording to order + // sort the fields according to order usort( $view->fields, function ($a, $b) { if (isset($a['order_list']) && isset($b['order_list'])) diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index ff9fb50e3..735ce1e20 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -2555,62 +2555,94 @@ class Structure extends Get */ public function moveFieldsRules($field, $path) { - // check if this is a custom field that should be moved - if (isset($this->extentionCustomfields[$field['type_name']])) + // check if we have a subform or repeatable field + if ($field['type_name'] === 'subform' || $field['type_name'] === 'repeatable') { - // lets check if we already moved this - if (!isset( - $this->extentionTrackingFilesMoved[$path . 'type' - . $field['type_name']] - )) - { - // check files exist - if (JFile::exists( - $this->componentPath . '/admin/models/fields/' - . $field['type_name'] . '.php' - )) - { - // copy the custom field - JFile::copy( - $this->componentPath . '/admin/models/fields/' - . $field['type_name'] . '.php', - $path . '/fields/' . $field['type_name'] . '.php' - ); - } - // stop from doing this again. - $this->extentionTrackingFilesMoved[$path . 'type' - . $field['type_name']] - = true; - } + // since we could have a custom field or rule inside + $this->moveMultiFieldsRules($field, $path); } - // check if this has validation that should be moved - if (isset($this->validationLinkedFields[$field['field']])) + else { - // lets check if we already moved this - if (!isset( - $this->extentionTrackingFilesMoved[$path . 'rule' - . $this->validationLinkedFields[$field['field']]] - )) + // check if this is a custom field that should be moved + if (isset($this->extentionCustomfields[$field['type_name']])) { - // check files exist - if (JFile::exists( - $this->componentPath . '/admin/models/rules/' - . $this->validationLinkedFields[$field['field']] . '.php' - )) + $check = md5($path . 'type' . $field['type_name']); + // lets check if we already moved this + if (!isset($this->extentionTrackingFilesMoved[$check])) { - // copy the custom field - JFile::copy( + // check files exist + if (JFile::exists( + $this->componentPath . '/admin/models/fields/' + . $field['type_name'] . '.php' + )) + { + // copy the custom field + JFile::copy( + $this->componentPath . '/admin/models/fields/' + . $field['type_name'] . '.php', + $path . '/fields/' . $field['type_name'] . '.php' + ); + } + // stop from doing this again. + $this->extentionTrackingFilesMoved[$check] = true; + } + } + // check if this has validation that should be moved + if (isset($this->validationLinkedFields[$field['field']])) + { + $check = md5( + $path . 'rule' + . $this->validationLinkedFields[$field['field']] + ); + // lets check if we already moved this + if (!isset($this->extentionTrackingFilesMoved[$check])) + { + // check files exist + if (JFile::exists( $this->componentPath . '/admin/models/rules/' . $this->validationLinkedFields[$field['field']] - . '.php', $path . '/rules/' - . $this->validationLinkedFields[$field['field']] . '.php' - ); + )) + { + // copy the custom field + JFile::copy( + $this->componentPath . '/admin/models/rules/' + . $this->validationLinkedFields[$field['field']] + . '.php', $path . '/rules/' + . $this->validationLinkedFields[$field['field']] + . '.php' + ); + } + // stop from doing this again. + $this->extentionTrackingFilesMoved[$check] = true; } - // stop from doing this again. - $this->extentionTrackingFilesMoved[$path . 'rule' - . $this->validationLinkedFields[$field['field']]] - = true; + } + } + } + + /** + * move the fields and Rules of multi fields + * + * @param array $multi_field The field data + * @param string $path The path to move to + * + * @return void + * + */ + protected function moveMultiFieldsRules($multi_field, $path) + { + // get the fields ids + $ids = array_map( 'trim', explode(',', ComponentbuilderHelper::getBetween($multi_field['settings']->xml, 'fields="', '"'))); + if (ComponentbuilderHelper::checkArray($ids)) + { + foreach ($ids as $id) + { + // setup the field + $field = array(); + $field['field'] = $id; + $this->setFieldDetails($field); + // move field and rules if needed + $this->moveFieldsRules($field, $path); } } } diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 84e79c8e9..8d757a361 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -237,7 +237,7 @@ class Interpretation extends Fields */ public function __construct($config = array()) { - // first we run the perent constructor + // first we run the parent constructor if (parent::__construct($config)) { return true; @@ -4607,13 +4607,13 @@ class Interpretation extends Fields /** * get the a script from the custom script builder * - * @param string $first The first key - * @param string $second The second key - * @param string $prefix The prefix to add in front of the script if found - * @param string $note The switch/note to add to the script - * @param bool $unset The switch to unset the value if found - * @param string $default The switch/string to use as default return if script not found - * @param string $sufix The sufix to add after the script if found + * @param string $first The first key + * @param string $second The second key + * @param string $prefix The prefix to add in front of the script if found + * @param string $note The switch/note to add to the script + * @param bool $unset The switch to unset the value if found + * @param string $default The switch/string to use as default return if script not found + * @param string $sufix The sufix to add after the script if found * * @return mix The string/script if found or the default value if not found * @@ -5631,6 +5631,7 @@ class Interpretation extends Fields return PHP_EOL . implode(PHP_EOL, $buttons); } + return ''; } @@ -9067,9 +9068,9 @@ class Interpretation extends Fields $batchcopy[] = $this->_t(2) . "}" . $customScript; $batchcopy[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) - . " get list of uniqe fields"; + . " get list of unique fields"; $batchcopy[] = $this->_t(2) - . "\$uniqeFields = \$this->getUniqeFields();"; + . "\$uniqueFields = \$this->getUniqueFields();"; $batchcopy[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " remove move_copy from array"; $batchcopy[] = $this->_t(2) . "unset(\$values['move_copy']);"; @@ -9260,7 +9261,7 @@ class Interpretation extends Fields $batchcopy[] = $this->_t(3) . "{"; $batchcopy[] = $this->_t(4) . "\$this->table->" . implode( '', $titles - ) . " = \$this->generateUniqe('" . implode('', $titles) + ) . " = \$this->generateUnique('" . implode('', $titles) . "',\$this->table->" . implode('', $titles) . ");"; $batchcopy[] = $this->_t(3) . "}"; } @@ -9281,14 +9282,15 @@ class Interpretation extends Fields $batchcopy[] = $this->_t(3) . "}" . PHP_EOL; $batchcopy[] = $this->_t(3) . "//" . $this->setLine(__LINE__) - . " update all uniqe fields"; + . " update all unique fields"; $batchcopy[] = $this->_t(3) . "if (" . $Helper - . "::checkArray(\$uniqeFields))"; + . "::checkArray(\$uniqueFields))"; $batchcopy[] = $this->_t(3) . "{"; - $batchcopy[] = $this->_t(4) . "foreach (\$uniqeFields as \$uniqeField)"; + $batchcopy[] = $this->_t(4) + . "foreach (\$uniqueFields as \$uniqueField)"; $batchcopy[] = $this->_t(4) . "{"; $batchcopy[] = $this->_t(5) - . "\$this->table->\$uniqeField = \$this->generateUniqe(\$uniqeField,\$this->table->\$uniqeField);"; + . "\$this->table->\$uniqueField = \$this->generateUnique(\$uniqueField,\$this->table->\$uniqueField);"; $batchcopy[] = $this->_t(4) . "}"; $batchcopy[] = $this->_t(3) . "}"; @@ -9348,7 +9350,7 @@ class Interpretation extends Fields public function setAliasTitleFix($viewName_single) { - $fixUniqe = array(); + $fixUnique = array(); // only load this if these two items are set if (array_key_exists($viewName_single, $this->aliasBuilder) && (array_key_exists($viewName_single, $this->titleBuilder) @@ -9381,16 +9383,16 @@ class Interpretation extends Fields $titles = array($this->titleBuilder[$viewName_single]); } // start building the fix - $fixUniqe[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine( + $fixUnique[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine( __LINE__ ) . " Alter the " . implode(', ', $titles) . " for save as copy"; - $fixUniqe[] = $this->_t(2) + $fixUnique[] = $this->_t(2) . "if (\$input->get('task') === 'save2copy')"; - $fixUniqe[] = $this->_t(2) . "{"; - $fixUniqe[] = $this->_t(3) + $fixUnique[] = $this->_t(2) . "{"; + $fixUnique[] = $this->_t(3) . "\$origTable = clone \$this->getTable();"; - $fixUniqe[] = $this->_t(3) + $fixUnique[] = $this->_t(3) . "\$origTable->load(\$input->getInt('id'));"; // reset the buckets $ifStatment = array(); @@ -9407,13 +9409,13 @@ class Interpretation extends Fields $titleUpdate[] = $this->_t(4) . "\$data['" . $title . "'] = \$" . $title . ";"; } - $fixUniqe[] = PHP_EOL . $this->_t(3) . "if (" . implode( + $fixUnique[] = PHP_EOL . $this->_t(3) . "if (" . implode( ' || ', $ifStatment ) . ")"; - $fixUniqe[] = $this->_t(3) . "{"; + $fixUnique[] = $this->_t(3) . "{"; if ($setCategory && count((array) $titles) == 1) { - $fixUniqe[] = $this->_t(4) . "list(" . implode('', $titleVars) + $fixUnique[] = $this->_t(4) . "list(" . implode('', $titleVars) . ", \$" . $alias . ") = \$this->generateNewTitle(\$data['" . $category . "'], \$data['" . $alias . "'], " . implode( '', $titleData @@ -9421,136 +9423,141 @@ class Interpretation extends Fields } elseif (count((array) $titles) == 1) { - $fixUniqe[] = $this->_t(4) . "list(" . implode(', ', $titleVars) + $fixUnique[] = $this->_t(4) . "list(" . implode( + ', ', $titleVars + ) . ", \$" . $alias . ") = \$this->_generateNewTitle(\$data['" . $alias . "'], " . implode('', $titleData) . ");"; } else { - $fixUniqe[] = $this->_t(4) . "list(" . implode(', ', $titleVars) + $fixUnique[] = $this->_t(4) . "list(" . implode( + ', ', $titleVars + ) . ", \$" . $alias . ") = \$this->_generateNewTitle(\$data['" . $alias . "'], array(" . implode(', ', $titleData) . "));"; } - $fixUniqe[] = implode("\n", $titleUpdate); - $fixUniqe[] = $this->_t(4) . "\$data['" . $alias . "'] = \$" + $fixUnique[] = implode("\n", $titleUpdate); + $fixUnique[] = $this->_t(4) . "\$data['" . $alias . "'] = \$" . $alias . ";"; - $fixUniqe[] = $this->_t(3) . "}"; - $fixUniqe[] = $this->_t(3) . "else"; - $fixUniqe[] = $this->_t(3) . "{"; - $fixUniqe[] = $this->_t(4) . "if (\$data['" . $alias + $fixUnique[] = $this->_t(3) . "}"; + $fixUnique[] = $this->_t(3) . "else"; + $fixUnique[] = $this->_t(3) . "{"; + $fixUnique[] = $this->_t(4) . "if (\$data['" . $alias . "'] == \$origTable->" . $alias . ")"; - $fixUniqe[] = $this->_t(4) . "{"; - $fixUniqe[] = $this->_t(5) . "\$data['" . $alias . "'] = '';"; - $fixUniqe[] = $this->_t(4) . "}"; - $fixUniqe[] = $this->_t(3) . "}"; - $fixUniqe[] = PHP_EOL . $this->_t(3) . "\$data['published'] = 0;"; - $fixUniqe[] = $this->_t(2) . "}"; - $fixUniqe[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine( + $fixUnique[] = $this->_t(4) . "{"; + $fixUnique[] = $this->_t(5) . "\$data['" . $alias . "'] = '';"; + $fixUnique[] = $this->_t(4) . "}"; + $fixUnique[] = $this->_t(3) . "}"; + $fixUnique[] = PHP_EOL . $this->_t(3) . "\$data['published'] = 0;"; + $fixUnique[] = $this->_t(2) . "}"; + $fixUnique[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine( __LINE__ ) . " Automatic handling of " . $alias . " for empty fields"; - $fixUniqe[] = $this->_t(2) + $fixUnique[] = $this->_t(2) . "if (in_array(\$input->get('task'), array('apply', 'save', 'save2new')) && (int) \$input->get('id') == 0)"; - $fixUniqe[] = $this->_t(2) . "{"; - $fixUniqe[] = $this->_t(3) . "if (\$data['" . $alias + $fixUnique[] = $this->_t(2) . "{"; + $fixUnique[] = $this->_t(3) . "if (\$data['" . $alias . "'] == null || empty(\$data['" . $alias . "']))"; - $fixUniqe[] = $this->_t(3) . "{"; - $fixUniqe[] = $this->_t(4) + $fixUnique[] = $this->_t(3) . "{"; + $fixUnique[] = $this->_t(4) . "if (JFactory::getConfig()->get('unicodeslugs') == 1)"; - $fixUniqe[] = $this->_t(4) . "{"; - $fixUniqe[] = $this->_t(5) . "\$data['" . $alias + $fixUnique[] = $this->_t(4) . "{"; + $fixUnique[] = $this->_t(5) . "\$data['" . $alias . "'] = JFilterOutput::stringURLUnicodeSlug(" . implode( ' . " " . ', $titleData ) . ");"; - $fixUniqe[] = $this->_t(4) . "}"; - $fixUniqe[] = $this->_t(4) . "else"; - $fixUniqe[] = $this->_t(4) . "{"; - $fixUniqe[] = $this->_t(5) . "\$data['" . $alias + $fixUnique[] = $this->_t(4) . "}"; + $fixUnique[] = $this->_t(4) . "else"; + $fixUnique[] = $this->_t(4) . "{"; + $fixUnique[] = $this->_t(5) . "\$data['" . $alias . "'] = JFilterOutput::stringURLSafe(" . implode( ' . " " . ', $titleData ) . ");"; - $fixUniqe[] = $this->_t(4) . "}"; - $fixUniqe[] = PHP_EOL . $this->_t(4) + $fixUnique[] = $this->_t(4) . "}"; + $fixUnique[] = PHP_EOL . $this->_t(4) . "\$table = JTable::getInstance('" . $viewName_single . "', '" . $this->componentCodeName . "Table');"; if ($setCategory && count($titles) == 1) { - $fixUniqe[] = PHP_EOL . $this->_t(4) + $fixUnique[] = PHP_EOL . $this->_t(4) . "if (\$table->load(array('" . $alias . "' => \$data['" . $alias . "'], '" . $category . "' => \$data['" . $category . "'])) && (\$table->id != \$data['id'] || \$data['id'] == 0))"; - $fixUniqe[] = $this->_t(4) . "{"; - $fixUniqe[] = $this->_t(5) . "\$msg = JText:" . ":_('COM_" + $fixUnique[] = $this->_t(4) . "{"; + $fixUnique[] = $this->_t(5) . "\$msg = JText:" . ":_('COM_" . $this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] . "_" . $VIEW . "_SAVE_WARNING');"; - $fixUniqe[] = $this->_t(4) . "}"; - $fixUniqe[] = PHP_EOL . $this->_t(4) . "list(" . implode( + $fixUnique[] = $this->_t(4) . "}"; + $fixUnique[] = PHP_EOL . $this->_t(4) . "list(" . implode( '', $titleVars ) . ", \$" . $alias . ") = \$this->generateNewTitle(\$data['" . $category . "'], \$data['" . $alias . "'], " . implode('', $titleData) . ");"; - $fixUniqe[] = $this->_t(4) . "\$data['" . $alias . "'] = \$" + $fixUnique[] = $this->_t(4) . "\$data['" . $alias . "'] = \$" . $alias . ";"; } else { - $fixUniqe[] = PHP_EOL . $this->_t(4) + $fixUnique[] = PHP_EOL . $this->_t(4) . "if (\$table->load(array('" . $alias . "' => \$data['" . $alias . "'])) && (\$table->id != \$data['id'] || \$data['id'] == 0))"; - $fixUniqe[] = $this->_t(4) . "{"; - $fixUniqe[] = $this->_t(5) . "\$msg = JText:" . ":_('COM_" + $fixUnique[] = $this->_t(4) . "{"; + $fixUnique[] = $this->_t(5) . "\$msg = JText:" . ":_('COM_" . $this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] . "_" . $VIEW . "_SAVE_WARNING');"; - $fixUniqe[] = $this->_t(4) . "}"; - $fixUniqe[] = PHP_EOL . $this->_t(4) . "\$data['" . $alias + $fixUnique[] = $this->_t(4) . "}"; + $fixUnique[] = PHP_EOL . $this->_t(4) . "\$data['" . $alias . "'] = \$this->_generateNewTitle(\$data['" . $alias . "']);"; } - $fixUniqe[] = PHP_EOL . $this->_t(4) . "if (isset(\$msg))"; - $fixUniqe[] = $this->_t(4) . "{"; - $fixUniqe[] = $this->_t(5) + $fixUnique[] = PHP_EOL . $this->_t(4) . "if (isset(\$msg))"; + $fixUnique[] = $this->_t(4) . "{"; + $fixUnique[] = $this->_t(5) . "JFactory::getApplication()->enqueueMessage(\$msg, 'warning');"; - $fixUniqe[] = $this->_t(4) . "}"; - $fixUniqe[] = $this->_t(3) . "}"; - $fixUniqe[] = $this->_t(2) . "}"; + $fixUnique[] = $this->_t(4) . "}"; + $fixUnique[] = $this->_t(3) . "}"; + $fixUnique[] = $this->_t(2) . "}"; -// $fixUniqe[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Update alias if still empty at this point"; -// $fixUniqe[] = $this->_t(2) . "if (\$data['" . $alias . "'] == null || empty(\$data['" . $alias . "']))"; -// $fixUniqe[] = $this->_t(2) . "{"; -// $fixUniqe[] = $this->_t(3) . "if (JFactory::getConfig()->get('unicodeslugs') == 1)"; -// $fixUniqe[] = $this->_t(3) . "{"; -// $fixUniqe[] = $this->_t(4) . "\$data['" . $alias . "'] = JFilterOutput::stringURLUnicodeSlug(" . implode(' . " " . ', $titleData) . ");"; -// $fixUniqe[] = $this->_t(3) . "}"; -// $fixUniqe[] = $this->_t(3) . "else"; -// $fixUniqe[] = $this->_t(3) . "{"; -// $fixUniqe[] = $this->_t(4) . "\$data['" . $alias . "'] = JFilterOutput::stringURLSafe(" . implode(' . " " . ', $titleData) . ");"; -// $fixUniqe[] = $this->_t(3) . "}"; -// $fixUniqe[] = $this->_t(2) . "}"; +// $fixUnique[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Update alias if still empty at this point"; +// $fixUnique[] = $this->_t(2) . "if (\$data['" . $alias . "'] == null || empty(\$data['" . $alias . "']))"; +// $fixUnique[] = $this->_t(2) . "{"; +// $fixUnique[] = $this->_t(3) . "if (JFactory::getConfig()->get('unicodeslugs') == 1)"; +// $fixUnique[] = $this->_t(3) . "{"; +// $fixUnique[] = $this->_t(4) . "\$data['" . $alias . "'] = JFilterOutput::stringURLUnicodeSlug(" . implode(' . " " . ', $titleData) . ");"; +// $fixUnique[] = $this->_t(3) . "}"; +// $fixUnique[] = $this->_t(3) . "else"; +// $fixUnique[] = $this->_t(3) . "{"; +// $fixUnique[] = $this->_t(4) . "\$data['" . $alias . "'] = JFilterOutput::stringURLSafe(" . implode(' . " " . ', $titleData) . ");"; +// $fixUnique[] = $this->_t(3) . "}"; +// $fixUnique[] = $this->_t(2) . "}"; } - // handel other uniqe fields - $fixUniqe[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) - . " Alter the uniqe field for save as copy"; - $fixUniqe[] = $this->_t(2) + // handel other unique fields + $fixUnique[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) + . " Alter the unique field for save as copy"; + $fixUnique[] = $this->_t(2) . "if (\$input->get('task') === 'save2copy')"; - $fixUniqe[] = $this->_t(2) . "{"; - $fixUniqe[] = $this->_t(3) . "//" . $this->setLine(__LINE__) - . " Automatic handling of other uniqe fields"; - $fixUniqe[] = $this->_t(3) - . "\$uniqeFields = \$this->getUniqeFields();"; - $fixUniqe[] = $this->_t(3) . "if (" + $fixUnique[] = $this->_t(2) . "{"; + $fixUnique[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Automatic handling of other unique fields"; + $fixUnique[] = $this->_t(3) + . "\$uniqueFields = \$this->getUniqueFields();"; + $fixUnique[] = $this->_t(3) . "if (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] - . "Helper::checkArray(\$uniqeFields))"; - $fixUniqe[] = $this->_t(3) . "{"; - $fixUniqe[] = $this->_t(4) . "foreach (\$uniqeFields as \$uniqeField)"; - $fixUniqe[] = $this->_t(4) . "{"; - $fixUniqe[] = $this->_t(5) - . "\$data[\$uniqeField] = \$this->generateUniqe(\$uniqeField,\$data[\$uniqeField]);"; - $fixUniqe[] = $this->_t(4) . "}"; - $fixUniqe[] = $this->_t(3) . "}"; - $fixUniqe[] = $this->_t(2) . "}"; + . "Helper::checkArray(\$uniqueFields))"; + $fixUnique[] = $this->_t(3) . "{"; + $fixUnique[] = $this->_t(4) + . "foreach (\$uniqueFields as \$uniqueField)"; + $fixUnique[] = $this->_t(4) . "{"; + $fixUnique[] = $this->_t(5) + . "\$data[\$uniqueField] = \$this->generateUnique(\$uniqueField,\$data[\$uniqueField]);"; + $fixUnique[] = $this->_t(4) . "}"; + $fixUnique[] = $this->_t(3) . "}"; + $fixUnique[] = $this->_t(2) . "}"; - return PHP_EOL . implode(PHP_EOL, $fixUniqe); + return PHP_EOL . implode(PHP_EOL, $fixUnique); } public function setGenerateNewTitle($viewName_single) @@ -9597,7 +9604,7 @@ class Interpretation extends Fields . "foreach(\$title as \$nr => &\$_title)"; $newFunction[] = $this->_t(4) . "{"; $newFunction[] = $this->_t(5) - . "\$_title = JString::increment(\$_title);"; + . "\$_title = StringHelper::increment(\$_title);"; $newFunction[] = $this->_t(4) . "}"; $newFunction[] = $this->_t(3) . "}"; $newFunction[] = $this->_t(3) . "//" . $this->setLine(__LINE__) @@ -9605,10 +9612,10 @@ class Interpretation extends Fields $newFunction[] = $this->_t(3) . "elseif (\$title)"; $newFunction[] = $this->_t(3) . "{"; $newFunction[] = $this->_t(4) - . "\$title = JString::increment(\$title);"; + . "\$title = StringHelper::increment(\$title);"; $newFunction[] = $this->_t(3) . "}"; $newFunction[] = $this->_t(3) - . "\$alias = JString::increment(\$alias, 'dash');"; + . "\$alias = StringHelper::increment(\$alias, 'dash');"; $newFunction[] = $this->_t(2) . "}"; $newFunction[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Check if this is an array of titles"; @@ -9655,7 +9662,7 @@ class Interpretation extends Fields . "while (\$table->load(array('title' => \$title)))"; $newFunction[] = $this->_t(2) . "{"; $newFunction[] = $this->_t(3) - . "\$title = JString::increment(\$title);"; + . "\$title = StringHelper::increment(\$title);"; $newFunction[] = $this->_t(2) . "}"; $newFunction[] = PHP_EOL . $this->_t(2) . "return \$title;"; $newFunction[] = $this->_t(1) . "}"; @@ -11635,24 +11642,44 @@ class Interpretation extends Fields $item['lang'] = $this->listHeadOverRide[$viewName_list][$item['id']]; } - // set the custom code - if (ComponentbuilderHelper::checkArray($item['custom'])) - { - $item['code'] = $item['code'] . '_' - . $item['custom']['text']; - } $class = 'nowrap hidden-phone'; if ($item['link']) { $class = 'nowrap'; } - $title = ""; + // add sort options if required if ($item['sort']) { - $title = "listDirn, \$this->listOrder); ?>"; + // if category + if ($item['type'] === 'category') + { + // only one category per/view allowed at this point + $title = "listDirn, \$this->listOrder); ?>"; + } + // set the custom code + elseif (ComponentbuilderHelper::checkArray( + $item['custom'] + )) + { + // keep an eye on this + $title = "listDirn, \$this->listOrder); ?>"; + } + else + { + $title = "listDirn, \$this->listOrder); ?>"; + } + } + else + { + $title = ""; } $head .= PHP_EOL . $this->_t(1) . ''; @@ -13674,12 +13701,42 @@ class Interpretation extends Fields . "\$query->where('a.access IN (' . \$groups . ')');"; $query .= PHP_EOL . $this->_t(2) . "}"; } - $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine( - __LINE__ - ) . " Order the results by ordering"; - $query .= PHP_EOL . $this->_t(2) - . "\$query->order('a.published ASC');"; - $query .= PHP_EOL . $this->_t(2) . "\$query->order('a.ordering ASC');"; + // add dynamic ordering (Linked view) + if (isset($this->viewsDefaultOrdering[$viewName_list]) + && $this->viewsDefaultOrdering[$viewName_list]['add_linked_ordering'] + == 1) + { + foreach ( + $this->viewsDefaultOrdering[$viewName_list]['linked_ordering_fields'] + as $order_field + ) + { + if (($order_field_name = $this->getFieldDatabaseName( + $viewName_list, $order_field['field'], 'listJoinBuilder' + )) !== false) + { + // default ordering is by publish and ordering + $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" + . $this->setLine( + __LINE__ + ) . " Order the results by ordering"; + $query .= PHP_EOL . $this->_t(2) + . "\$query->order('" + . $order_field_name . " " . $order_field['direction'] . "');"; + } + } + } + else + { + // default ordering is by publish and ordering + $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine( + __LINE__ + ) . " Order the results by ordering"; + $query .= PHP_EOL . $this->_t(2) + . "\$query->order('a.published ASC');"; + $query .= PHP_EOL . $this->_t(2) + . "\$query->order('a.ordering ASC');"; + } $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine( __LINE__ ) . " Load the items"; @@ -14044,7 +14101,7 @@ class Interpretation extends Fields . "\$pks = \$input->post->get('cid', array(), 'array');"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Sanitize the input"; - $method[] = $this->_t(3) . "JArrayHelper::toInteger(\$pks);"; + $method[] = $this->_t(3) . "ArrayHelper::toInteger(\$pks);"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " convert to string"; $method[] = $this->_t(3) . "\$ids = implode('_', \$pks);"; @@ -14211,11 +14268,40 @@ class Interpretation extends Fields . "\$query->where('a.access IN (' . \$groups . ')');"; $query .= PHP_EOL . $this->_t(3) . "}"; } - $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine( - __LINE__ - ) . " Order the results by ordering"; - $query .= PHP_EOL . $this->_t(3) - . "\$query->order('a.ordering ASC');"; + // add dynamic ordering (Exported data) + if (isset($this->viewsDefaultOrdering[$viewName_list]) + && $this->viewsDefaultOrdering[$viewName_list]['add_admin_ordering'] + == 1) + { + foreach ( + $this->viewsDefaultOrdering[$viewName_list]['admin_ordering_fields'] + as $order_field + ) + { + if (($order_field_name = $this->getFieldDatabaseName( + $viewName_list, $order_field['field'] + )) !== false) + { + $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" + . $this->setLine( + __LINE__ + ) . " Order the results by ordering"; + $query .= PHP_EOL . $this->_t(3) + . "\$query->order('" + . $order_field_name . " " + . $order_field['direction'] . "');"; + } + } + } + else + { + $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" + . $this->setLine( + __LINE__ + ) . " Order the results by ordering"; + $query .= PHP_EOL . $this->_t(3) + . "\$query->order('a.ordering ASC');"; + } $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine( __LINE__ ) . " Load the items"; @@ -14324,7 +14410,7 @@ class Interpretation extends Fields . "\$pks = \$input->post->get('cid', array(), 'array');"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Sanitize the input"; - $method[] = $this->_t(3) . "JArrayHelper::toInteger(\$pks);"; + $method[] = $this->_t(3) . "ArrayHelper::toInteger(\$pks);"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Get the model"; $method[] = $this->_t(3) . "\$model = \$this->getModel('" @@ -14715,7 +14801,7 @@ class Interpretation extends Fields . "elseif (is_array(\$categoryId))"; $query .= PHP_EOL . $this->_t(2) . "{"; $query .= PHP_EOL . $this->_t(3) - . "JArrayHelper::toInteger(\$categoryId);"; + . "ArrayHelper::toInteger(\$categoryId);"; $query .= PHP_EOL . $this->_t(3) . "\$categoryId = implode(',', \$categoryId);"; $query .= PHP_EOL . $this->_t(3) @@ -14723,24 +14809,127 @@ class Interpretation extends Fields $query .= PHP_EOL . $this->_t(2) . "}"; $query .= PHP_EOL; } - $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine( - __LINE__ - ) . " Add the list ordering clause."; - $query .= PHP_EOL . $this->_t(2) - . "\$orderCol = \$this->state->get('list.ordering', 'a.id');"; - $query .= PHP_EOL . $this->_t(2) - . "\$orderDirn = \$this->state->get('list.direction', 'asc'); "; - $query .= PHP_EOL . $this->_t(2) . "if (\$orderCol != '')"; - $query .= PHP_EOL . $this->_t(2) . "{"; - $query .= PHP_EOL . $this->_t(3) - . "\$query->order(\$db->escape(\$orderCol . ' ' . \$orderDirn));"; - $query .= PHP_EOL . $this->_t(2) . "}"; + // add dynamic ordering (Admin view) + if (isset($this->viewsDefaultOrdering[$viewName_list]) + && $this->viewsDefaultOrdering[$viewName_list]['add_admin_ordering'] + == 1) + { + // the first is from the state + $order_first = true; + foreach ( + $this->viewsDefaultOrdering[$viewName_list]['admin_ordering_fields'] + as $order_field + ) + { + if (($order_field_name = $this->getFieldDatabaseName( + $viewName_list, $order_field['field'] + )) !== false) + { + if ($order_first) + { + // just the first field is based on state + $order_first = false; + $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" + . $this->setLine( + __LINE__ + ) . " Add the list ordering clause."; + $query .= PHP_EOL . $this->_t(2) + . "\$orderCol = \$this->state->get('list.ordering', '" + . $order_field_name . "');"; + $query .= PHP_EOL . $this->_t(2) + . "\$orderDirn = \$this->state->get('list.direction', '" + . $order_field['direction'] . "');"; + $query .= PHP_EOL . $this->_t(2) + . "if (\$orderCol != '')"; + $query .= PHP_EOL . $this->_t(2) . "{"; + $query .= PHP_EOL . $this->_t(3) + . "\$query->order(\$db->escape(\$orderCol . ' ' . \$orderDirn));"; + $query .= PHP_EOL . $this->_t(2) . "}"; + } + else + { + $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" + . $this->setLine( + __LINE__ + ) . " Add a permanent list ordering."; + $query .= PHP_EOL . $this->_t(2) + . "\$query->order(\$db->escape('" + . $order_field_name . " " + . $order_field['direction'] . "'));"; + } + } + } + } + else + { + $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine( + __LINE__ + ) . " Add the list ordering clause."; + $query .= PHP_EOL . $this->_t(2) + . "\$orderCol = \$this->state->get('list.ordering', 'a.id');"; + $query .= PHP_EOL . $this->_t(2) + . "\$orderDirn = \$this->state->get('list.direction', 'asc');"; + $query .= PHP_EOL . $this->_t(2) . "if (\$orderCol != '')"; + $query .= PHP_EOL . $this->_t(2) . "{"; + $query .= PHP_EOL . $this->_t(3) + . "\$query->order(\$db->escape(\$orderCol . ' ' . \$orderDirn));"; + $query .= PHP_EOL . $this->_t(2) . "}"; + } $query .= PHP_EOL; $query .= PHP_EOL . $this->_t(2) . "return \$query;"; return $query; } + /** + * get the field database name and AS prefix + * + * @return string + * + */ + protected function getFieldDatabaseName($viewName_list, int $fieldId, $targetArea = 'listBuilder') + { + if (isset($this->{$targetArea}[$viewName_list])) + { + if ($fieldId < 0) + { + switch($fieldId) + { + case -1: + return 'a.id'; + case -2: + return 'a.ordering'; + case -3: + return 'a.published'; + } + } + foreach ($this->{$targetArea}[$viewName_list] 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($viewName_list) { if (isset($this->searchBuilder[$viewName_list]) @@ -16923,7 +17112,7 @@ class Interpretation extends Fields $fields[] = $this->_t(1) . " *"; $fields[] = $this->_t(1) . " * @since 3.0"; $fields[] = $this->_t(1) . " */"; - $fields[] = $this->_t(1) . "protected function getUniqeFields()"; + $fields[] = $this->_t(1) . "protected function getUniqueFields()"; $fields[] = $this->_t(1) . "{"; if (isset($this->dbUniqueKeys[$view]) && ComponentbuilderHelper::checkArray($this->dbUniqueKeys[$view])) @@ -17334,7 +17523,7 @@ class Interpretation extends Fields $allow[] = $this->_t(2) . "}"; } $allow[] = $this->_t(2) - . "\$categoryId = JArrayHelper::getValue(\$data, 'catid', \$this->input->getInt('filter_category_id'), 'int');"; + . "\$categoryId = ArrayHelper::getValue(\$data, 'catid', \$this->input->getInt('filter_category_id'), 'int');"; $allow[] = $this->_t(2) . "\$allow = null;"; $allow[] = PHP_EOL . $this->_t(2) . "if (\$categoryId)"; $allow[] = $this->_t(2) . "{"; @@ -18928,12 +19117,20 @@ class Interpretation extends Fields else { // check if custom field is set - /* if (ComponentbuilderHelper::checkArray($filter['custom'])) + if (ComponentbuilderHelper::checkArray( + $filter['custom'] + )) { - $fields .= ",".PHP_EOL.$this->_t(4) . "'".$filter['custom']['db'].".".$filter['custom']['text']."','".$filter['code']."_".$filter['custom']['text']."'"; - } */ - $fields .= "," . PHP_EOL . $this->_t(4) . "'a." - . $filter['code'] . "','" . $filter['code'] . "'"; + $fields .= "," . PHP_EOL . $this->_t(4) . "'" + . $filter['custom']['db'] . "." + . $filter['custom']['text'] . "'"; + } + else + { + $fields .= "," . PHP_EOL . $this->_t(4) . "'a." + . $filter['code'] . "','" . $filter['code'] + . "'"; + } } $donelist[] = $filter['code']; } @@ -19572,7 +19769,7 @@ class Interpretation extends Fields if ($filter['type'] === 'category') { $fields .= "," . PHP_EOL . $this->_t(3) - . "'c.category_title' => JText:" . ":_('" + . "'category_title' => JText:" . ":_('" . $filter['lang'] . "')"; } elseif (ComponentbuilderHelper::checkArray( diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 2bcfbc886..de38067e9 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -1035,8 +1035,8 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_LABEL="PHP getItems Method
getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -611,7 +613,7 @@ class ComponentbuilderModelAdmin_custom_tabs extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->admin_view) && !is_numeric($this->table->admin_view)) { - $this->table->admin_view = $this->generateUniqe('admin_view',$this->table->admin_view); + $this->table->admin_view = $this->generateUnique('admin_view',$this->table->admin_view); } // insert all set values @@ -626,12 +628,12 @@ class ComponentbuilderModelAdmin_custom_tabs extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -828,16 +830,16 @@ class ComponentbuilderModelAdmin_custom_tabs extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -850,7 +852,7 @@ class ComponentbuilderModelAdmin_custom_tabs extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -859,15 +861,15 @@ class ComponentbuilderModelAdmin_custom_tabs extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -889,7 +891,7 @@ class ComponentbuilderModelAdmin_custom_tabs extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/admin_fields.php b/admin/models/admin_fields.php index def31a2d6..821abede9 100644 --- a/admin/models/admin_fields.php +++ b/admin/models/admin_fields.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Admin_fields Model @@ -413,7 +415,7 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -472,7 +474,7 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -513,7 +515,7 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -580,8 +582,8 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -632,7 +634,7 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->admin_view) && !is_numeric($this->table->admin_view)) { - $this->table->admin_view = $this->generateUniqe('admin_view',$this->table->admin_view); + $this->table->admin_view = $this->generateUnique('admin_view',$this->table->admin_view); } // insert all set values @@ -647,12 +649,12 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -859,16 +861,16 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -881,7 +883,7 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -890,15 +892,15 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -920,7 +922,7 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/admin_fields_conditions.php b/admin/models/admin_fields_conditions.php index de6ca6c1d..082d0a4ee 100644 --- a/admin/models/admin_fields_conditions.php +++ b/admin/models/admin_fields_conditions.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Admin_fields_conditions Model @@ -413,7 +415,7 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -472,7 +474,7 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -513,7 +515,7 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -580,8 +582,8 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -632,7 +634,7 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->admin_view) && !is_numeric($this->table->admin_view)) { - $this->table->admin_view = $this->generateUniqe('admin_view',$this->table->admin_view); + $this->table->admin_view = $this->generateUnique('admin_view',$this->table->admin_view); } // insert all set values @@ -647,12 +649,12 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -849,16 +851,16 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -871,7 +873,7 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -880,15 +882,15 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -910,7 +912,7 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/admin_fields_relations.php b/admin/models/admin_fields_relations.php index ac3d8932c..8da06e303 100644 --- a/admin/models/admin_fields_relations.php +++ b/admin/models/admin_fields_relations.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Admin_fields_relations Model @@ -475,7 +477,7 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -534,7 +536,7 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -575,7 +577,7 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -642,8 +644,8 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -694,7 +696,7 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->admin_view) && !is_numeric($this->table->admin_view)) { - $this->table->admin_view = $this->generateUniqe('admin_view',$this->table->admin_view); + $this->table->admin_view = $this->generateUnique('admin_view',$this->table->admin_view); } // insert all set values @@ -709,12 +711,12 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -911,16 +913,16 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -933,7 +935,7 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -942,15 +944,15 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -972,7 +974,7 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index 0f668f3ec..eabebb88d 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Admin_view Model @@ -1009,9 +1011,9 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { - return false; + return array('guid'); } /** @@ -1112,7 +1114,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -1153,7 +1155,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -1220,8 +1222,8 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -1281,12 +1283,12 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1822,16 +1824,16 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1844,7 +1846,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1853,15 +1855,15 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index e3478f8f9..fbcea1e85 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Admin_views Model */ @@ -320,7 +322,7 @@ class ComponentbuilderModelAdmin_views extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'DESC'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -367,7 +369,7 @@ class ComponentbuilderModelAdmin_views extends JModelList } // Order the results by ordering - $query->order('a.ordering ASC'); + $query->order('a.id DESC'); // Load the items $db->setQuery($query); diff --git a/admin/models/admins_custom_tabs.php b/admin/models/admins_custom_tabs.php index afe56a835..73f5cec10 100644 --- a/admin/models/admins_custom_tabs.php +++ b/admin/models/admins_custom_tabs.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Admins_custom_tabs Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/admins_fields.php b/admin/models/admins_fields.php index 097c33ff5..b96924318 100644 --- a/admin/models/admins_fields.php +++ b/admin/models/admins_fields.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Admins_fields Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelAdmins_fields extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/admins_fields_conditions.php b/admin/models/admins_fields_conditions.php index 48f666999..1f2c190a4 100644 --- a/admin/models/admins_fields_conditions.php +++ b/admin/models/admins_fields_conditions.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Admins_fields_conditions Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/admins_fields_relations.php b/admin/models/admins_fields_relations.php index a6b614512..ae99144ae 100644 --- a/admin/models/admins_fields_relations.php +++ b/admin/models/admins_fields_relations.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Admins_fields_relations Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 3e9c99251..3a1c92c41 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Componentbuilder Ajax Model */ diff --git a/admin/models/class_extendings.php b/admin/models/class_extendings.php index 7ec02a47a..d8228daf9 100644 --- a/admin/models/class_extendings.php +++ b/admin/models/class_extendings.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Class_extendings Model */ @@ -218,7 +220,7 @@ class ComponentbuilderModelClass_extendings extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/class_extends.php b/admin/models/class_extends.php index c5ba73b71..7db99ecb3 100644 --- a/admin/models/class_extends.php +++ b/admin/models/class_extends.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Class_extends Model @@ -499,7 +501,7 @@ class ComponentbuilderModelClass_extends extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -558,7 +560,7 @@ class ComponentbuilderModelClass_extends extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -599,7 +601,7 @@ class ComponentbuilderModelClass_extends extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -666,8 +668,8 @@ class ComponentbuilderModelClass_extends extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -718,7 +720,7 @@ class ComponentbuilderModelClass_extends extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name)) { - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->name = $this->generateUnique('name',$this->table->name); } // insert all set values @@ -733,12 +735,12 @@ class ComponentbuilderModelClass_extends extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -937,16 +939,16 @@ class ComponentbuilderModelClass_extends extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -959,7 +961,7 @@ class ComponentbuilderModelClass_extends extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -968,15 +970,15 @@ class ComponentbuilderModelClass_extends extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -998,7 +1000,7 @@ class ComponentbuilderModelClass_extends extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/class_method.php b/admin/models/class_method.php index 0d5ddc038..a4efca20f 100644 --- a/admin/models/class_method.php +++ b/admin/models/class_method.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Class_method Model @@ -551,9 +553,9 @@ class ComponentbuilderModelClass_method extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { - return false; + return array('guid'); } /** @@ -610,7 +612,7 @@ class ComponentbuilderModelClass_method extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -651,7 +653,7 @@ class ComponentbuilderModelClass_method extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -718,8 +720,8 @@ class ComponentbuilderModelClass_method extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -770,7 +772,7 @@ class ComponentbuilderModelClass_method extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name)) { - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->name = $this->generateUnique('name',$this->table->name); } // insert all set values @@ -785,12 +787,12 @@ class ComponentbuilderModelClass_method extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1002,16 +1004,16 @@ class ComponentbuilderModelClass_method extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1024,7 +1026,7 @@ class ComponentbuilderModelClass_method extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1033,15 +1035,15 @@ class ComponentbuilderModelClass_method extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1063,7 +1065,7 @@ class ComponentbuilderModelClass_method extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/class_methods.php b/admin/models/class_methods.php index 644e362c2..27c645746 100644 --- a/admin/models/class_methods.php +++ b/admin/models/class_methods.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Class_methods Model */ @@ -247,7 +249,7 @@ class ComponentbuilderModelClass_methods extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/class_properties.php b/admin/models/class_properties.php index 1a831f946..9ad5aeb80 100644 --- a/admin/models/class_properties.php +++ b/admin/models/class_properties.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Class_properties Model */ @@ -247,7 +249,7 @@ class ComponentbuilderModelClass_properties extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/class_property.php b/admin/models/class_property.php index 5f6e09ac3..d3cc588c0 100644 --- a/admin/models/class_property.php +++ b/admin/models/class_property.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Class_property Model @@ -542,9 +544,9 @@ class ComponentbuilderModelClass_property extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { - return false; + return array('guid'); } /** @@ -601,7 +603,7 @@ class ComponentbuilderModelClass_property extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -642,7 +644,7 @@ class ComponentbuilderModelClass_property extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -709,8 +711,8 @@ class ComponentbuilderModelClass_property extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -761,7 +763,7 @@ class ComponentbuilderModelClass_property extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name)) { - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->name = $this->generateUnique('name',$this->table->name); } // insert all set values @@ -776,12 +778,12 @@ class ComponentbuilderModelClass_property extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -987,16 +989,16 @@ class ComponentbuilderModelClass_property extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1009,7 +1011,7 @@ class ComponentbuilderModelClass_property extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1018,15 +1020,15 @@ class ComponentbuilderModelClass_property extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1048,7 +1050,7 @@ class ComponentbuilderModelClass_property extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/compiler.php b/admin/models/compiler.php index 6e17ac163..6a8eaf311 100644 --- a/admin/models/compiler.php +++ b/admin/models/compiler.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Componentbuilder Model for Compiler */ diff --git a/admin/models/component_admin_views.php b/admin/models/component_admin_views.php index 448b175cf..dd831be06 100644 --- a/admin/models/component_admin_views.php +++ b/admin/models/component_admin_views.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Component_admin_views Model @@ -424,7 +426,7 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -483,7 +485,7 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -524,7 +526,7 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -591,8 +593,8 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -643,7 +645,7 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_component) && !is_numeric($this->table->joomla_component)) { - $this->table->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + $this->table->joomla_component = $this->generateUnique('joomla_component',$this->table->joomla_component); } // insert all set values @@ -658,12 +660,12 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -860,16 +862,16 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -882,7 +884,7 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -891,15 +893,15 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -921,7 +923,7 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/component_config.php b/admin/models/component_config.php index 3904a2a61..04299cecd 100644 --- a/admin/models/component_config.php +++ b/admin/models/component_config.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Component_config Model @@ -423,7 +425,7 @@ class ComponentbuilderModelComponent_config extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -482,7 +484,7 @@ class ComponentbuilderModelComponent_config extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -523,7 +525,7 @@ class ComponentbuilderModelComponent_config extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -590,8 +592,8 @@ class ComponentbuilderModelComponent_config extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -642,7 +644,7 @@ class ComponentbuilderModelComponent_config extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_component) && !is_numeric($this->table->joomla_component)) { - $this->table->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + $this->table->joomla_component = $this->generateUnique('joomla_component',$this->table->joomla_component); } // insert all set values @@ -657,12 +659,12 @@ class ComponentbuilderModelComponent_config extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -859,16 +861,16 @@ class ComponentbuilderModelComponent_config extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -881,7 +883,7 @@ class ComponentbuilderModelComponent_config extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -890,15 +892,15 @@ class ComponentbuilderModelComponent_config extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -920,7 +922,7 @@ class ComponentbuilderModelComponent_config extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/component_custom_admin_menus.php b/admin/models/component_custom_admin_menus.php index 05b9263a5..f8712d1a5 100644 --- a/admin/models/component_custom_admin_menus.php +++ b/admin/models/component_custom_admin_menus.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Component_custom_admin_menus Model @@ -423,7 +425,7 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -482,7 +484,7 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -523,7 +525,7 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -590,8 +592,8 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -642,7 +644,7 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_component) && !is_numeric($this->table->joomla_component)) { - $this->table->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + $this->table->joomla_component = $this->generateUnique('joomla_component',$this->table->joomla_component); } // insert all set values @@ -657,12 +659,12 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -859,16 +861,16 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -881,7 +883,7 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -890,15 +892,15 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -920,7 +922,7 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/component_custom_admin_views.php b/admin/models/component_custom_admin_views.php index 03ad3f649..3a8c06f90 100644 --- a/admin/models/component_custom_admin_views.php +++ b/admin/models/component_custom_admin_views.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Component_custom_admin_views Model @@ -424,7 +426,7 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -483,7 +485,7 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -524,7 +526,7 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -591,8 +593,8 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -643,7 +645,7 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_component) && !is_numeric($this->table->joomla_component)) { - $this->table->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + $this->table->joomla_component = $this->generateUnique('joomla_component',$this->table->joomla_component); } // insert all set values @@ -658,12 +660,12 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -860,16 +862,16 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -882,7 +884,7 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -891,15 +893,15 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -921,7 +923,7 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/component_dashboard.php b/admin/models/component_dashboard.php index 3aa128044..3865edd3a 100644 --- a/admin/models/component_dashboard.php +++ b/admin/models/component_dashboard.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Component_dashboard Model @@ -512,7 +514,7 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -571,7 +573,7 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -612,7 +614,7 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -679,8 +681,8 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -731,7 +733,7 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_component) && !is_numeric($this->table->joomla_component)) { - $this->table->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + $this->table->joomla_component = $this->generateUnique('joomla_component',$this->table->joomla_component); } // insert all set values @@ -746,12 +748,12 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -954,16 +956,16 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -976,7 +978,7 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -985,15 +987,15 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1015,7 +1017,7 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/component_files_folders.php b/admin/models/component_files_folders.php index 4e26b2e45..ab6ecaaf0 100644 --- a/admin/models/component_files_folders.php +++ b/admin/models/component_files_folders.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Component_files_folders Model @@ -460,7 +462,7 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -519,7 +521,7 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -560,7 +562,7 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -627,8 +629,8 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -679,7 +681,7 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_component) && !is_numeric($this->table->joomla_component)) { - $this->table->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + $this->table->joomla_component = $this->generateUnique('joomla_component',$this->table->joomla_component); } // insert all set values @@ -694,12 +696,12 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -935,16 +937,16 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -957,7 +959,7 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -966,15 +968,15 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -996,7 +998,7 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/component_modules.php b/admin/models/component_modules.php index d438c36f6..f4eddc292 100644 --- a/admin/models/component_modules.php +++ b/admin/models/component_modules.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Component_modules Model @@ -393,7 +395,7 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -452,7 +454,7 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -493,7 +495,7 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -560,8 +562,8 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -612,7 +614,7 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_component) && !is_numeric($this->table->joomla_component)) { - $this->table->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + $this->table->joomla_component = $this->generateUnique('joomla_component',$this->table->joomla_component); } // insert all set values @@ -627,12 +629,12 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -829,16 +831,16 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -851,7 +853,7 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -860,15 +862,15 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -890,7 +892,7 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/component_mysql_tweaks.php b/admin/models/component_mysql_tweaks.php index dfbd0fb01..d22df0214 100644 --- a/admin/models/component_mysql_tweaks.php +++ b/admin/models/component_mysql_tweaks.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Component_mysql_tweaks Model @@ -423,7 +425,7 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -482,7 +484,7 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -523,7 +525,7 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -590,8 +592,8 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -642,7 +644,7 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_component) && !is_numeric($this->table->joomla_component)) { - $this->table->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + $this->table->joomla_component = $this->generateUnique('joomla_component',$this->table->joomla_component); } // insert all set values @@ -657,12 +659,12 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -859,16 +861,16 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -881,7 +883,7 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -890,15 +892,15 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -920,7 +922,7 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/component_placeholders.php b/admin/models/component_placeholders.php index 02d277958..25d19ab67 100644 --- a/admin/models/component_placeholders.php +++ b/admin/models/component_placeholders.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Component_placeholders Model @@ -392,7 +394,7 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -451,7 +453,7 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -492,7 +494,7 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -559,8 +561,8 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -611,7 +613,7 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_component) && !is_numeric($this->table->joomla_component)) { - $this->table->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + $this->table->joomla_component = $this->generateUnique('joomla_component',$this->table->joomla_component); } // insert all set values @@ -626,12 +628,12 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -828,16 +830,16 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -850,7 +852,7 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -859,15 +861,15 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -889,7 +891,7 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/component_plugins.php b/admin/models/component_plugins.php index e6237ee55..bede27522 100644 --- a/admin/models/component_plugins.php +++ b/admin/models/component_plugins.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Component_plugins Model @@ -393,7 +395,7 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -452,7 +454,7 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -493,7 +495,7 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -560,8 +562,8 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -612,7 +614,7 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_component) && !is_numeric($this->table->joomla_component)) { - $this->table->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + $this->table->joomla_component = $this->generateUnique('joomla_component',$this->table->joomla_component); } // insert all set values @@ -627,12 +629,12 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -829,16 +831,16 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -851,7 +853,7 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -860,15 +862,15 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -890,7 +892,7 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/component_site_views.php b/admin/models/component_site_views.php index afd84e9a2..78df71326 100644 --- a/admin/models/component_site_views.php +++ b/admin/models/component_site_views.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Component_site_views Model @@ -424,7 +426,7 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -483,7 +485,7 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -524,7 +526,7 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -591,8 +593,8 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -643,7 +645,7 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_component) && !is_numeric($this->table->joomla_component)) { - $this->table->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + $this->table->joomla_component = $this->generateUnique('joomla_component',$this->table->joomla_component); } // insert all set values @@ -658,12 +660,12 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -860,16 +862,16 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -882,7 +884,7 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -891,15 +893,15 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -921,7 +923,7 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/component_updates.php b/admin/models/component_updates.php index 7aeea9561..9464b3fe6 100644 --- a/admin/models/component_updates.php +++ b/admin/models/component_updates.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Component_updates Model @@ -423,7 +425,7 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -482,7 +484,7 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -523,7 +525,7 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -590,8 +592,8 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -642,7 +644,7 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_component) && !is_numeric($this->table->joomla_component)) { - $this->table->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + $this->table->joomla_component = $this->generateUnique('joomla_component',$this->table->joomla_component); } // insert all set values @@ -657,12 +659,12 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -859,16 +861,16 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -881,7 +883,7 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -890,15 +892,15 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -920,7 +922,7 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/components_admin_views.php b/admin/models/components_admin_views.php index a4117f226..247f542f1 100644 --- a/admin/models/components_admin_views.php +++ b/admin/models/components_admin_views.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Components_admin_views Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelComponents_admin_views extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/components_config.php b/admin/models/components_config.php index fcffec379..4a479bae5 100644 --- a/admin/models/components_config.php +++ b/admin/models/components_config.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Components_config Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelComponents_config extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/components_custom_admin_menus.php b/admin/models/components_custom_admin_menus.php index 6565660d3..e9e75e5eb 100644 --- a/admin/models/components_custom_admin_menus.php +++ b/admin/models/components_custom_admin_menus.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Components_custom_admin_menus Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/components_custom_admin_views.php b/admin/models/components_custom_admin_views.php index 0c6812188..86585c3fc 100644 --- a/admin/models/components_custom_admin_views.php +++ b/admin/models/components_custom_admin_views.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Components_custom_admin_views Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/components_dashboard.php b/admin/models/components_dashboard.php index fe5415182..e4596d1f8 100644 --- a/admin/models/components_dashboard.php +++ b/admin/models/components_dashboard.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Components_dashboard Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelComponents_dashboard extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/components_files_folders.php b/admin/models/components_files_folders.php index a3c7c3106..eba543d17 100644 --- a/admin/models/components_files_folders.php +++ b/admin/models/components_files_folders.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Components_files_folders Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelComponents_files_folders extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/components_modules.php b/admin/models/components_modules.php index aa8462d15..17ada308f 100644 --- a/admin/models/components_modules.php +++ b/admin/models/components_modules.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Components_modules Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelComponents_modules extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/components_mysql_tweaks.php b/admin/models/components_mysql_tweaks.php index c255b32e7..8c7fd829c 100644 --- a/admin/models/components_mysql_tweaks.php +++ b/admin/models/components_mysql_tweaks.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Components_mysql_tweaks Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/components_placeholders.php b/admin/models/components_placeholders.php index 000bb4d90..133ab63bf 100644 --- a/admin/models/components_placeholders.php +++ b/admin/models/components_placeholders.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Components_placeholders Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelComponents_placeholders extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/components_plugins.php b/admin/models/components_plugins.php index 664e90b19..c8b66d814 100644 --- a/admin/models/components_plugins.php +++ b/admin/models/components_plugins.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Components_plugins Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelComponents_plugins extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/components_site_views.php b/admin/models/components_site_views.php index ee748f0cb..5b7a83804 100644 --- a/admin/models/components_site_views.php +++ b/admin/models/components_site_views.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Components_site_views Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelComponents_site_views extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/components_updates.php b/admin/models/components_updates.php index 60fca40aa..407655642 100644 --- a/admin/models/components_updates.php +++ b/admin/models/components_updates.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Components_updates Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelComponents_updates extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/custom_admin_view.php b/admin/models/custom_admin_view.php index 0d1790bae..38a47565b 100644 --- a/admin/models/custom_admin_view.php +++ b/admin/models/custom_admin_view.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Custom_admin_view Model @@ -679,9 +681,9 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { - return false; + return array('guid'); } /** @@ -738,7 +740,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -779,7 +781,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -846,8 +848,8 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -898,7 +900,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name)) { - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->name = $this->generateUnique('name',$this->table->name); } // insert all set values @@ -913,12 +915,12 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1261,16 +1263,16 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1283,7 +1285,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1292,15 +1294,15 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1322,7 +1324,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/custom_admin_views.php b/admin/models/custom_admin_views.php index 1a62b8e30..ffe5996bd 100644 --- a/admin/models/custom_admin_views.php +++ b/admin/models/custom_admin_views.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Custom_admin_views Model */ @@ -30,7 +32,7 @@ class ComponentbuilderModelCustom_admin_views extends JModelList 'a.system_name','system_name', 'a.name','name', 'a.description','description', - 'a.main_get','main_get', + 'g.name', 'a.add_php_ajax','add_php_ajax', 'a.add_custom_button','add_custom_button' ); @@ -261,7 +263,7 @@ class ComponentbuilderModelCustom_admin_views extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'DESC'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -308,7 +310,7 @@ class ComponentbuilderModelCustom_admin_views extends JModelList } // Order the results by ordering - $query->order('a.ordering ASC'); + $query->order('a.id DESC'); // Load the items $db->setQuery($query); diff --git a/admin/models/custom_code.php b/admin/models/custom_code.php index e0880dc9d..52003c0e3 100644 --- a/admin/models/custom_code.php +++ b/admin/models/custom_code.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Custom_code Model @@ -544,7 +546,7 @@ class ComponentbuilderModelCustom_code extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -603,7 +605,7 @@ class ComponentbuilderModelCustom_code extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -644,7 +646,7 @@ class ComponentbuilderModelCustom_code extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -711,8 +713,8 @@ class ComponentbuilderModelCustom_code extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -763,7 +765,7 @@ class ComponentbuilderModelCustom_code extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->component) && !is_numeric($this->table->component)) { - $this->table->component = $this->generateUniqe('component',$this->table->component); + $this->table->component = $this->generateUnique('component',$this->table->component); } // insert all set values @@ -778,12 +780,12 @@ class ComponentbuilderModelCustom_code extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1008,16 +1010,16 @@ class ComponentbuilderModelCustom_code extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1030,7 +1032,7 @@ class ComponentbuilderModelCustom_code extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1039,15 +1041,15 @@ class ComponentbuilderModelCustom_code extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1069,7 +1071,7 @@ class ComponentbuilderModelCustom_code extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/custom_codes.php b/admin/models/custom_codes.php index 3872d3f55..abff27a4c 100644 --- a/admin/models/custom_codes.php +++ b/admin/models/custom_codes.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Custom_codes Model */ @@ -27,7 +29,7 @@ class ComponentbuilderModelCustom_codes extends JModelList 'a.ordering','ordering', 'a.created_by','created_by', 'a.modified_by','modified_by', - 'a.component','component', + 'g.system_name', 'a.path','path', 'a.target','target', 'a.type','type', @@ -294,7 +296,7 @@ class ComponentbuilderModelCustom_codes extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'DESC'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -341,7 +343,7 @@ class ComponentbuilderModelCustom_codes extends JModelList } // Order the results by ordering - $query->order('a.ordering ASC'); + $query->order('a.id DESC'); // Load the items $db->setQuery($query); diff --git a/admin/models/dynamic_get.php b/admin/models/dynamic_get.php index dbb3dfdd2..7212d02f1 100644 --- a/admin/models/dynamic_get.php +++ b/admin/models/dynamic_get.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Dynamic_get Model @@ -729,9 +731,9 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { - return false; + return array('guid'); } /** @@ -788,7 +790,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -829,7 +831,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -896,8 +898,8 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -948,7 +950,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name)) { - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->name = $this->generateUnique('name',$this->table->name); } // insert all set values @@ -963,12 +965,12 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1305,16 +1307,16 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1327,7 +1329,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1336,15 +1338,15 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1366,7 +1368,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/dynamic_gets.php b/admin/models/dynamic_gets.php index 1b19cea92..178559d1f 100644 --- a/admin/models/dynamic_gets.php +++ b/admin/models/dynamic_gets.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Dynamic_gets Model */ @@ -244,7 +246,7 @@ class ComponentbuilderModelDynamic_gets extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'DESC'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -291,7 +293,7 @@ class ComponentbuilderModelDynamic_gets extends JModelList } // Order the results by ordering - $query->order('a.ordering ASC'); + $query->order('a.id DESC'); // Load the items $db->setQuery($query); diff --git a/admin/models/field.php b/admin/models/field.php index 071df1f8c..a100c9e6d 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Field Model @@ -628,9 +630,9 @@ class ComponentbuilderModelField extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { - return false; + return array('guid'); } /** @@ -687,7 +689,7 @@ class ComponentbuilderModelField extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -728,7 +730,7 @@ class ComponentbuilderModelField extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -795,8 +797,8 @@ class ComponentbuilderModelField extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -871,12 +873,12 @@ class ComponentbuilderModelField extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1210,16 +1212,16 @@ class ComponentbuilderModelField extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1232,7 +1234,7 @@ class ComponentbuilderModelField extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1241,15 +1243,15 @@ class ComponentbuilderModelField extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1271,7 +1273,7 @@ class ComponentbuilderModelField extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/fields.php b/admin/models/fields.php index bddca0ecd..67ef89191 100644 --- a/admin/models/fields.php +++ b/admin/models/fields.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Fields Model */ @@ -28,7 +30,7 @@ class ComponentbuilderModelFields extends JModelList 'a.created_by','created_by', 'a.modified_by','modified_by', 'a.name','name', - 'a.fieldtype','fieldtype', + 'g.name', 'a.datatype','datatype', 'a.indexes','indexes', 'a.null_switch','null_switch', @@ -352,7 +354,7 @@ class ComponentbuilderModelFields extends JModelList } elseif (is_array($categoryId)) { - JArrayHelper::toInteger($categoryId); + ArrayHelper::toInteger($categoryId); $categoryId = implode(',', $categoryId); $query->where('a.category IN (' . $categoryId . ')'); } @@ -360,7 +362,7 @@ class ComponentbuilderModelFields extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'DESC'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -407,7 +409,7 @@ class ComponentbuilderModelFields extends JModelList } // Order the results by ordering - $query->order('a.ordering ASC'); + $query->order('a.id DESC'); // Load the items $db->setQuery($query); diff --git a/admin/models/fields/libconfigfield.php b/admin/models/fields/libconfigfield.php index a805d8292..153ae6930 100644 --- a/admin/models/fields/libconfigfield.php +++ b/admin/models/fields/libconfigfield.php @@ -35,7 +35,7 @@ class JFormFieldLibconfigfield extends JFormFieldList */ protected function getOptions() { - // load the db opbject + // load the db object $db = JFactory::getDBO(); // get the input from url $jinput = JFactory::getApplication()->input; diff --git a/admin/models/fields/listfields.php b/admin/models/fields/listfields.php index bd162f332..35f358d3f 100644 --- a/admin/models/fields/listfields.php +++ b/admin/models/fields/listfields.php @@ -77,8 +77,9 @@ class JFormFieldListfields extends JFormFieldList if (ComponentbuilderHelper::checkArray($fieldIds)) { $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.id','a.name'),array('id','name'))); + $query->select($db->quoteName(array('a.id','a.name', 'a.xml', 'b.name'),array('id','name', 'xml', 'type'))); $query->from($db->quoteName('#__componentbuilder_field', 'a')); + $query->join('LEFT', '#__componentbuilder_fieldtype AS b ON b.id = a.fieldtype'); $query->where($db->quoteName('a.published') . ' >= 1'); // only load these fields $query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')'); @@ -91,7 +92,9 @@ class JFormFieldListfields extends JFormFieldList $options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION')); foreach($items as $item) { - $options[] = JHtml::_('select.option', $item->id, $item->name); + // get the field name (TODO this could slow down the system so we will need to improve on this) + $field_name = ComponentbuilderHelper::safeFieldName(ComponentbuilderHelper::getBetween(json_decode($item->xml),'name="','"')); + $options[] = JHtml::_('select.option', $item->id, $item->name . ' [ ' . $field_name . ' - ' . $item->type . ' ]'); } } return $options; diff --git a/admin/models/fields/matchfield.php b/admin/models/fields/matchfield.php index b945dc356..99d3dc06f 100644 --- a/admin/models/fields/matchfield.php +++ b/admin/models/fields/matchfield.php @@ -75,8 +75,9 @@ class JFormFieldMatchfield extends JFormFieldList } } $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.id','a.name'),array('id','name'))); + $query->select($db->quoteName(array('a.id','a.name','t.name'),array('id','name','type'))); $query->from($db->quoteName('#__componentbuilder_field', 'a')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 't') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('t.id') . ')'); $query->where($db->quoteName('a.published') . ' >= 1'); // filter by fields linked if (ComponentbuilderHelper::checkArray($fieldIds)) @@ -93,10 +94,10 @@ class JFormFieldMatchfield extends JFormFieldList $options[] = JHtml::_('select.option', '', 'Select an option'); foreach($items as $item) { - $options[] = JHtml::_('select.option', $item->id, $item->name); + $options[] = JHtml::_('select.option', $item->id, $item->name . ' [' . $item->type . ']'); } } - + return $options; } } diff --git a/admin/models/fields/targetfields.php b/admin/models/fields/targetfields.php index f49b38b5b..4829ca190 100644 --- a/admin/models/fields/targetfields.php +++ b/admin/models/fields/targetfields.php @@ -82,8 +82,9 @@ class JFormFieldTargetfields extends JFormFieldList } } $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.id','a.name'),array('id','name'))); + $query->select($db->quoteName(array('a.id','a.name','t.name'),array('id','name','type'))); $query->from($db->quoteName('#__componentbuilder_field', 'a')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 't') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('t.id') . ')'); $query->where($db->quoteName('a.published') . ' >= 1'); // filter by fields linked if (ComponentbuilderHelper::checkArray($fieldIds)) @@ -99,7 +100,7 @@ class JFormFieldTargetfields extends JFormFieldList { foreach($items as $item) { - $options[] = JHtml::_('select.option', $item->id, $item->name); + $options[] = JHtml::_('select.option', $item->id, $item->name . ' [' . $item->type . ']'); } } diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index ed1e8c91a..b3405fc28 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Fieldtype Model @@ -753,9 +755,9 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { - return false; + return array('guid'); } /** @@ -812,7 +814,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -853,7 +855,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -920,8 +922,8 @@ class ComponentbuilderModelFieldtype extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -996,12 +998,12 @@ class ComponentbuilderModelFieldtype extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1222,16 +1224,16 @@ class ComponentbuilderModelFieldtype extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1244,7 +1246,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1253,15 +1255,15 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1283,7 +1285,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/fieldtypes.php b/admin/models/fieldtypes.php index b42d2a169..399098cce 100644 --- a/admin/models/fieldtypes.php +++ b/admin/models/fieldtypes.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Fieldtypes Model */ @@ -205,7 +207,7 @@ class ComponentbuilderModelFieldtypes extends JModelList } elseif (is_array($categoryId)) { - JArrayHelper::toInteger($categoryId); + ArrayHelper::toInteger($categoryId); $categoryId = implode(',', $categoryId); $query->where('a.category IN (' . $categoryId . ')'); } @@ -213,7 +215,7 @@ class ComponentbuilderModelFieldtypes extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/forms/admin_fields_conditions.xml b/admin/models/forms/admin_fields_conditions.xml index 44257b742..ec148c220 100644 --- a/admin/models/forms/admin_fields_conditions.xml +++ b/admin/models/forms/admin_fields_conditions.xml @@ -103,7 +103,7 @@ type="subform" name="addconditions" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="joomla.form.field.subform.repeatable" multiple="true" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS_DESCRIPTION" default="" @@ -115,7 +115,7 @@ name="target_field" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_FIELD_LABEL" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_FIELD_DESCRIPTION" - class="fieldMedium" + class="fieldLarge" multiple="true" default="" required="true" @@ -127,7 +127,7 @@ name="target_behavior" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_BEHAVIOR_LABEL" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_BEHAVIOR_DESCRIPTION" - class="list_class" + class="list_class fieldLarge" multiple="false" filter="INT" required="true" @@ -148,7 +148,7 @@ name="target_relation" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_RELATION_LABEL" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_RELATION_DESCRIPTION" - class="list_class" + class="list_class fieldLarge" multiple="false" filter="INT" required="true" @@ -165,8 +165,8 @@ name="match_field" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MATCH_FIELD_LABEL" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MATCH_FIELD_DESCRIPTION" + class="fieldLarge" multiple="false" - default="" required="true" button="false" /> @@ -176,7 +176,7 @@ name="match_behavior" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MATCH_BEHAVIOR_LABEL" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MATCH_BEHAVIOR_DESCRIPTION" - class="list_class" + class="list_class fieldLarge" multiple="false" filter="INT" required="true" diff --git a/admin/models/forms/admin_fields_relations.xml b/admin/models/forms/admin_fields_relations.xml index d73858694..46d660b6c 100644 --- a/admin/models/forms/admin_fields_relations.xml +++ b/admin/models/forms/admin_fields_relations.xml @@ -103,7 +103,7 @@ type="subform" name="addrelations" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ADDRELATIONS_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="joomla.form.field.subform.repeatable" multiple="true" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ADDRELATIONS_DESCRIPTION" default="" @@ -115,7 +115,7 @@ name="listfield" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_LISTFIELD_LABEL" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_LISTFIELD_DESCRIPTION" - class="fieldMedium" + class="fieldLarge" multiple="false" default="" required="true" @@ -130,7 +130,7 @@ size="50" maxlength="50" default="Default" - class="text_area" + class="text_area fieldLarge" filter="STRING" message="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_COLUMN_NAME_MESSAGE" hint="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_COLUMN_NAME_HINT" @@ -142,9 +142,8 @@ name="joinfields" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_JOINFIELDS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_JOINFIELDS_DESCRIPTION" - class="fieldMedium" + class="fieldLarge" multiple="true" - default="" onchange="getCodeGlueOptions(this)" button="false" /> @@ -153,7 +152,7 @@ type="list" name="area" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_AREA_LABEL" - class="list_class" + class="list_class fieldLarge" multiple="false" validate="int" default="1" @@ -171,7 +170,7 @@ type="list" name="join_type" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_JOIN_TYPE_LABEL" - class="list_class" + class="list_class fieldLarge" multiple="false" validate="int" default="1" diff --git a/admin/models/forms/dynamic_get.xml b/admin/models/forms/dynamic_get.xml index 45d7fd914..19fc6f35b 100644 --- a/admin/models/forms/dynamic_get.xml +++ b/admin/models/forms/dynamic_get.xml @@ -455,7 +455,7 @@ size="40" maxlength="150" description="COM_COMPONENTBUILDER_DYNAMIC_GET_JOIN_FIELD_DESCRIPTION" - class="text_area fieldMedium" + class="text_area fieldLarge" readonly="false" disabled="false" required="true" @@ -954,8 +954,7 @@ class="list_class" multiple="false" filter="WORD" - required="true" - default=""> + required="true"> @@ -1431,7 +1430,7 @@ size="40" maxlength="150" description="COM_COMPONENTBUILDER_DYNAMIC_GET_JOIN_FIELD_DESCRIPTION" - class="text_area fieldMedium" + class="text_area fieldLarge" readonly="false" disabled="false" required="true" diff --git a/admin/models/forms/library.xml b/admin/models/forms/library.xml index 028c7002b..4c62c844f 100644 --- a/admin/models/forms/library.xml +++ b/admin/models/forms/library.xml @@ -209,7 +209,7 @@ type="subform" name="addconditions" label="COM_COMPONENTBUILDER_LIBRARY_ADDCONDITIONS_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="joomla.form.field.subform.repeatable" multiple="true" description="COM_COMPONENTBUILDER_LIBRARY_ADDCONDITIONS_DESCRIPTION" default="" @@ -221,7 +221,7 @@ name="file" label="COM_COMPONENTBUILDER_LIBRARY_FILE_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_FILE_DESCRIPTION" - class="list_class" + class="list_class fieldLarge" multiple="true" default="0" required="true" @@ -233,7 +233,7 @@ name="target_behavior" label="COM_COMPONENTBUILDER_LIBRARY_TARGET_BEHAVIOR_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_TARGET_BEHAVIOR_DESCRIPTION" - class="list_class" + class="list_class fieldLarge" multiple="false" filter="INT" required="true" @@ -250,7 +250,7 @@ name="target_relation" label="COM_COMPONENTBUILDER_LIBRARY_TARGET_RELATION_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_TARGET_RELATION_DESCRIPTION" - class="list_class" + class="list_class fieldLarge" multiple="false" filter="INT" required="true" @@ -267,6 +267,7 @@ name="option_field" label="COM_COMPONENTBUILDER_LIBRARY_OPTION_FIELD_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_OPTION_FIELD_DESCRIPTION" + class="list_class fieldLarge" multiple="false" required="true" button="false" @@ -277,7 +278,7 @@ name="option_behaviour" label="COM_COMPONENTBUILDER_LIBRARY_OPTION_BEHAVIOUR_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_OPTION_BEHAVIOUR_DESCRIPTION" - class="list_class" + class="list_class fieldLarge" multiple="false" filter="INT" required="true" diff --git a/admin/models/get_snippets.php b/admin/models/get_snippets.php index f92926be9..3fa6e46e8 100644 --- a/admin/models/get_snippets.php +++ b/admin/models/get_snippets.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Componentbuilder Model for Get_snippets */ diff --git a/admin/models/help_document.php b/admin/models/help_document.php index ded42e348..5edbacd75 100644 --- a/admin/models/help_document.php +++ b/admin/models/help_document.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Help_document Model @@ -440,7 +442,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -499,7 +501,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -540,7 +542,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -607,8 +609,8 @@ class ComponentbuilderModelHelp_document extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -669,12 +671,12 @@ class ComponentbuilderModelHelp_document extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -917,16 +919,16 @@ class ComponentbuilderModelHelp_document extends JModelAdmin } } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -939,7 +941,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -948,15 +950,15 @@ class ComponentbuilderModelHelp_document extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -984,15 +986,15 @@ class ComponentbuilderModelHelp_document extends JModelAdmin { foreach($title as $nr => &$_title) { - $_title = JString::increment($_title); + $_title = StringHelper::increment($_title); } } // Make sure we have a title elseif ($title) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } - $alias = JString::increment($alias, 'dash'); + $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles if (ComponentbuilderHelper::checkArray($title)) diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php index 97b16a1f3..4587f36f0 100644 --- a/admin/models/help_documents.php +++ b/admin/models/help_documents.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Help_documents Model */ @@ -30,8 +32,8 @@ class ComponentbuilderModelHelp_documents extends JModelList 'a.title','title', 'a.type','type', 'a.location','location', - 'a.admin_view','admin_view', - 'a.site_view','site_view' + 'g.', + 'h.' ); } @@ -256,7 +258,7 @@ class ComponentbuilderModelHelp_documents extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index 59a4b6bae..18ea494ae 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Joomla_component Model @@ -903,9 +905,9 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { - return false; + return array('guid'); } /** @@ -1020,7 +1022,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -1061,7 +1063,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -1128,8 +1130,8 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -1180,7 +1182,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->system_name) && !is_numeric($this->table->system_name)) { - $this->table->system_name = $this->generateUniqe('system_name',$this->table->system_name); + $this->table->system_name = $this->generateUnique('system_name',$this->table->system_name); } // insert all set values @@ -1195,12 +1197,12 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1553,16 +1555,16 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1575,7 +1577,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1584,15 +1586,15 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1614,7 +1616,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index 486333733..a0f861f07 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Joomla_components Model */ @@ -2230,7 +2232,7 @@ class ComponentbuilderModelJoomla_components extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'DESC'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -2277,7 +2279,7 @@ class ComponentbuilderModelJoomla_components extends JModelList } // Order the results by ordering - $query->order('a.ordering ASC'); + $query->order('a.id DESC'); // Load the items $db->setQuery($query); diff --git a/admin/models/joomla_module.php b/admin/models/joomla_module.php index a513031ff..9940fa9d2 100644 --- a/admin/models/joomla_module.php +++ b/admin/models/joomla_module.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Joomla_module Model @@ -723,9 +725,9 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { - return false; + return array('guid'); } /** @@ -826,7 +828,7 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -867,7 +869,7 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -934,8 +936,8 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -986,7 +988,7 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->system_name) && !is_numeric($this->table->system_name)) { - $this->table->system_name = $this->generateUniqe('system_name',$this->table->system_name); + $this->table->system_name = $this->generateUnique('system_name',$this->table->system_name); } // insert all set values @@ -1001,12 +1003,12 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1334,16 +1336,16 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1356,7 +1358,7 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1365,15 +1367,15 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1395,7 +1397,7 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/joomla_module_files_folders_urls.php b/admin/models/joomla_module_files_folders_urls.php index e7d9b5e57..bf5900f23 100644 --- a/admin/models/joomla_module_files_folders_urls.php +++ b/admin/models/joomla_module_files_folders_urls.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Joomla_module_files_folders_urls Model @@ -438,7 +440,7 @@ class ComponentbuilderModelJoomla_module_files_folders_urls extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -497,7 +499,7 @@ class ComponentbuilderModelJoomla_module_files_folders_urls extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -538,7 +540,7 @@ class ComponentbuilderModelJoomla_module_files_folders_urls extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -605,8 +607,8 @@ class ComponentbuilderModelJoomla_module_files_folders_urls extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -657,7 +659,7 @@ class ComponentbuilderModelJoomla_module_files_folders_urls extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_module) && !is_numeric($this->table->joomla_module)) { - $this->table->joomla_module = $this->generateUniqe('joomla_module',$this->table->joomla_module); + $this->table->joomla_module = $this->generateUnique('joomla_module',$this->table->joomla_module); } // insert all set values @@ -672,12 +674,12 @@ class ComponentbuilderModelJoomla_module_files_folders_urls extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -926,16 +928,16 @@ class ComponentbuilderModelJoomla_module_files_folders_urls extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -948,7 +950,7 @@ class ComponentbuilderModelJoomla_module_files_folders_urls extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -957,15 +959,15 @@ class ComponentbuilderModelJoomla_module_files_folders_urls extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -987,7 +989,7 @@ class ComponentbuilderModelJoomla_module_files_folders_urls extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/joomla_module_updates.php b/admin/models/joomla_module_updates.php index eeeadb6f4..5017694b2 100644 --- a/admin/models/joomla_module_updates.php +++ b/admin/models/joomla_module_updates.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Joomla_module_updates Model @@ -392,7 +394,7 @@ class ComponentbuilderModelJoomla_module_updates extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -451,7 +453,7 @@ class ComponentbuilderModelJoomla_module_updates extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -492,7 +494,7 @@ class ComponentbuilderModelJoomla_module_updates extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -559,8 +561,8 @@ class ComponentbuilderModelJoomla_module_updates extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -611,7 +613,7 @@ class ComponentbuilderModelJoomla_module_updates extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_module) && !is_numeric($this->table->joomla_module)) { - $this->table->joomla_module = $this->generateUniqe('joomla_module',$this->table->joomla_module); + $this->table->joomla_module = $this->generateUnique('joomla_module',$this->table->joomla_module); } // insert all set values @@ -626,12 +628,12 @@ class ComponentbuilderModelJoomla_module_updates extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -828,16 +830,16 @@ class ComponentbuilderModelJoomla_module_updates extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -850,7 +852,7 @@ class ComponentbuilderModelJoomla_module_updates extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -859,15 +861,15 @@ class ComponentbuilderModelJoomla_module_updates extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -889,7 +891,7 @@ class ComponentbuilderModelJoomla_module_updates extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/joomla_modules.php b/admin/models/joomla_modules.php index c2c550c10..cc77909a1 100644 --- a/admin/models/joomla_modules.php +++ b/admin/models/joomla_modules.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Joomla_modules Model */ @@ -220,7 +222,7 @@ class ComponentbuilderModelJoomla_modules extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'DESC'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/joomla_modules_files_folders_urls.php b/admin/models/joomla_modules_files_folders_urls.php index 05b144b2b..346ec7db3 100644 --- a/admin/models/joomla_modules_files_folders_urls.php +++ b/admin/models/joomla_modules_files_folders_urls.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Joomla_modules_files_folders_urls Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelJoomla_modules_files_folders_urls extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/joomla_modules_updates.php b/admin/models/joomla_modules_updates.php index e2a558619..1550f283f 100644 --- a/admin/models/joomla_modules_updates.php +++ b/admin/models/joomla_modules_updates.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Joomla_modules_updates Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelJoomla_modules_updates extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/joomla_plugin.php b/admin/models/joomla_plugin.php index 00c3f36e2..108086112 100644 --- a/admin/models/joomla_plugin.php +++ b/admin/models/joomla_plugin.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Joomla_plugin Model @@ -688,9 +690,9 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { - return false; + return array('guid'); } /** @@ -791,7 +793,7 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -832,7 +834,7 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -899,8 +901,8 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -951,7 +953,7 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->system_name) && !is_numeric($this->table->system_name)) { - $this->table->system_name = $this->generateUniqe('system_name',$this->table->system_name); + $this->table->system_name = $this->generateUnique('system_name',$this->table->system_name); } // insert all set values @@ -966,12 +968,12 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1285,16 +1287,16 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1307,7 +1309,7 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1316,15 +1318,15 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1346,7 +1348,7 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/joomla_plugin_files_folders_urls.php b/admin/models/joomla_plugin_files_folders_urls.php index 13f20f23c..604979e99 100644 --- a/admin/models/joomla_plugin_files_folders_urls.php +++ b/admin/models/joomla_plugin_files_folders_urls.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Joomla_plugin_files_folders_urls Model @@ -438,7 +440,7 @@ class ComponentbuilderModelJoomla_plugin_files_folders_urls extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -497,7 +499,7 @@ class ComponentbuilderModelJoomla_plugin_files_folders_urls extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -538,7 +540,7 @@ class ComponentbuilderModelJoomla_plugin_files_folders_urls extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -605,8 +607,8 @@ class ComponentbuilderModelJoomla_plugin_files_folders_urls extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -657,7 +659,7 @@ class ComponentbuilderModelJoomla_plugin_files_folders_urls extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_plugin) && !is_numeric($this->table->joomla_plugin)) { - $this->table->joomla_plugin = $this->generateUniqe('joomla_plugin',$this->table->joomla_plugin); + $this->table->joomla_plugin = $this->generateUnique('joomla_plugin',$this->table->joomla_plugin); } // insert all set values @@ -672,12 +674,12 @@ class ComponentbuilderModelJoomla_plugin_files_folders_urls extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -926,16 +928,16 @@ class ComponentbuilderModelJoomla_plugin_files_folders_urls extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -948,7 +950,7 @@ class ComponentbuilderModelJoomla_plugin_files_folders_urls extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -957,15 +959,15 @@ class ComponentbuilderModelJoomla_plugin_files_folders_urls extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -987,7 +989,7 @@ class ComponentbuilderModelJoomla_plugin_files_folders_urls extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/joomla_plugin_group.php b/admin/models/joomla_plugin_group.php index 72b4f83ea..073e0d5b0 100644 --- a/admin/models/joomla_plugin_group.php +++ b/admin/models/joomla_plugin_group.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Joomla_plugin_group Model @@ -381,7 +383,7 @@ class ComponentbuilderModelJoomla_plugin_group extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -440,7 +442,7 @@ class ComponentbuilderModelJoomla_plugin_group extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -481,7 +483,7 @@ class ComponentbuilderModelJoomla_plugin_group extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -548,8 +550,8 @@ class ComponentbuilderModelJoomla_plugin_group extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -600,7 +602,7 @@ class ComponentbuilderModelJoomla_plugin_group extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name)) { - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->name = $this->generateUnique('name',$this->table->name); } // insert all set values @@ -615,12 +617,12 @@ class ComponentbuilderModelJoomla_plugin_group extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -807,16 +809,16 @@ class ComponentbuilderModelJoomla_plugin_group extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -829,7 +831,7 @@ class ComponentbuilderModelJoomla_plugin_group extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -838,15 +840,15 @@ class ComponentbuilderModelJoomla_plugin_group extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -868,7 +870,7 @@ class ComponentbuilderModelJoomla_plugin_group extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/joomla_plugin_groups.php b/admin/models/joomla_plugin_groups.php index 180c3dca9..2b76a3316 100644 --- a/admin/models/joomla_plugin_groups.php +++ b/admin/models/joomla_plugin_groups.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Joomla_plugin_groups Model */ @@ -28,7 +30,7 @@ class ComponentbuilderModelJoomla_plugin_groups extends JModelList 'a.created_by','created_by', 'a.modified_by','modified_by', 'a.name','name', - 'a.class_extends','class_extends' + 'g.name' ); } @@ -165,7 +167,7 @@ class ComponentbuilderModelJoomla_plugin_groups extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/joomla_plugin_updates.php b/admin/models/joomla_plugin_updates.php index ce1b043e8..99e0f9abb 100644 --- a/admin/models/joomla_plugin_updates.php +++ b/admin/models/joomla_plugin_updates.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Joomla_plugin_updates Model @@ -392,7 +394,7 @@ class ComponentbuilderModelJoomla_plugin_updates extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -451,7 +453,7 @@ class ComponentbuilderModelJoomla_plugin_updates extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -492,7 +494,7 @@ class ComponentbuilderModelJoomla_plugin_updates extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -559,8 +561,8 @@ class ComponentbuilderModelJoomla_plugin_updates extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -611,7 +613,7 @@ class ComponentbuilderModelJoomla_plugin_updates extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->joomla_plugin) && !is_numeric($this->table->joomla_plugin)) { - $this->table->joomla_plugin = $this->generateUniqe('joomla_plugin',$this->table->joomla_plugin); + $this->table->joomla_plugin = $this->generateUnique('joomla_plugin',$this->table->joomla_plugin); } // insert all set values @@ -626,12 +628,12 @@ class ComponentbuilderModelJoomla_plugin_updates extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -828,16 +830,16 @@ class ComponentbuilderModelJoomla_plugin_updates extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -850,7 +852,7 @@ class ComponentbuilderModelJoomla_plugin_updates extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -859,15 +861,15 @@ class ComponentbuilderModelJoomla_plugin_updates extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -889,7 +891,7 @@ class ComponentbuilderModelJoomla_plugin_updates extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/joomla_plugins.php b/admin/models/joomla_plugins.php index 88a22f658..f4f0bc6a7 100644 --- a/admin/models/joomla_plugins.php +++ b/admin/models/joomla_plugins.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Joomla_plugins Model */ @@ -28,8 +30,8 @@ class ComponentbuilderModelJoomla_plugins extends JModelList 'a.created_by','created_by', 'a.modified_by','modified_by', 'a.system_name','system_name', - 'a.class_extends','class_extends', - 'a.joomla_plugin_group','joomla_plugin_group' + 'g.name', + 'h.name' ); } @@ -369,7 +371,7 @@ class ComponentbuilderModelJoomla_plugins extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'DESC'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/joomla_plugins_files_folders_urls.php b/admin/models/joomla_plugins_files_folders_urls.php index a50c6055c..1abbe9f94 100644 --- a/admin/models/joomla_plugins_files_folders_urls.php +++ b/admin/models/joomla_plugins_files_folders_urls.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Joomla_plugins_files_folders_urls Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelJoomla_plugins_files_folders_urls extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/joomla_plugins_updates.php b/admin/models/joomla_plugins_updates.php index ccc2c88c5..9582f7683 100644 --- a/admin/models/joomla_plugins_updates.php +++ b/admin/models/joomla_plugins_updates.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Joomla_plugins_updates Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelJoomla_plugins_updates extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/language.php b/admin/models/language.php index d0984243c..30eae43cc 100644 --- a/admin/models/language.php +++ b/admin/models/language.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Language Model @@ -382,7 +384,7 @@ class ComponentbuilderModelLanguage extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -441,7 +443,7 @@ class ComponentbuilderModelLanguage extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -482,7 +484,7 @@ class ComponentbuilderModelLanguage extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -549,8 +551,8 @@ class ComponentbuilderModelLanguage extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -601,7 +603,7 @@ class ComponentbuilderModelLanguage extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name)) { - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->name = $this->generateUnique('name',$this->table->name); } // insert all set values @@ -616,12 +618,12 @@ class ComponentbuilderModelLanguage extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -805,16 +807,16 @@ class ComponentbuilderModelLanguage extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -827,7 +829,7 @@ class ComponentbuilderModelLanguage extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -836,15 +838,15 @@ class ComponentbuilderModelLanguage extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -866,7 +868,7 @@ class ComponentbuilderModelLanguage extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/language_translation.php b/admin/models/language_translation.php index 350d3cbf4..12d769f83 100644 --- a/admin/models/language_translation.php +++ b/admin/models/language_translation.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Language_translation Model @@ -479,7 +481,7 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -538,7 +540,7 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -579,7 +581,7 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -646,8 +648,8 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -698,7 +700,7 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->source) && !is_numeric($this->table->source)) { - $this->table->source = $this->generateUniqe('source',$this->table->source); + $this->table->source = $this->generateUnique('source',$this->table->source); } // insert all set values @@ -713,12 +715,12 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -933,16 +935,16 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -955,7 +957,7 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -964,15 +966,15 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -994,7 +996,7 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/language_translations.php b/admin/models/language_translations.php index 090f3f478..2a839d248 100644 --- a/admin/models/language_translations.php +++ b/admin/models/language_translations.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Language_translations Model */ @@ -227,7 +229,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/languages.php b/admin/models/languages.php index 6d81726ac..302ad4554 100644 --- a/admin/models/languages.php +++ b/admin/models/languages.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Languages Model */ @@ -300,7 +302,7 @@ class ComponentbuilderModelLanguages extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/layout.php b/admin/models/layout.php index 12b8dbff4..b2c856a64 100644 --- a/admin/models/layout.php +++ b/admin/models/layout.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Layout Model @@ -524,7 +526,7 @@ class ComponentbuilderModelLayout extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -583,7 +585,7 @@ class ComponentbuilderModelLayout extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -624,7 +626,7 @@ class ComponentbuilderModelLayout extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -691,8 +693,8 @@ class ComponentbuilderModelLayout extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -753,12 +755,12 @@ class ComponentbuilderModelLayout extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1023,16 +1025,16 @@ class ComponentbuilderModelLayout extends JModelAdmin } } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1045,7 +1047,7 @@ class ComponentbuilderModelLayout extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1054,15 +1056,15 @@ class ComponentbuilderModelLayout extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1090,15 +1092,15 @@ class ComponentbuilderModelLayout extends JModelAdmin { foreach($title as $nr => &$_title) { - $_title = JString::increment($_title); + $_title = StringHelper::increment($_title); } } // Make sure we have a title elseif ($title) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } - $alias = JString::increment($alias, 'dash'); + $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles if (ComponentbuilderHelper::checkArray($title)) diff --git a/admin/models/layouts.php b/admin/models/layouts.php index e03e93fb0..dbc8216ef 100644 --- a/admin/models/layouts.php +++ b/admin/models/layouts.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Layouts Model */ @@ -29,7 +31,7 @@ class ComponentbuilderModelLayouts extends JModelList 'a.modified_by','modified_by', 'a.name','name', 'a.description','description', - 'a.dynamic_get','dynamic_get', + 'g.name', 'a.add_php_view','add_php_view' ); } @@ -233,7 +235,7 @@ class ComponentbuilderModelLayouts extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'DESC'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -280,7 +282,7 @@ class ComponentbuilderModelLayouts extends JModelList } // Order the results by ordering - $query->order('a.ordering ASC'); + $query->order('a.id DESC'); // Load the items $db->setQuery($query); diff --git a/admin/models/libraries.php b/admin/models/libraries.php index 33f445fa9..68f17d7ce 100644 --- a/admin/models/libraries.php +++ b/admin/models/libraries.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Libraries Model */ @@ -275,7 +277,7 @@ class ComponentbuilderModelLibraries extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/libraries_config.php b/admin/models/libraries_config.php index 0550728d5..c390ab90f 100644 --- a/admin/models/libraries_config.php +++ b/admin/models/libraries_config.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Libraries_config Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelLibraries_config extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/libraries_files_folders_urls.php b/admin/models/libraries_files_folders_urls.php index 0ef5297d4..67e03d4b4 100644 --- a/admin/models/libraries_files_folders_urls.php +++ b/admin/models/libraries_files_folders_urls.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Libraries_files_folders_urls Model */ @@ -160,7 +162,7 @@ class ComponentbuilderModelLibraries_files_folders_urls extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/library.php b/admin/models/library.php index e1018f6f5..101ec89f2 100644 --- a/admin/models/library.php +++ b/admin/models/library.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Library Model @@ -567,10 +569,10 @@ class ComponentbuilderModelLibrary extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { - return array('name'); + return array('name', 'guid'); } @@ -688,7 +690,7 @@ class ComponentbuilderModelLibrary extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -729,7 +731,7 @@ class ComponentbuilderModelLibrary extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -796,8 +798,8 @@ class ComponentbuilderModelLibrary extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -848,7 +850,7 @@ class ComponentbuilderModelLibrary extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name)) { - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->name = $this->generateUnique('name',$this->table->name); } // insert all set values @@ -863,12 +865,12 @@ class ComponentbuilderModelLibrary extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1114,16 +1116,16 @@ class ComponentbuilderModelLibrary extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1136,7 +1138,7 @@ class ComponentbuilderModelLibrary extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1145,15 +1147,15 @@ class ComponentbuilderModelLibrary extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1175,7 +1177,7 @@ class ComponentbuilderModelLibrary extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/library_config.php b/admin/models/library_config.php index d3c261ac7..402068dd9 100644 --- a/admin/models/library_config.php +++ b/admin/models/library_config.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Library_config Model @@ -392,7 +394,7 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -451,7 +453,7 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -492,7 +494,7 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -559,8 +561,8 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -611,7 +613,7 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->library) && !is_numeric($this->table->library)) { - $this->table->library = $this->generateUniqe('library',$this->table->library); + $this->table->library = $this->generateUnique('library',$this->table->library); } // insert all set values @@ -626,12 +628,12 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -828,16 +830,16 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -850,7 +852,7 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -859,15 +861,15 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -889,7 +891,7 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/library_files_folders_urls.php b/admin/models/library_files_folders_urls.php index 3ea36bfa3..5b00e37e0 100644 --- a/admin/models/library_files_folders_urls.php +++ b/admin/models/library_files_folders_urls.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Library_files_folders_urls Model @@ -438,7 +440,7 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -497,7 +499,7 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -538,7 +540,7 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -605,8 +607,8 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -657,7 +659,7 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->library) && !is_numeric($this->table->library)) { - $this->table->library = $this->generateUniqe('library',$this->table->library); + $this->table->library = $this->generateUnique('library',$this->table->library); } // insert all set values @@ -672,12 +674,12 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -926,16 +928,16 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -948,7 +950,7 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -957,15 +959,15 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -987,7 +989,7 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/placeholder.php b/admin/models/placeholder.php index a46f77e58..8d03bc4e2 100644 --- a/admin/models/placeholder.php +++ b/admin/models/placeholder.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Placeholder Model @@ -473,7 +475,7 @@ class ComponentbuilderModelPlaceholder extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -532,7 +534,7 @@ class ComponentbuilderModelPlaceholder extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -573,7 +575,7 @@ class ComponentbuilderModelPlaceholder extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -640,8 +642,8 @@ class ComponentbuilderModelPlaceholder extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -692,7 +694,7 @@ class ComponentbuilderModelPlaceholder extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->target) && !is_numeric($this->table->target)) { - $this->table->target = $this->generateUniqe('target',$this->table->target); + $this->table->target = $this->generateUnique('target',$this->table->target); } // insert all set values @@ -707,12 +709,12 @@ class ComponentbuilderModelPlaceholder extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -907,16 +909,16 @@ class ComponentbuilderModelPlaceholder extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -929,7 +931,7 @@ class ComponentbuilderModelPlaceholder extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -938,15 +940,15 @@ class ComponentbuilderModelPlaceholder extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -968,7 +970,7 @@ class ComponentbuilderModelPlaceholder extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/placeholders.php b/admin/models/placeholders.php index 1c55139ee..fea3b1493 100644 --- a/admin/models/placeholders.php +++ b/admin/models/placeholders.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Placeholders Model */ @@ -179,7 +181,7 @@ class ComponentbuilderModelPlaceholders extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/server.php b/admin/models/server.php index 04f26d990..e81331f46 100644 --- a/admin/models/server.php +++ b/admin/models/server.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Server Model @@ -582,7 +584,7 @@ class ComponentbuilderModelServer extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -641,7 +643,7 @@ class ComponentbuilderModelServer extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -682,7 +684,7 @@ class ComponentbuilderModelServer extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -749,8 +751,8 @@ class ComponentbuilderModelServer extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -801,7 +803,7 @@ class ComponentbuilderModelServer extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name)) { - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->name = $this->generateUnique('name',$this->table->name); } // insert all set values @@ -816,12 +818,12 @@ class ComponentbuilderModelServer extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1064,16 +1066,16 @@ class ComponentbuilderModelServer extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1086,7 +1088,7 @@ class ComponentbuilderModelServer extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1095,15 +1097,15 @@ class ComponentbuilderModelServer extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1125,7 +1127,7 @@ class ComponentbuilderModelServer extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/servers.php b/admin/models/servers.php index ea225695b..2f820e780 100644 --- a/admin/models/servers.php +++ b/admin/models/servers.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Servers Model */ @@ -222,7 +224,7 @@ class ComponentbuilderModelServers extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/site_view.php b/admin/models/site_view.php index b3efd70ce..d24886a70 100644 --- a/admin/models/site_view.php +++ b/admin/models/site_view.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Site_view Model @@ -700,9 +702,9 @@ class ComponentbuilderModelSite_view extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { - return false; + return array('guid'); } /** @@ -759,7 +761,7 @@ class ComponentbuilderModelSite_view extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -800,7 +802,7 @@ class ComponentbuilderModelSite_view extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -867,8 +869,8 @@ class ComponentbuilderModelSite_view extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -919,7 +921,7 @@ class ComponentbuilderModelSite_view extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name)) { - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->name = $this->generateUnique('name',$this->table->name); } // insert all set values @@ -934,12 +936,12 @@ class ComponentbuilderModelSite_view extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1282,16 +1284,16 @@ class ComponentbuilderModelSite_view extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1304,7 +1306,7 @@ class ComponentbuilderModelSite_view extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1313,15 +1315,15 @@ class ComponentbuilderModelSite_view extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1343,7 +1345,7 @@ class ComponentbuilderModelSite_view extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/site_views.php b/admin/models/site_views.php index c6f052fe4..dfc9a6f60 100644 --- a/admin/models/site_views.php +++ b/admin/models/site_views.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Site_views Model */ @@ -30,7 +32,7 @@ class ComponentbuilderModelSite_views extends JModelList 'a.system_name','system_name', 'a.name','name', 'a.description','description', - 'a.main_get','main_get', + 'g.name', 'a.context','context', 'a.add_php_ajax','add_php_ajax', 'a.add_custom_button','add_custom_button' @@ -265,7 +267,7 @@ class ComponentbuilderModelSite_views extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'DESC'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -312,7 +314,7 @@ class ComponentbuilderModelSite_views extends JModelList } // Order the results by ordering - $query->order('a.ordering ASC'); + $query->order('a.id DESC'); // Load the items $db->setQuery($query); diff --git a/admin/models/snippet.php b/admin/models/snippet.php index 01fd17c2a..55a0fd39b 100644 --- a/admin/models/snippet.php +++ b/admin/models/snippet.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Snippet Model @@ -416,9 +418,9 @@ class ComponentbuilderModelSnippet extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { - return false; + return array('guid'); } /** @@ -475,7 +477,7 @@ class ComponentbuilderModelSnippet extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -516,7 +518,7 @@ class ComponentbuilderModelSnippet extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -583,8 +585,8 @@ class ComponentbuilderModelSnippet extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -635,7 +637,7 @@ class ComponentbuilderModelSnippet extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name)) { - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->name = $this->generateUnique('name',$this->table->name); } // insert all set values @@ -650,12 +652,12 @@ class ComponentbuilderModelSnippet extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -870,16 +872,16 @@ class ComponentbuilderModelSnippet extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -892,7 +894,7 @@ class ComponentbuilderModelSnippet extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -901,15 +903,15 @@ class ComponentbuilderModelSnippet extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -931,7 +933,7 @@ class ComponentbuilderModelSnippet extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/snippet_type.php b/admin/models/snippet_type.php index 5a8ea7728..c5966d875 100644 --- a/admin/models/snippet_type.php +++ b/admin/models/snippet_type.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Snippet_type Model @@ -382,7 +384,7 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -441,7 +443,7 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -482,7 +484,7 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -549,8 +551,8 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -601,7 +603,7 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name)) { - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->name = $this->generateUnique('name',$this->table->name); } // insert all set values @@ -616,12 +618,12 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -805,16 +807,16 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -827,7 +829,7 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -836,15 +838,15 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -866,7 +868,7 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/snippet_types.php b/admin/models/snippet_types.php index af0dde2de..41eaf84d9 100644 --- a/admin/models/snippet_types.php +++ b/admin/models/snippet_types.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Snippet_types Model */ @@ -177,7 +179,7 @@ class ComponentbuilderModelSnippet_types extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/snippets.php b/admin/models/snippets.php index b02a30e87..9222b1134 100644 --- a/admin/models/snippets.php +++ b/admin/models/snippets.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Snippets Model */ @@ -29,9 +31,9 @@ class ComponentbuilderModelSnippets extends JModelList 'a.modified_by','modified_by', 'a.name','name', 'a.url','url', - 'a.type','type', + 'g.name', 'a.heading','heading', - 'a.library','library' + 'h.name' ); } @@ -321,7 +323,7 @@ class ComponentbuilderModelSnippets extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/template.php b/admin/models/template.php index 6d03419ef..75a6f9507 100644 --- a/admin/models/template.php +++ b/admin/models/template.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Template Model @@ -524,7 +526,7 @@ class ComponentbuilderModelTemplate extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -583,7 +585,7 @@ class ComponentbuilderModelTemplate extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -624,7 +626,7 @@ class ComponentbuilderModelTemplate extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -691,8 +693,8 @@ class ComponentbuilderModelTemplate extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -753,12 +755,12 @@ class ComponentbuilderModelTemplate extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -1023,16 +1025,16 @@ class ComponentbuilderModelTemplate extends JModelAdmin } } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -1045,7 +1047,7 @@ class ComponentbuilderModelTemplate extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -1054,15 +1056,15 @@ class ComponentbuilderModelTemplate extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -1090,15 +1092,15 @@ class ComponentbuilderModelTemplate extends JModelAdmin { foreach($title as $nr => &$_title) { - $_title = JString::increment($_title); + $_title = StringHelper::increment($_title); } } // Make sure we have a title elseif ($title) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } - $alias = JString::increment($alias, 'dash'); + $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles if (ComponentbuilderHelper::checkArray($title)) diff --git a/admin/models/templates.php b/admin/models/templates.php index 0f7a969d4..27ff093e0 100644 --- a/admin/models/templates.php +++ b/admin/models/templates.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Templates Model */ @@ -29,7 +31,7 @@ class ComponentbuilderModelTemplates extends JModelList 'a.modified_by','modified_by', 'a.name','name', 'a.description','description', - 'a.dynamic_get','dynamic_get', + 'g.name', 'a.add_php_view','add_php_view' ); } @@ -233,7 +235,7 @@ class ComponentbuilderModelTemplates extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'DESC'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -280,7 +282,7 @@ class ComponentbuilderModelTemplates extends JModelList } // Order the results by ordering - $query->order('a.ordering ASC'); + $query->order('a.id DESC'); // Load the items $db->setQuery($query); diff --git a/admin/models/validation_rule.php b/admin/models/validation_rule.php index b740a5d65..008d98f40 100644 --- a/admin/models/validation_rule.php +++ b/admin/models/validation_rule.php @@ -13,6 +13,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; /** * Componentbuilder Validation_rule Model @@ -476,7 +478,7 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin * * @since 3.0 */ - protected function getUniqeFields() + protected function getUniqueFields() { return false; } @@ -535,7 +537,7 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -576,7 +578,7 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin if (!empty($commands['move_copy'])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -643,8 +645,8 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin return false; } - // get list of uniqe fields - $uniqeFields = $this->getUniqeFields(); + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); // remove move_copy from array unset($values['move_copy']); @@ -695,7 +697,7 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin // Only for strings if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name)) { - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->name = $this->generateUnique('name',$this->table->name); } // insert all set values @@ -710,12 +712,12 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin } } - // update all uniqe fields - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); } } @@ -905,16 +907,16 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin $data['params'] = (string) $params; } - // Alter the uniqe field for save as copy + // Alter the unique field for save as copy if ($input->get('task') === 'save2copy') { - // Automatic handling of other uniqe fields - $uniqeFields = $this->getUniqeFields(); - if (ComponentbuilderHelper::checkArray($uniqeFields)) + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) { - foreach ($uniqeFields as $uniqeField) + foreach ($uniqueFields as $uniqueField) { - $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); } } } @@ -927,7 +929,7 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin } /** - * Method to generate a uniqe value. + * Method to generate a unique value. * * @param string $field name. * @param string $value data. @@ -936,15 +938,15 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin * * @since 3.0 */ - protected function generateUniqe($field,$value) + protected function generateUnique($field,$value) { - // set field value uniqe + // set field value unique $table = $this->getTable(); while ($table->load(array($field => $value))) { - $value = JString::increment($value); + $value = StringHelper::increment($value); } return $value; @@ -966,7 +968,7 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin while ($table->load(array('title' => $title))) { - $title = JString::increment($title); + $title = StringHelper::increment($title); } return $title; diff --git a/admin/models/validation_rules.php b/admin/models/validation_rules.php index 0e8095ea6..17bbfe287 100644 --- a/admin/models/validation_rules.php +++ b/admin/models/validation_rules.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Utilities\ArrayHelper; + /** * Validation_rules Model */ @@ -177,7 +179,7 @@ class ComponentbuilderModelValidation_rules extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'asc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 21d8f239e..77fb71bfc 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -100,6 +100,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( `metadesc` TEXT NOT NULL, `metadata` TEXT NOT NULL, PRIMARY KEY (`id`), + UNIQUE KEY `idx_guid` (`guid`), KEY `idx_system_name` (`system_name`), KEY `idx_name_code` (`name_code`), KEY `idx_add_php_helper_admin` (`add_php_helper_admin`), @@ -134,7 +135,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( KEY `idx_update_server_target` (`update_server_target`), KEY `idx_creatuserhelper` (`creatuserhelper`), KEY `idx_adduikit` (`adduikit`), - KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -200,6 +200,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_module` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `idx_guid` (`guid`), KEY `idx_system_name` (`system_name`), KEY `idx_add_php_method_uninstall` (`add_php_method_uninstall`), KEY `idx_add_php_postflight_update` (`add_php_postflight_update`), @@ -214,7 +215,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_module` ( KEY `idx_add_php_preflight_install` (`add_php_preflight_install`), KEY `idx_add_sales_server` (`add_sales_server`), KEY `idx_add_php_preflight_update` (`add_php_preflight_update`), - KEY `idx_guid` (`guid`), KEY `idx_name` (`name`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -278,6 +278,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `idx_guid` (`guid`), KEY `idx_system_name` (`system_name`), KEY `idx_class_extends` (`class_extends`), KEY `idx_joomla_plugin_group` (`joomla_plugin_group`), @@ -294,7 +295,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` ( KEY `idx_add_php_preflight_update` (`add_php_preflight_update`), KEY `idx_add_php_preflight_uninstall` (`add_php_preflight_uninstall`), KEY `idx_add_sales_server` (`add_sales_server`), - KEY `idx_guid` (`guid`), KEY `idx_name` (`name`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -410,6 +410,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `idx_guid` (`guid`), KEY `idx_name_single` (`name_single`), KEY `idx_name_list` (`name_list`), KEY `idx_add_fadein` (`add_fadein`), @@ -448,7 +449,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( KEY `idx_add_custom_import` (`add_custom_import`), KEY `idx_add_php_getitems` (`add_php_getitems`), KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`), - KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -508,6 +508,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_custom_admin_view` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `idx_guid` (`guid`), KEY `idx_name` (`name`), KEY `idx_main_get` (`main_get`), KEY `idx_add_php_jview_display` (`add_php_jview_display`), @@ -523,7 +524,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_custom_admin_view` ( KEY `idx_add_php_ajax` (`add_php_ajax`), KEY `idx_dynamic_get` (`dynamic_get`), KEY `idx_add_custom_button` (`add_custom_button`), - KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -583,6 +583,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_site_view` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `idx_guid` (`guid`), KEY `idx_name` (`name`), KEY `idx_main_get` (`main_get`), KEY `idx_add_php_jview_display` (`add_php_jview_display`), @@ -599,7 +600,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_site_view` ( KEY `idx_add_php_ajax` (`add_php_ajax`), KEY `idx_add_custom_button` (`add_custom_button`), KEY `idx_button_position` (`button_position`), - KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -729,6 +729,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_dynamic_get` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `idx_guid` (`guid`), KEY `idx_name` (`name`), KEY `idx_main_source` (`main_source`), KEY `idx_gettype` (`gettype`), @@ -741,7 +742,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_dynamic_get` ( KEY `idx_add_php_before_getitems` (`add_php_before_getitems`), KEY `idx_add_php_after_getitems` (`add_php_after_getitems`), KEY `idx_add_php_router_parse` (`add_php_router_parse`), - KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -813,9 +813,9 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_property` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `idx_guid` (`guid`), KEY `idx_name` (`name`), KEY `idx_visibility` (`visibility`), - KEY `idx_guid` (`guid`), KEY `idx_joomla_plugin_group` (`joomla_plugin_group`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -848,9 +848,9 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_method` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `idx_guid` (`guid`), KEY `idx_name` (`name`), KEY `idx_visibility` (`visibility`), - KEY `idx_guid` (`guid`), KEY `idx_joomla_plugin_group` (`joomla_plugin_group`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -910,9 +910,9 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_library` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `idx_guid` (`guid`), KEY `idx_name` (`name`), KEY `idx_how` (`how`), - KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -949,10 +949,10 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `idx_guid` (`guid`), KEY `idx_name` (`name`), KEY `idx_type` (`type`), KEY `idx_library` (`library`), - KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -1029,6 +1029,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_field` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `idx_guid` (`guid`), KEY `idx_name` (`name`), KEY `idx_fieldtype` (`fieldtype`), KEY `idx_datatype` (`datatype`), @@ -1043,7 +1044,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_field` ( KEY `idx_add_css_views` (`add_css_views`), KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`), KEY `idx_add_javascript_views_footer` (`add_javascript_views_footer`), - KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -1082,6 +1082,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_fieldtype` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `idx_guid` (`guid`), KEY `idx_name` (`name`), KEY `idx_null_switch` (`null_switch`), KEY `idx_indexes` (`indexes`), @@ -1091,7 +1092,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_fieldtype` ( KEY `idx_datatype` (`datatype`), KEY `idx_has_defaults` (`has_defaults`), KEY `idx_datalenght` (`datalenght`), - KEY `idx_guid` (`guid`), KEY `idx_catid` (`catid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -1904,14 +1904,14 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls -- INSERT INTO `#__componentbuilder_joomla_component` (`id`, `add_license`, `license_type`, `mvc_versiondate`, `add_css_admin`, `add_css_site`, `add_email_helper`, `add_javascript`, `add_php_helper_admin`, `add_php_helper_both`, `add_php_helper_site`, `add_php_postflight_install`, `add_php_method_uninstall`, `add_php_postflight_update`, `add_php_preflight_install`, `add_php_preflight_update`, `add_placeholders`, `add_sql`, `add_sql_uninstall`, `addfootable`, `adduikit`, `add_admin_event`, `add_site_event`, `add_update_server`, `add_sales_server`, `sales_server`, `update_server`, `update_server_target`, `update_server_url`, `php_admin_event`, `php_site_event`, `addreadme`, `readme`, `author`, `bom`, `buildcomp`, `buildcompsql`, `companyname`, `component_version`, `copyright`, `creatuserhelper`, `css_admin`, `css_site`, `dashboard`, `dashboard_type`, `debug_linenr`, `description`, `email`, `emptycontributors`, `export_buy_link`, `joomla_source_link`, `export_key`, `image`, `javascript`, `license`, `name`, `system_name`, `toignore`, `name_code`, `number`, `php_helper_admin`, `php_helper_both`, `php_helper_site`, `php_postflight_install`, `php_method_uninstall`, `php_postflight_update`, `php_preflight_install`, `php_preflight_update`, `short_description`, `sql`, `sql_uninstall`, `website`, `published`, `created`, `modified`, `hits`, `ordering`, `whmcs_key`, `whmcs_url`, `guid`) VALUES -(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWl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IyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCiMjIERvbmF0aW9ucw0KDQpJZiB5b3Ugd2FudCB0byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KKiBQYXlQYWw6IFtwYXlwYWwubWUvcGF5dmRtXShodHRwczovL3d3dy5wYXlwYWwubWUvcGF5dmRtKQ0KKiBCaXRjb2luOiAxRkx4aVQ2d3l4Z1ozYm9ldmlMa1lKMURScHA0MXV6cHhhDQoqIEV0aGVyZXVtOiAweDI0MzM5MmRhYTNjOWM4YmM4NDFmY2FjZjdjN2Y3MjU0MWNiMTY4MjMg', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.0', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'https://github.com/namibia/demo-joomla-3-component', 'ssoiRTgyHnjpbecX2FNhW3d1xwZw3anFWZAhImJtELo=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkN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Q0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ1RoaXMgaXMgYSBkZW1vIGNvbXBvbmVudCBkZXZlbG9wZWQgaW4gPGEgaHJlZj0iaHR0cDovL3ZkbS5iei9jb21wb25lbnQtYnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+SkNCPC9hPiEgWW91IGNhbiBidWlsZCBtb3JlIGNvbXBvbmVudHMgbGlrZSB0aGlzIHdpdGggSkNCLCBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2018-08-22 15:02:03', '', 3, '9K0W+p28QsHgdHuzrpCNpctEhN3vABrEKYTyV3qaQmg=', '', 'efde995e-60aa-4b39-b644-44349dfb660d'); +(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', '', '', 1,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mb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gd2l0aCB0aGUgbm9ybWFsIGV2ZXJ5ZGF5IHJlYWxpdGllcyBhdCB0aGUgb2ZmaWNlLCB0aGF0IGluY2x1ZGVzIHRoZSBjb21wb25lbnQgcGxhbm5pbmcsIG1hcHBpbmcgJiBkZWJ1Z2dpbmcuKQ0KDQpQcm9qZWN0IGR1cmF0aW9uOiAqKiMjI3Byb2plY3RXZWVrVGltZSMjIyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCiMjIERvbmF0aW9ucw0KDQpJZiB5b3Ugd2FudCB0byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KKiBQYXlQYWw6IFtwYXlwYWwubWUvcGF5dmRtXShodHRwczovL3d3dy5wYXlwYWwubWUvcGF5dmRtKQ0KKiBCaXRjb2luOiAxRkx4aVQ2d3l4Z1ozYm9ldmlMa1lKMURScHA0MXV6cHhhDQoqIEV0aGVyZXVtOiAweDI0MzM5MmRhYTNjOWM4YmM4NDFmY2FjZjdjN2Y3MjU0MWNiMTY4MjMg', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.1', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'https://github.com/namibia/demo-joomla-3-component', 'ssoiRTgyHnjpbecX2FNhW3d1xwZw3anFWZAhImJtELo=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ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SBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2020-05-21 13:12:17', '', 3, '9K0W+p28QsHgdHuzrpCNpctEhN3vABrEKYTyV3qaQmg=', '', 'efde995e-60aa-4b39-b644-44349dfb660d'); -- -- Dumping data for table `#__componentbuilder_admin_view` -- INSERT INTO `#__componentbuilder_admin_view` (`id`, `add_css_view`, `add_css_views`, `add_custom_button`, `add_custom_import`, `add_fadein`, `add_javascript_view_file`, `add_javascript_view_footer`, `add_javascript_views_file`, `add_javascript_views_footer`, `add_php_ajax`, `add_php_allowedit`, `add_php_batchcopy`, `add_php_batchmove`, `add_php_getitem`, `add_php_getitems`, `add_php_getitems_after_all`, `add_php_getlistquery`, `add_php_postsavehook`, `add_php_save`, `add_sql`, `addlinked_views`, `addpermissions`, `addtables`, `addtabs`, `add_php_before_delete`, `add_php_before_publish`, `add_php_document`, `add_php_after_delete`, `add_php_after_publish`, `php_before_delete`, `php_before_publish`, `php_controller`, `php_document`, `php_after_delete`, `php_after_publish`, `ajax_input`, `css_view`, `css_views`, `custom_button`, `description`, `html_import_view`, `icon`, `icon_add`, `icon_category`, `javascript_view_file`, `javascript_view_footer`, `javascript_views_file`, `javascript_views_footer`, `name_list`, `system_name`, `name_single`, `php_ajaxmethod`, `php_allowedit`, `php_batchcopy`, `php_batchmove`, `php_getitem`, `php_getitems`, `php_getitems_after_all`, `php_getlistquery`, `php_import`, `php_import_display`, `php_import_save`, `php_import_setdata`, `php_model`, `php_postsavehook`, `php_save`, `short_description`, `source`, `sql`, `type`, `params`, `published`, `created`, `modified`, `version`, `hits`, `ordering`, `guid`) VALUES -(109, '', '', '', '', 1, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '{\"addpermissions0\":{\"action\":\"view.edit\",\"implementation\":\"3\"},\"addpermissions1\":{\"action\":\"view.edit.own\",\"implementation\":\"3\"},\"addpermissions2\":{\"action\":\"view.edit.state\",\"implementation\":\"3\"},\"addpermissions3\":{\"action\":\"view.edit.created_by\",\"implementation\":\"3\"},\"addpermissions4\":{\"action\":\"view.edit.created\",\"implementation\":\"3\"},\"addpermissions5\":{\"action\":\"view.create\",\"implementation\":\"3\"},\"addpermissions6\":{\"action\":\"view.delete\",\"implementation\":\"3\"},\"addpermissions7\":{\"action\":\"view.access\",\"implementation\":\"3\"}}', '', '{\"addtabs0\":{\"name\":\"Details\"},\"addtabs1\":{\"name\":\"More\"}}', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'images/WoodMannequin-icon.png', 'images/WoodMannequin-icon-plus.png', '', '', '', '', '', 'Looks', 'Look', 'Look', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'The demo view', '', '', 1, '', 1, '2016-10-18 11:44:46', '2018-03-30 09:30:48', 14, '', 16, 'c1053952-8a84-4398-aef1-41726f7c0043'); +(109, '', '', '', '', 1, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '{}', '{\"addpermissions0\":{\"action\":\"view.edit\",\"implementation\":3},\"addpermissions1\":{\"action\":\"view.edit.own\",\"implementation\":3},\"addpermissions2\":{\"action\":\"view.edit.state\",\"implementation\":3},\"addpermissions3\":{\"action\":\"view.edit.created_by\",\"implementation\":3},\"addpermissions4\":{\"action\":\"view.edit.created\",\"implementation\":3},\"addpermissions5\":{\"action\":\"view.create\",\"implementation\":3},\"addpermissions6\":{\"action\":\"view.delete\",\"implementation\":3},\"addpermissions7\":{\"action\":\"view.access\",\"implementation\":3}}', '{}', '{\"addtabs0\":{\"name\":\"Details\"},\"addtabs1\":{\"name\":\"More\"}}', '', '', '', '', '', '', '', '', '', '', '', '{}', '', '', '{}', '', '', 'images/WoodMannequin-icon.png', 'images/WoodMannequin-icon-plus.png', '', '', '', '', '', 'Looks', 'Look', 'Look', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'The demo view', '', '', 1, '{\"fieldordering\":{\"add_admin_ordering\":\"0\",\"admin_ordering_fields\":{\"admin_ordering_fields0\":{\"field\":\"\",\"direction\":\"ASC\"}},\"add_linked_ordering\":\"0\",\"linked_ordering_fields\":{\"linked_ordering_fields0\":{\"field\":\"\",\"direction\":\"ASC\"}}},\"privacy\":{\"activate\":\"1\",\"permissions\":\"1\",\"anonymize\":\"0\",\"anonymize_fields\":[],\"user_link\":\"1\",\"custom_link\":\"$query->where($db->quoteName(\'created_by\') . \' = \' . $db->quote($user->id));\",\"other_user_field\":\"682\"}}', 1, '2016-10-18 11:44:46', '2020-05-21 14:39:27', 18, '', 16, 'c1053952-8a84-4398-aef1-41726f7c0043'); @@ -2103,7 +2103,7 @@ INSERT INTO `#__componentbuilder_snippet` (`id`, `contributor_company`, `contrib INSERT INTO `#__componentbuilder_validation_rule` (`id`, `name`, `php`, `short_description`, `published`, `created`) VALUES (1, 'inspect', 'CS8qKg0KCSAqIE1ldGhvZCB0byB0ZXN0IHRoZSB2YWx1ZS4NCgkgKg0KCSAqIEBwYXJhbSAgIFxTaW1wbGVYTUxFbGVtZW50ICAkZWxlbWVudCAgVGhlIFNpbXBsZVhNTEVsZW1lbnQgb2JqZWN0IHJlcHJlc2VudGluZyB0aGUgYDxmaWVsZD5gIHRhZyBmb3IgdGhlIGZvcm0gZmllbGQgb2JqZWN0Lg0KCSAqIEBwYXJhbSAgIG1peGVkICAgICAgICAgICAgICAkdmFsdWUgICAgVGhlIGZvcm0gZmllbGQgdmFsdWUgdG8gdmFsaWRhdGUuDQoJICogQHBhcmFtICAgc3RyaW5nICAgICAgICAgICAgICRncm91cCAgICBUaGUgZmllbGQgbmFtZSBncm91cCBjb250cm9sIHZhbHVlLiBUaGlzIGFjdHMgYXMgYW4gYXJyYXkgY29udGFpbmVyIGZvciB0aGUgZmllbGQuDQoJICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGb3IgZXhhbXBsZSBpZiB0aGUgZmllbGQgaGFzIG5hbWU9Im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l9kdW1wKCRpbnB1dCk7DQoJCWVjaG8gJ2Zvcm08YnIgLz4nOw0KCQl2YXJfZHVtcCgkZm9ybSk7DQoJCWpleGl0KCk7DQoJfQ==', 'simple function to inspect the test values', 1, '2018-03-30 09:22:15'), (2, 'code', 'CS8qKg0KCSAqIE1ldGhvZCB0byB0ZXN0IHRoZSB2YWx1ZS4NCgkgKg0KCSAqIEBwYXJhbSAgIFxTaW1wbGVYTUxFbGVtZW50ICAkZWxlbWVudCAgVGhlIFNpbXBsZVhNTEVsZW1lbnQgb2JqZWN0IHJlcHJlc2VudGluZyB0aGUgYDxmaWVsZD5gIHRhZyBmb3IgdGhlIGZvcm0gZmllbGQgb2JqZWN0Lg0KCSAqIEBwYXJhbSAgIG1peGVkICAgICAgICAgICAgICAkdmFsdWUgICAgVGhlIGZvcm0gZmllbGQgdmFsdWUgdG8gdmFsaWRhdGUuDQoJICogQHBhcmFtICAgc3RyaW5nICAgICAgICAgICAgICRncm91cCAgICBUaGUgZmllbGQgbmFtZSBncm91cCBjb250cm9sIHZhbHVlLiBUaGlzIGFjdHMgYXMgYW4gYXJyYXkgY29udGFpbmVyIGZvciB0aGUgZmllbGQuDQoJICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGb3IgZXhhbXBsZSBpZiB0aGUgZmllbGQgaGFzIG5hbWU9ImZvbyIgYW5kIHRoZSBncm91cCB2YWx1ZSBpcyBzZXQgdG8gImJhciIgdGhlbiB0aGUNCgkgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bGwgZmllbGQgbmFtZSB3b3VsZCBlbmQgdXAgYmVpbmcgImJhcltmb29dIi4NCgkgKiBAcGFyYW0gICBSZWdpc3RyeSAgICAgICAgICAgJGlucHV0ICAgIEFuIG9wdGlvbmFsIFJlZ2lzdHJ5IG9iamVjdCB3aXRoIHRoZSBlbnRpcmUgZGF0YSBzZXQgdG8gdmFsaWRhdGUgYWdhaW5zdCB0aGUgZW50aX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TUMnID0+IGFycmF5KDIzLCAnXlswLTldezV9WzAtOV17NX1bQS1aMC05XXsxMX1bMC05XXsyfSQnKSwNCgkJCSdNRCcgPT4gYXJyYXkoMjAsICdeW0EtWjAtOV17Mn1bQS1aMC05XXsxOH0kJyksDQoJCQknTUUnID0+IGFycmF5KDE4LCAnXlswLTldezN9WzAtOV17MTN9WzAtOV17Mn0kJyksDQoJCQknTUYnID0+IGFycmF5KDIzLCAnXlswLTldezV9WzAtOV17NX1bQS1aMC05XXsxMX1bMC05XXsyfSQnKSwNCgkJCSdNRycgPT4gYXJyYXkoMjMsICdeWzAtOV17MjN9JCcpLA0KCQkJJ01LJyA9PiBhcnJheSgxNSwgJ15bMC05XXszfVtBLVowLTldezEwfVswLTldezJ9JCcpLA0KCQkJJ01MJyA9PiBhcnJheSgyNCwgJ15bQS1aXXsxfVswLTldezIzfSQnKSwNCgkJCSdNUScgPT4gYXJyYXkoMjMsICdeWzAtOV17NX1bMC05XXs1fVtBLVowLTldezExfVswLTldezJ9JCcpLA0KCQkJJ01SJyA9PiBhcnJheSgyMywgJ15bMC05XXs1fVswLTldezV9WzAtOV17MTF9WzAtOV17Mn0kJyksDQoJCQknTVQnID0+IGFycmF5KDI3LCAnXltBLVpdezR9WzAtOV17NX1bQS1aMC05XXsxOH0kJyksDQoJCQknTVUnID0+IGFycmF5KDI2LCAnXltBLVpdezR9WzAtOV17Mn1bMC05XXsyfVswLTldezEyfVswLTldezN9W0EtWl17M30kJyksDQoJCQknTVonID0+IGFycmF5KDIxLCAnXlswLTldezIxfSQnKSwNCgkJCSdOQycgPT4gYXJyYXkoMjMsICdeWzAtOV17NX1bMC05XXs1fVtBLVowLTldezExfVswLTldezJ9JCcpLA0KCQkJJ05MJyA9PiBhcnJheSgxNCwgJ15bQS1aXXs0fVswLTldezEwfSQnKSwNCgkJCSdOTycgPT4gYXJyYXkoMTEsICdeWzAtOV17NH1bMC05XXs2fVswLTldezF9JCcpLA0KCQkJJ1BGJyA9PiBhcnJ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tb2QnKSkNCgkJew0KCQkJJHRha2UgPSA1Ow0KCQkJJG1vZCA9ICcnOw0KCQkJZG8gew0KCQkJCSRhID0gKGludCkkbW9kIC4gc3Vic3RyKCR4LCAwLCAkdGFrZSk7DQoJCQkJJHggPSBzdWJzdHIoJHgsICR0YWtlKTsNCgkJCQkkbW9kID0gJGEgJSAkeTsNCgkJCX0gd2hpbGUgKHN0cmxlbigkeCkpOw0KCQkJJGJjbW9kID0gKHN0cmluZykkbW9kOw0KCQl9DQoJCWVsc2UNCgkJew0KCQkJJGJjbW9kID0gYmNtb2QoJHgsICR5KTsNCgkJfQ0KDQoJCSRpc0NoZWNrc3VtVmFsaWQgPSAkYmNtb2QgPT09ICcxJzsNCg0KCQlpZiAoISRpc0NvdW50cnlDb2RlVmFsaWQgfHwgISRpc0xlbmd0aFZhbGlkIHx8ICEkaXNGb3JtYXRWYWxpZCB8fCAhJGlzQ2hlY2tzdW1WYWxpZCkNCgkJew0KCQkJcmV0dXJuIGZhbHNlOw0KCQl9DQoJCWVsc2UNCgkJew0KCQkgICAgcmV0dXJuIHRydWU7DQoJCX0NCgl9', 'IBAN validation', 1, '2019-02-12 23:14:43'); @@ -2312,7 +2312,7 @@ INSERT INTO `#__componentbuilder_component_custom_admin_views` (`id`, `addcustom -- INSERT INTO `#__componentbuilder_component_updates` (`id`, `joomla_component`, `version_update`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES -(27, 25, '{\"version_update0\":{\"version\":\"1.0.5\",\"mysql\":\"\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/v1.0.5.zip\"},\"version_update1\":{\"version\":\"2.0.0\",\"mysql\":\"\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/v2.0.0.zip\"}}', 1, '2017-10-28 03:56:26', '2018-08-22 15:01:42', 5, '', ''); +(27, 25, '{\"version_update0\":{\"version\":\"1.0.5\",\"mysql\":\"\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/v1.0.5.zip\"},\"version_update1\":{\"version\":\"2.0.0\",\"mysql\":\"ALTER TABLE `#__demo_look` ENGINE = InnoDB;\\n\\nALTER TABLE `#__demo_look` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/v2.0.0.zip\"},\"version_update2\":{\"version\":\"2.0.1\",\"mysql\":\"\",\"url\":\"http:\\/\\/domain.com\\/demo.zip\"}}', 1, '2017-10-28 03:56:26', '2020-05-21 13:12:17', 6, '', ''); -- -- Dumping data for table `#__componentbuilder_component_mysql_tweaks` diff --git a/admin/views/admin_views/tmpl/default_head.php b/admin/views/admin_views/tmpl/default_head.php index 165689699..621a037fd 100644 --- a/admin/views/admin_views/tmpl/default_head.php +++ b/admin/views/admin_views/tmpl/default_head.php @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/admin_views/view.html.php b/admin/views/admin_views/view.html.php index f17f84c0e..98b3991a5 100644 --- a/admin/views/admin_views/view.html.php +++ b/admin/views/admin_views/view.html.php @@ -383,7 +383,7 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.system_name' => JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_SYSTEM_NAME_LABEL'), 'a.name_single' => JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_SINGLE_LABEL'), diff --git a/admin/views/admins_custom_tabs/tmpl/default_head.php b/admin/views/admins_custom_tabs/tmpl/default_head.php index 7e2002d64..aa849a813 100644 --- a/admin/views/admins_custom_tabs/tmpl/default_head.php +++ b/admin/views/admins_custom_tabs/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/admins_custom_tabs/view.html.php b/admin/views/admins_custom_tabs/view.html.php index 605e3765a..708346c78 100644 --- a/admin/views/admins_custom_tabs/view.html.php +++ b/admin/views/admins_custom_tabs/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewAdmins_custom_tabs extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/admins_fields/tmpl/default_head.php b/admin/views/admins_fields/tmpl/default_head.php index 72b82d6b1..087352029 100644 --- a/admin/views/admins_fields/tmpl/default_head.php +++ b/admin/views/admins_fields/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/admins_fields/view.html.php b/admin/views/admins_fields/view.html.php index 7c2dedf2e..91706f7be 100644 --- a/admin/views/admins_fields/view.html.php +++ b/admin/views/admins_fields/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/admins_fields_conditions/tmpl/default_head.php b/admin/views/admins_fields_conditions/tmpl/default_head.php index dd61be6a8..9b77e90aa 100644 --- a/admin/views/admins_fields_conditions/tmpl/default_head.php +++ b/admin/views/admins_fields_conditions/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/admins_fields_conditions/view.html.php b/admin/views/admins_fields_conditions/view.html.php index abf877f12..d166ad212 100644 --- a/admin/views/admins_fields_conditions/view.html.php +++ b/admin/views/admins_fields_conditions/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/admins_fields_relations/tmpl/default_head.php b/admin/views/admins_fields_relations/tmpl/default_head.php index 742feb593..7ed86a441 100644 --- a/admin/views/admins_fields_relations/tmpl/default_head.php +++ b/admin/views/admins_fields_relations/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/admins_fields_relations/view.html.php b/admin/views/admins_fields_relations/view.html.php index a97531dd1..5f35af011 100644 --- a/admin/views/admins_fields_relations/view.html.php +++ b/admin/views/admins_fields_relations/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewAdmins_fields_relations extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/class_extendings/tmpl/default_head.php b/admin/views/class_extendings/tmpl/default_head.php index 0b68196dd..a0eb35c71 100644 --- a/admin/views/class_extendings/tmpl/default_head.php +++ b/admin/views/class_extendings/tmpl/default_head.php @@ -30,14 +30,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -45,6 +45,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/class_extendings/view.html.php b/admin/views/class_extendings/view.html.php index 1ac3a6269..e9853096c 100644 --- a/admin/views/class_extendings/view.html.php +++ b/admin/views/class_extendings/view.html.php @@ -248,7 +248,7 @@ class ComponentbuilderViewClass_extendings extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_CLASS_EXTENDS_NAME_LABEL'), 'a.extension_type' => JText::_('COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE_LABEL'), diff --git a/admin/views/class_methods/tmpl/default_head.php b/admin/views/class_methods/tmpl/default_head.php index 7aaf09c10..929bc3cc1 100644 --- a/admin/views/class_methods/tmpl/default_head.php +++ b/admin/views/class_methods/tmpl/default_head.php @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/class_methods/view.html.php b/admin/views/class_methods/view.html.php index 3bec6d148..96ff4a12c 100644 --- a/admin/views/class_methods/view.html.php +++ b/admin/views/class_methods/view.html.php @@ -288,7 +288,7 @@ class ComponentbuilderViewClass_methods extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_NAME_LABEL'), 'a.visibility' => JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY_LABEL'), diff --git a/admin/views/class_properties/tmpl/default_head.php b/admin/views/class_properties/tmpl/default_head.php index c0d022545..455f8bf58 100644 --- a/admin/views/class_properties/tmpl/default_head.php +++ b/admin/views/class_properties/tmpl/default_head.php @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/class_properties/view.html.php b/admin/views/class_properties/view.html.php index 3edf384ef..7faa956be 100644 --- a/admin/views/class_properties/view.html.php +++ b/admin/views/class_properties/view.html.php @@ -288,7 +288,7 @@ class ComponentbuilderViewClass_properties extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_NAME_LABEL'), 'a.visibility' => JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_LABEL'), diff --git a/admin/views/components_admin_views/tmpl/default_head.php b/admin/views/components_admin_views/tmpl/default_head.php index 49ad804f8..32c323caa 100644 --- a/admin/views/components_admin_views/tmpl/default_head.php +++ b/admin/views/components_admin_views/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/components_admin_views/view.html.php b/admin/views/components_admin_views/view.html.php index c06140664..6ba273c93 100644 --- a/admin/views/components_admin_views/view.html.php +++ b/admin/views/components_admin_views/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_config/tmpl/default_head.php b/admin/views/components_config/tmpl/default_head.php index 17ba7a7e7..19bb34c25 100644 --- a/admin/views/components_config/tmpl/default_head.php +++ b/admin/views/components_config/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/components_config/view.html.php b/admin/views/components_config/view.html.php index 77c80c279..0966e738e 100644 --- a/admin/views/components_config/view.html.php +++ b/admin/views/components_config/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewComponents_config extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_custom_admin_menus/tmpl/default_head.php b/admin/views/components_custom_admin_menus/tmpl/default_head.php index c1dff436e..e8cd208bc 100644 --- a/admin/views/components_custom_admin_menus/tmpl/default_head.php +++ b/admin/views/components_custom_admin_menus/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/components_custom_admin_menus/view.html.php b/admin/views/components_custom_admin_menus/view.html.php index 4c03a9f2c..32af9aefb 100644 --- a/admin/views/components_custom_admin_menus/view.html.php +++ b/admin/views/components_custom_admin_menus/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_custom_admin_views/tmpl/default_head.php b/admin/views/components_custom_admin_views/tmpl/default_head.php index ea870f7b0..b171bddbc 100644 --- a/admin/views/components_custom_admin_views/tmpl/default_head.php +++ b/admin/views/components_custom_admin_views/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/components_custom_admin_views/view.html.php b/admin/views/components_custom_admin_views/view.html.php index 1468c4c4a..08ba68ee0 100644 --- a/admin/views/components_custom_admin_views/view.html.php +++ b/admin/views/components_custom_admin_views/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_dashboard/tmpl/default_head.php b/admin/views/components_dashboard/tmpl/default_head.php index 415b74bf9..618ea8dce 100644 --- a/admin/views/components_dashboard/tmpl/default_head.php +++ b/admin/views/components_dashboard/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/components_dashboard/view.html.php b/admin/views/components_dashboard/view.html.php index 22d2ce6ad..7c7af3922 100644 --- a/admin/views/components_dashboard/view.html.php +++ b/admin/views/components_dashboard/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_files_folders/tmpl/default_head.php b/admin/views/components_files_folders/tmpl/default_head.php index 8d8510241..1b9c11dca 100644 --- a/admin/views/components_files_folders/tmpl/default_head.php +++ b/admin/views/components_files_folders/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/components_files_folders/view.html.php b/admin/views/components_files_folders/view.html.php index e2991a749..4b2224669 100644 --- a/admin/views/components_files_folders/view.html.php +++ b/admin/views/components_files_folders/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_modules/tmpl/default_head.php b/admin/views/components_modules/tmpl/default_head.php index b077d392e..85913a239 100644 --- a/admin/views/components_modules/tmpl/default_head.php +++ b/admin/views/components_modules/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/components_modules/view.html.php b/admin/views/components_modules/view.html.php index 7599dbb5d..615af532b 100644 --- a/admin/views/components_modules/view.html.php +++ b/admin/views/components_modules/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewComponents_modules extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_mysql_tweaks/tmpl/default_head.php b/admin/views/components_mysql_tweaks/tmpl/default_head.php index cb565c286..aca99e265 100644 --- a/admin/views/components_mysql_tweaks/tmpl/default_head.php +++ b/admin/views/components_mysql_tweaks/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/components_mysql_tweaks/view.html.php b/admin/views/components_mysql_tweaks/view.html.php index d735df407..932590ef1 100644 --- a/admin/views/components_mysql_tweaks/view.html.php +++ b/admin/views/components_mysql_tweaks/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_placeholders/tmpl/default_head.php b/admin/views/components_placeholders/tmpl/default_head.php index d070cf432..718c96bd0 100644 --- a/admin/views/components_placeholders/tmpl/default_head.php +++ b/admin/views/components_placeholders/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/components_placeholders/view.html.php b/admin/views/components_placeholders/view.html.php index fc490f01d..dfeab8055 100644 --- a/admin/views/components_placeholders/view.html.php +++ b/admin/views/components_placeholders/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewComponents_placeholders extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_plugins/tmpl/default_head.php b/admin/views/components_plugins/tmpl/default_head.php index 3c0072deb..a9e46c4fa 100644 --- a/admin/views/components_plugins/tmpl/default_head.php +++ b/admin/views/components_plugins/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/components_plugins/view.html.php b/admin/views/components_plugins/view.html.php index 2fcd9a292..26b8d5903 100644 --- a/admin/views/components_plugins/view.html.php +++ b/admin/views/components_plugins/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewComponents_plugins extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_site_views/tmpl/default_head.php b/admin/views/components_site_views/tmpl/default_head.php index 39a6ee428..0dd72a58c 100644 --- a/admin/views/components_site_views/tmpl/default_head.php +++ b/admin/views/components_site_views/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/components_site_views/view.html.php b/admin/views/components_site_views/view.html.php index f5574abc1..cf80cfcb0 100644 --- a/admin/views/components_site_views/view.html.php +++ b/admin/views/components_site_views/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/components_updates/tmpl/default_head.php b/admin/views/components_updates/tmpl/default_head.php index cf6edbfe6..d3d0312cb 100644 --- a/admin/views/components_updates/tmpl/default_head.php +++ b/admin/views/components_updates/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/components_updates/view.html.php b/admin/views/components_updates/view.html.php index 760528eb6..4462c30b8 100644 --- a/admin/views/components_updates/view.html.php +++ b/admin/views/components_updates/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/custom_admin_views/tmpl/default_head.php b/admin/views/custom_admin_views/tmpl/default_head.php index 9ed49ece5..8a31858da 100644 --- a/admin/views/custom_admin_views/tmpl/default_head.php +++ b/admin/views/custom_admin_views/tmpl/default_head.php @@ -30,20 +30,20 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -51,6 +51,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/custom_admin_views/view.html.php b/admin/views/custom_admin_views/view.html.php index 95ec784fb..36156be68 100644 --- a/admin/views/custom_admin_views/view.html.php +++ b/admin/views/custom_admin_views/view.html.php @@ -323,7 +323,7 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.system_name' => JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SYSTEM_NAME_LABEL'), 'a.name' => JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_LABEL'), diff --git a/admin/views/custom_codes/tmpl/default_head.php b/admin/views/custom_codes/tmpl/default_head.php index 2b3d84ac1..c14b79680 100644 --- a/admin/views/custom_codes/tmpl/default_head.php +++ b/admin/views/custom_codes/tmpl/default_head.php @@ -30,23 +30,23 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -54,6 +54,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/custom_codes/view.html.php b/admin/views/custom_codes/view.html.php index 70a2c948e..552e98085 100644 --- a/admin/views/custom_codes/view.html.php +++ b/admin/views/custom_codes/view.html.php @@ -353,7 +353,7 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'g.system_name' => JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL'), 'a.path' => JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_PATH_LABEL'), diff --git a/admin/views/dynamic_gets/tmpl/default_head.php b/admin/views/dynamic_gets/tmpl/default_head.php index e5539ba33..933f12540 100644 --- a/admin/views/dynamic_gets/tmpl/default_head.php +++ b/admin/views/dynamic_gets/tmpl/default_head.php @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/dynamic_gets/view.html.php b/admin/views/dynamic_gets/view.html.php index 3955e6b17..078941359 100644 --- a/admin/views/dynamic_gets/view.html.php +++ b/admin/views/dynamic_gets/view.html.php @@ -293,7 +293,7 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_LABEL'), 'a.main_source' => JText::_('COM_COMPONENTBUILDER_DYNAMIC_GET_MAIN_SOURCE_LABEL'), diff --git a/admin/views/fields/tmpl/default_head.php b/admin/views/fields/tmpl/default_head.php index ddab8792f..0b0544523 100644 --- a/admin/views/fields/tmpl/default_head.php +++ b/admin/views/fields/tmpl/default_head.php @@ -30,29 +30,29 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -60,6 +60,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/fields/view.html.php b/admin/views/fields/view.html.php index 5b7ccdb99..23d5bb351 100644 --- a/admin/views/fields/view.html.php +++ b/admin/views/fields/view.html.php @@ -400,7 +400,7 @@ class ComponentbuilderViewFields extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_FIELD_NAME_LABEL'), 'g.name' => JText::_('COM_COMPONENTBUILDER_FIELD_FIELDTYPE_LABEL'), @@ -408,7 +408,7 @@ class ComponentbuilderViewFields extends JViewLegacy 'a.indexes' => JText::_('COM_COMPONENTBUILDER_FIELD_INDEXES_LABEL'), 'a.null_switch' => JText::_('COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL'), 'a.store' => JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'), - 'c.category_title' => JText::_('COM_COMPONENTBUILDER_FIELD_FIELDS_CATEGORIES'), + 'category_title' => JText::_('COM_COMPONENTBUILDER_FIELD_FIELDS_CATEGORIES'), 'a.id' => JText::_('JGRID_HEADING_ID') ); } diff --git a/admin/views/fieldtypes/tmpl/default_head.php b/admin/views/fieldtypes/tmpl/default_head.php index 5880a43c6..296445ed8 100644 --- a/admin/views/fieldtypes/tmpl/default_head.php +++ b/admin/views/fieldtypes/tmpl/default_head.php @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/fieldtypes/view.html.php b/admin/views/fieldtypes/view.html.php index 2ec448b74..8e9b92677 100644 --- a/admin/views/fieldtypes/view.html.php +++ b/admin/views/fieldtypes/view.html.php @@ -245,11 +245,11 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_NAME_LABEL'), 'a.short_description' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_SHORT_DESCRIPTION_LABEL'), - 'c.category_title' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPES_CATEGORIES'), + 'category_title' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPES_CATEGORIES'), 'a.id' => JText::_('JGRID_HEADING_ID') ); } diff --git a/admin/views/help_documents/tmpl/default_head.php b/admin/views/help_documents/tmpl/default_head.php index 22685420d..b8663587b 100644 --- a/admin/views/help_documents/tmpl/default_head.php +++ b/admin/views/help_documents/tmpl/default_head.php @@ -30,26 +30,26 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -57,6 +57,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/help_documents/view.html.php b/admin/views/help_documents/view.html.php index 2873f3ce6..467b0d682 100644 --- a/admin/views/help_documents/view.html.php +++ b/admin/views/help_documents/view.html.php @@ -348,7 +348,7 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.title' => JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_TITLE_LABEL'), 'a.type' => JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE_LABEL'), diff --git a/admin/views/joomla_components/tmpl/default_head.php b/admin/views/joomla_components/tmpl/default_head.php index 54abb22b6..aa3ac05a3 100644 --- a/admin/views/joomla_components/tmpl/default_head.php +++ b/admin/views/joomla_components/tmpl/default_head.php @@ -30,20 +30,20 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -51,6 +51,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/joomla_components/view.html.php b/admin/views/joomla_components/view.html.php index 90789df3f..0cf4685f3 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -318,7 +318,7 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.system_name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SYSTEM_NAME_LABEL'), 'a.name_code' => JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_LABEL'), diff --git a/admin/views/joomla_modules/tmpl/default_head.php b/admin/views/joomla_modules/tmpl/default_head.php index 0ca94b9c1..2b16008a9 100644 --- a/admin/views/joomla_modules/tmpl/default_head.php +++ b/admin/views/joomla_modules/tmpl/default_head.php @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/joomla_modules/view.html.php b/admin/views/joomla_modules/view.html.php index 41b4dfee9..7ece0f897 100644 --- a/admin/views/joomla_modules/view.html.php +++ b/admin/views/joomla_modules/view.html.php @@ -258,7 +258,7 @@ class ComponentbuilderViewJoomla_modules extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.system_name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_LABEL'), 'a.description' => JText::_('COM_COMPONENTBUILDER_JOOMLA_MODULE_DESCRIPTION_LABEL'), diff --git a/admin/views/joomla_modules_files_folders_urls/tmpl/default_head.php b/admin/views/joomla_modules_files_folders_urls/tmpl/default_head.php index 04b09a340..37fcf012e 100644 --- a/admin/views/joomla_modules_files_folders_urls/tmpl/default_head.php +++ b/admin/views/joomla_modules_files_folders_urls/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file 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 46b90eebc..12e7ca417 100644 --- a/admin/views/joomla_modules_files_folders_urls/view.html.php +++ b/admin/views/joomla_modules_files_folders_urls/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewJoomla_modules_files_folders_urls extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/joomla_modules_updates/tmpl/default_head.php b/admin/views/joomla_modules_updates/tmpl/default_head.php index 04e7d6925..d02614aaa 100644 --- a/admin/views/joomla_modules_updates/tmpl/default_head.php +++ b/admin/views/joomla_modules_updates/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/joomla_modules_updates/view.html.php b/admin/views/joomla_modules_updates/view.html.php index c045f9e62..f9d4a397c 100644 --- a/admin/views/joomla_modules_updates/view.html.php +++ b/admin/views/joomla_modules_updates/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewJoomla_modules_updates extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/joomla_plugin_groups/tmpl/default_head.php b/admin/views/joomla_plugin_groups/tmpl/default_head.php index ff464358f..6a567fd60 100644 --- a/admin/views/joomla_plugin_groups/tmpl/default_head.php +++ b/admin/views/joomla_plugin_groups/tmpl/default_head.php @@ -30,14 +30,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -45,6 +45,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/joomla_plugin_groups/view.html.php b/admin/views/joomla_plugin_groups/view.html.php index 0d24f65ca..a7a0f3363 100644 --- a/admin/views/joomla_plugin_groups/view.html.php +++ b/admin/views/joomla_plugin_groups/view.html.php @@ -248,7 +248,7 @@ class ComponentbuilderViewJoomla_plugin_groups extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NAME_LABEL'), 'g.name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_LABEL'), diff --git a/admin/views/joomla_plugins/tmpl/default_head.php b/admin/views/joomla_plugins/tmpl/default_head.php index 7ece57317..a7c71047f 100644 --- a/admin/views/joomla_plugins/tmpl/default_head.php +++ b/admin/views/joomla_plugins/tmpl/default_head.php @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/joomla_plugins/view.html.php b/admin/views/joomla_plugins/view.html.php index 433eab67d..41b2f5172 100644 --- a/admin/views/joomla_plugins/view.html.php +++ b/admin/views/joomla_plugins/view.html.php @@ -298,7 +298,7 @@ class ComponentbuilderViewJoomla_plugins extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.system_name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SYSTEM_NAME_LABEL'), 'g.name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_LABEL'), diff --git a/admin/views/joomla_plugins_files_folders_urls/tmpl/default_head.php b/admin/views/joomla_plugins_files_folders_urls/tmpl/default_head.php index d0be38410..e0e6523ae 100644 --- a/admin/views/joomla_plugins_files_folders_urls/tmpl/default_head.php +++ b/admin/views/joomla_plugins_files_folders_urls/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file 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 b274c7e88..0b290303e 100644 --- a/admin/views/joomla_plugins_files_folders_urls/view.html.php +++ b/admin/views/joomla_plugins_files_folders_urls/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewJoomla_plugins_files_folders_urls extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/joomla_plugins_updates/tmpl/default_head.php b/admin/views/joomla_plugins_updates/tmpl/default_head.php index b4fd91355..71a9ee727 100644 --- a/admin/views/joomla_plugins_updates/tmpl/default_head.php +++ b/admin/views/joomla_plugins_updates/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/joomla_plugins_updates/view.html.php b/admin/views/joomla_plugins_updates/view.html.php index f6d8183f6..3ef8b0799 100644 --- a/admin/views/joomla_plugins_updates/view.html.php +++ b/admin/views/joomla_plugins_updates/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewJoomla_plugins_updates extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/language_translations/tmpl/default_head.php b/admin/views/language_translations/tmpl/default_head.php index 87b44ba5e..17e59d12f 100644 --- a/admin/views/language_translations/tmpl/default_head.php +++ b/admin/views/language_translations/tmpl/default_head.php @@ -30,11 +30,11 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/language_translations/view.html.php b/admin/views/language_translations/view.html.php index df3d484ac..2da83ae01 100644 --- a/admin/views/language_translations/view.html.php +++ b/admin/views/language_translations/view.html.php @@ -228,7 +228,7 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.source' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') diff --git a/admin/views/languages/tmpl/default_head.php b/admin/views/languages/tmpl/default_head.php index a02cf16ae..07a32e556 100644 --- a/admin/views/languages/tmpl/default_head.php +++ b/admin/views/languages/tmpl/default_head.php @@ -30,14 +30,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -45,6 +45,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/languages/view.html.php b/admin/views/languages/view.html.php index 9cd41150e..9b5d2975f 100644 --- a/admin/views/languages/view.html.php +++ b/admin/views/languages/view.html.php @@ -233,7 +233,7 @@ class ComponentbuilderViewLanguages extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_NAME_LABEL'), 'a.langtag' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_LANGTAG_LABEL'), diff --git a/admin/views/layouts/tmpl/default_head.php b/admin/views/layouts/tmpl/default_head.php index a92601ae3..6feaf4169 100644 --- a/admin/views/layouts/tmpl/default_head.php +++ b/admin/views/layouts/tmpl/default_head.php @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/layouts/view.html.php b/admin/views/layouts/view.html.php index 36d474799..5dd02db03 100644 --- a/admin/views/layouts/view.html.php +++ b/admin/views/layouts/view.html.php @@ -293,7 +293,7 @@ class ComponentbuilderViewLayouts extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_LAYOUT_NAME_LABEL'), 'a.description' => JText::_('COM_COMPONENTBUILDER_LAYOUT_DESCRIPTION_LABEL'), diff --git a/admin/views/libraries/tmpl/default_head.php b/admin/views/libraries/tmpl/default_head.php index 4c7e23aee..d683dc029 100644 --- a/admin/views/libraries/tmpl/default_head.php +++ b/admin/views/libraries/tmpl/default_head.php @@ -30,23 +30,23 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -54,6 +54,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/libraries/view.html.php b/admin/views/libraries/view.html.php index 3234c1279..4ba226444 100644 --- a/admin/views/libraries/view.html.php +++ b/admin/views/libraries/view.html.php @@ -313,7 +313,7 @@ class ComponentbuilderViewLibraries extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_LIBRARY_NAME_LABEL'), 'a.target' => JText::_('COM_COMPONENTBUILDER_LIBRARY_TARGET_LABEL'), diff --git a/admin/views/libraries_config/tmpl/default_head.php b/admin/views/libraries_config/tmpl/default_head.php index 4b087d561..9a3e55b2b 100644 --- a/admin/views/libraries_config/tmpl/default_head.php +++ b/admin/views/libraries_config/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/libraries_config/view.html.php b/admin/views/libraries_config/view.html.php index bcc6f7b4e..cb0a34798 100644 --- a/admin/views/libraries_config/view.html.php +++ b/admin/views/libraries_config/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/libraries_files_folders_urls/tmpl/default_head.php b/admin/views/libraries_files_folders_urls/tmpl/default_head.php index 0b45a1d6f..88a7012e6 100644 --- a/admin/views/libraries_files_folders_urls/tmpl/default_head.php +++ b/admin/views/libraries_files_folders_urls/tmpl/default_head.php @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/libraries_files_folders_urls/view.html.php b/admin/views/libraries_files_folders_urls/view.html.php index e57ee9b14..449e59aba 100644 --- a/admin/views/libraries_files_folders_urls/view.html.php +++ b/admin/views/libraries_files_folders_urls/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.id' => JText::_('JGRID_HEADING_ID') ); diff --git a/admin/views/placeholders/tmpl/default_head.php b/admin/views/placeholders/tmpl/default_head.php index 1a49a2fc5..314685539 100644 --- a/admin/views/placeholders/tmpl/default_head.php +++ b/admin/views/placeholders/tmpl/default_head.php @@ -30,14 +30,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -45,6 +45,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/placeholders/view.html.php b/admin/views/placeholders/view.html.php index 2b904dcb7..56c0a74f6 100644 --- a/admin/views/placeholders/view.html.php +++ b/admin/views/placeholders/view.html.php @@ -228,7 +228,7 @@ class ComponentbuilderViewPlaceholders extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.target' => JText::_('COM_COMPONENTBUILDER_PLACEHOLDER_TARGET_LABEL'), 'a.value' => JText::_('COM_COMPONENTBUILDER_PLACEHOLDER_VALUE_LABEL'), diff --git a/admin/views/servers/tmpl/default_head.php b/admin/views/servers/tmpl/default_head.php index 07e9d09b2..42f71a59f 100644 --- a/admin/views/servers/tmpl/default_head.php +++ b/admin/views/servers/tmpl/default_head.php @@ -30,14 +30,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -45,6 +45,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/servers/view.html.php b/admin/views/servers/view.html.php index 44cac8b62..e3e0275bf 100644 --- a/admin/views/servers/view.html.php +++ b/admin/views/servers/view.html.php @@ -288,7 +288,7 @@ class ComponentbuilderViewServers extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_SERVER_NAME_LABEL'), 'a.protocol' => JText::_('COM_COMPONENTBUILDER_SERVER_PROTOCOL_LABEL'), diff --git a/admin/views/site_views/tmpl/default_head.php b/admin/views/site_views/tmpl/default_head.php index 9b8a3011d..173030ce5 100644 --- a/admin/views/site_views/tmpl/default_head.php +++ b/admin/views/site_views/tmpl/default_head.php @@ -30,20 +30,20 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -51,6 +51,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/site_views/view.html.php b/admin/views/site_views/view.html.php index a7580e0e9..6b959f2b0 100644 --- a/admin/views/site_views/view.html.php +++ b/admin/views/site_views/view.html.php @@ -323,7 +323,7 @@ class ComponentbuilderViewSite_views extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.system_name' => JText::_('COM_COMPONENTBUILDER_SITE_VIEW_SYSTEM_NAME_LABEL'), 'a.name' => JText::_('COM_COMPONENTBUILDER_SITE_VIEW_NAME_LABEL'), diff --git a/admin/views/snippet_types/tmpl/default_head.php b/admin/views/snippet_types/tmpl/default_head.php index 737bd8557..c862e11bf 100644 --- a/admin/views/snippet_types/tmpl/default_head.php +++ b/admin/views/snippet_types/tmpl/default_head.php @@ -30,14 +30,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -45,6 +45,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/snippet_types/view.html.php b/admin/views/snippet_types/view.html.php index 70dbd6fc4..54cfe563a 100644 --- a/admin/views/snippet_types/view.html.php +++ b/admin/views/snippet_types/view.html.php @@ -218,7 +218,7 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_NAME_LABEL'), 'a.description' => JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_LABEL'), diff --git a/admin/views/snippets/tmpl/default_head.php b/admin/views/snippets/tmpl/default_head.php index 0f4f3445b..5f334e595 100644 --- a/admin/views/snippets/tmpl/default_head.php +++ b/admin/views/snippets/tmpl/default_head.php @@ -30,23 +30,23 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -54,6 +54,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/snippets/view.html.php b/admin/views/snippets/view.html.php index ef582c717..1a9f73527 100644 --- a/admin/views/snippets/view.html.php +++ b/admin/views/snippets/view.html.php @@ -298,7 +298,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_SNIPPET_NAME_LABEL'), 'a.url' => JText::_('COM_COMPONENTBUILDER_SNIPPET_URL_LABEL'), diff --git a/admin/views/templates/tmpl/default_head.php b/admin/views/templates/tmpl/default_head.php index 177ca6955..18ef3a02a 100644 --- a/admin/views/templates/tmpl/default_head.php +++ b/admin/views/templates/tmpl/default_head.php @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/templates/view.html.php b/admin/views/templates/view.html.php index c0d02d2a7..f0046359d 100644 --- a/admin/views/templates/view.html.php +++ b/admin/views/templates/view.html.php @@ -293,7 +293,7 @@ class ComponentbuilderViewTemplates extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_TEMPLATE_NAME_LABEL'), 'a.description' => JText::_('COM_COMPONENTBUILDER_TEMPLATE_DESCRIPTION_LABEL'), diff --git a/admin/views/validation_rules/tmpl/default_head.php b/admin/views/validation_rules/tmpl/default_head.php index 328ae8ef8..177b3a7f9 100644 --- a/admin/views/validation_rules/tmpl/default_head.php +++ b/admin/views/validation_rules/tmpl/default_head.php @@ -30,14 +30,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -45,6 +45,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/validation_rules/view.html.php b/admin/views/validation_rules/view.html.php index d548ea8a8..872d4216b 100644 --- a/admin/views/validation_rules/view.html.php +++ b/admin/views/validation_rules/view.html.php @@ -233,7 +233,7 @@ class ComponentbuilderViewValidation_rules extends JViewLegacy protected function getSortFields() { return array( - 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_LABEL'), 'a.short_description' => JText::_('COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_LABEL'), diff --git a/componentbuilder.xml b/componentbuilder.xml index c5e240438..a59fc8a37 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 23rd April, 2020 + 21st May, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 2.11.0 + 2.11.1 Component Builder (v.2.11.0) +

Component Builder (v.2.11.1)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index 6d32ac05f..e76c6cc4c 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -956,10 +956,10 @@ Builds Complex Joomla Components com_componentbuilder component - 2.11.0 + 2.11.1 http://www.joomlacomponentbuilder.com - https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.11.0/JCB_v2.11.0.zip + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.11.1/JCB_v2.11.1.zip stable diff --git a/script.php b/script.php index a67defd69..2edb47d4b 100644 --- a/script.php +++ b/script.php @@ -9123,7 +9123,7 @@ class com_componentbuilderInstallerScript echo ' -

Upgrade to Version 2.11.0 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 2.11.1 Was Successful! Let us know if anything is not working as expected.

'; // Set db if not set already. if (!isset($db)) -- 2.40.1 From 3a2b8497e3309307cd50f9c5f23bad091bb6a9d5 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 22 May 2020 02:32:58 +0200 Subject: [PATCH 3/4] Changed main views in JCB to sort id descending. --- README.md | 4 +- admin/README.txt | 4 +- admin/compiler/joomla_3/JViewLegacy_list.php | 4 +- admin/helpers/compiler/e_Interpretation.php | 48 +++++++++++++++++++ admin/helpers/compiler/f_Infusion.php | 5 ++ admin/models/admin_views.php | 4 +- admin/models/class_methods.php | 4 +- admin/models/class_properties.php | 4 +- admin/models/custom_admin_views.php | 4 +- admin/models/custom_codes.php | 4 +- admin/models/dynamic_gets.php | 4 +- admin/models/fields.php | 4 +- admin/models/joomla_components.php | 4 +- admin/models/joomla_modules.php | 2 +- admin/models/joomla_plugins.php | 2 +- admin/models/layouts.php | 4 +- admin/models/libraries.php | 2 +- admin/models/placeholders.php | 4 +- admin/models/site_views.php | 4 +- admin/models/snippets.php | 4 +- admin/models/templates.php | 4 +- admin/models/validation_rules.php | 4 +- admin/views/admin_views/view.html.php | 7 +-- admin/views/admins_custom_tabs/view.html.php | 7 +-- admin/views/admins_fields/view.html.php | 7 +-- .../admins_fields_conditions/view.html.php | 7 +-- .../admins_fields_relations/view.html.php | 7 +-- admin/views/class_extendings/view.html.php | 7 +-- admin/views/class_methods/view.html.php | 7 +-- admin/views/class_properties/view.html.php | 7 +-- .../components_admin_views/view.html.php | 7 +-- admin/views/components_config/view.html.php | 7 +-- .../view.html.php | 7 +-- .../view.html.php | 7 +-- .../views/components_dashboard/view.html.php | 7 +-- .../components_files_folders/view.html.php | 7 +-- admin/views/components_modules/view.html.php | 7 +-- .../components_mysql_tweaks/view.html.php | 7 +-- .../components_placeholders/view.html.php | 7 +-- admin/views/components_plugins/view.html.php | 7 +-- .../views/components_site_views/view.html.php | 7 +-- admin/views/components_updates/view.html.php | 7 +-- admin/views/custom_admin_views/view.html.php | 7 +-- admin/views/custom_codes/view.html.php | 7 +-- admin/views/dynamic_gets/view.html.php | 7 +-- admin/views/fields/view.html.php | 7 +-- admin/views/fieldtypes/view.html.php | 7 +-- admin/views/help_documents/view.html.php | 7 +-- admin/views/joomla_components/view.html.php | 7 +-- admin/views/joomla_modules/view.html.php | 7 +-- .../view.html.php | 7 +-- .../joomla_modules_updates/view.html.php | 7 +-- .../views/joomla_plugin_groups/view.html.php | 7 +-- admin/views/joomla_plugins/view.html.php | 7 +-- .../view.html.php | 7 +-- .../joomla_plugins_updates/view.html.php | 7 +-- .../views/language_translations/view.html.php | 7 +-- admin/views/languages/view.html.php | 7 +-- admin/views/layouts/view.html.php | 7 +-- admin/views/libraries/view.html.php | 7 +-- admin/views/libraries_config/view.html.php | 7 +-- .../view.html.php | 7 +-- admin/views/placeholders/view.html.php | 7 +-- admin/views/servers/view.html.php | 7 +-- admin/views/site_views/view.html.php | 7 +-- admin/views/snippet_types/view.html.php | 7 +-- admin/views/snippets/view.html.php | 7 +-- admin/views/templates/view.html.php | 7 +-- admin/views/validation_rules/view.html.php | 7 +-- componentbuilder.xml | 2 +- 70 files changed, 278 insertions(+), 180 deletions(-) diff --git a/README.md b/README.md index f609a17bf..5d53944d4 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*: 21st May, 2020 ++ *Last Build*: 22nd May, 2020 + *Version*: 2.11.1 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **281703** ++ *Line count*: **281750** + *Field count*: **1522** + *File count*: **1783** + *Folder count*: **295** diff --git a/admin/README.txt b/admin/README.txt index f609a17bf..5d53944d4 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*: 21st May, 2020 ++ *Last Build*: 22nd May, 2020 + *Version*: 2.11.1 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **281703** ++ *Line count*: **281750** + *Field count*: **1522** + *File count*: **1783** + *Folder count*: **295** diff --git a/admin/compiler/joomla_3/JViewLegacy_list.php b/admin/compiler/joomla_3/JViewLegacy_list.php index 3935b832c..e05449944 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list.php +++ b/admin/compiler/joomla_3/JViewLegacy_list.php @@ -38,9 +38,7 @@ class ###Component###View###Views### extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $this->user = JFactory::getUser();###ADMIN_DIPLAY_METHOD### $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 8d757a361..ed62e178b 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -4920,6 +4920,52 @@ class Interpretation extends Fields return $script . $getItem; } + public function setAdminViewDisplayMethod($viewName_list) + { + $script = ''; + if (isset($this->viewsDefaultOrdering[$viewName_list]) + && $this->viewsDefaultOrdering[$viewName_list]['add_admin_ordering'] + == 1) + { + // the first is from the state + $order_first = true; + foreach ( + $this->viewsDefaultOrdering[$viewName_list]['admin_ordering_fields'] + as $order_field + ) + { + if ($order_first && ($order_field_name = $this->getFieldDatabaseName( + $viewName_list, $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'));"; + } + return $script; + } + public function setCustomViewDisplayMethod(&$view) { $method = ''; @@ -14809,6 +14855,8 @@ class Interpretation extends Fields $query .= PHP_EOL . $this->_t(2) . "}"; $query .= PHP_EOL; } + // setup values for the view ordering + // add dynamic ordering (Admin view) if (isset($this->viewsDefaultOrdering[$viewName_list]) && $this->viewsDefaultOrdering[$viewName_list]['add_admin_ordering'] diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 2a8e1f10b..6e2e3ca9d 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -858,6 +858,11 @@ class Infusion extends Interpretation 'css_views', $viewName_single, '', null, true ); + // ADMIN_DIPLAY_METHOD <<>> + $this->fileContentDynamic[$viewName_list][$this->hhh + . 'ADMIN_DIPLAY_METHOD' . $this->hhh] + = $this->setAdminViewDisplayMethod($viewName_list); + // VIEWS_FOOTER_SCRIPT <<>> $scriptNote = PHP_EOL . '//' . $this->setLine(__LINE__) . ' ' . $viewName_list . ' footer script'; diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index fbcea1e85..35eecdbe0 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -322,7 +322,7 @@ class ComponentbuilderModelAdmin_views extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'DESC'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -369,7 +369,7 @@ class ComponentbuilderModelAdmin_views extends JModelList } // Order the results by ordering - $query->order('a.id DESC'); + $query->order('a.id desc'); // Load the items $db->setQuery($query); diff --git a/admin/models/class_methods.php b/admin/models/class_methods.php index 27c645746..0d9d4c9da 100644 --- a/admin/models/class_methods.php +++ b/admin/models/class_methods.php @@ -249,7 +249,7 @@ class ComponentbuilderModelClass_methods extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -296,7 +296,7 @@ class ComponentbuilderModelClass_methods extends JModelList } // Order the results by ordering - $query->order('a.ordering ASC'); + $query->order('a.id desc'); // Load the items $db->setQuery($query); diff --git a/admin/models/class_properties.php b/admin/models/class_properties.php index 9ad5aeb80..9e9befe8a 100644 --- a/admin/models/class_properties.php +++ b/admin/models/class_properties.php @@ -249,7 +249,7 @@ class ComponentbuilderModelClass_properties extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -296,7 +296,7 @@ class ComponentbuilderModelClass_properties extends JModelList } // Order the results by ordering - $query->order('a.ordering ASC'); + $query->order('a.id desc'); // Load the items $db->setQuery($query); diff --git a/admin/models/custom_admin_views.php b/admin/models/custom_admin_views.php index ffe5996bd..ede100835 100644 --- a/admin/models/custom_admin_views.php +++ b/admin/models/custom_admin_views.php @@ -263,7 +263,7 @@ class ComponentbuilderModelCustom_admin_views extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'DESC'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -310,7 +310,7 @@ class ComponentbuilderModelCustom_admin_views extends JModelList } // Order the results by ordering - $query->order('a.id DESC'); + $query->order('a.id desc'); // Load the items $db->setQuery($query); diff --git a/admin/models/custom_codes.php b/admin/models/custom_codes.php index abff27a4c..d9745bf2d 100644 --- a/admin/models/custom_codes.php +++ b/admin/models/custom_codes.php @@ -296,7 +296,7 @@ class ComponentbuilderModelCustom_codes extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'DESC'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -343,7 +343,7 @@ class ComponentbuilderModelCustom_codes extends JModelList } // Order the results by ordering - $query->order('a.id DESC'); + $query->order('a.id desc'); // Load the items $db->setQuery($query); diff --git a/admin/models/dynamic_gets.php b/admin/models/dynamic_gets.php index 178559d1f..91356cf03 100644 --- a/admin/models/dynamic_gets.php +++ b/admin/models/dynamic_gets.php @@ -246,7 +246,7 @@ class ComponentbuilderModelDynamic_gets extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'DESC'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -293,7 +293,7 @@ class ComponentbuilderModelDynamic_gets extends JModelList } // Order the results by ordering - $query->order('a.id DESC'); + $query->order('a.id desc'); // Load the items $db->setQuery($query); diff --git a/admin/models/fields.php b/admin/models/fields.php index 67ef89191..8eb0104d8 100644 --- a/admin/models/fields.php +++ b/admin/models/fields.php @@ -362,7 +362,7 @@ class ComponentbuilderModelFields extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'DESC'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -409,7 +409,7 @@ class ComponentbuilderModelFields extends JModelList } // Order the results by ordering - $query->order('a.id DESC'); + $query->order('a.id desc'); // Load the items $db->setQuery($query); diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index a0f861f07..6f2a6d7ce 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -2232,7 +2232,7 @@ class ComponentbuilderModelJoomla_components extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'DESC'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -2279,7 +2279,7 @@ class ComponentbuilderModelJoomla_components extends JModelList } // Order the results by ordering - $query->order('a.id DESC'); + $query->order('a.id desc'); // Load the items $db->setQuery($query); diff --git a/admin/models/joomla_modules.php b/admin/models/joomla_modules.php index cc77909a1..b9aea2804 100644 --- a/admin/models/joomla_modules.php +++ b/admin/models/joomla_modules.php @@ -222,7 +222,7 @@ class ComponentbuilderModelJoomla_modules extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'DESC'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/joomla_plugins.php b/admin/models/joomla_plugins.php index f4f0bc6a7..c121ad332 100644 --- a/admin/models/joomla_plugins.php +++ b/admin/models/joomla_plugins.php @@ -371,7 +371,7 @@ class ComponentbuilderModelJoomla_plugins extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'DESC'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/layouts.php b/admin/models/layouts.php index dbc8216ef..0c5bd8fe8 100644 --- a/admin/models/layouts.php +++ b/admin/models/layouts.php @@ -235,7 +235,7 @@ class ComponentbuilderModelLayouts extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'DESC'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -282,7 +282,7 @@ class ComponentbuilderModelLayouts extends JModelList } // Order the results by ordering - $query->order('a.id DESC'); + $query->order('a.id desc'); // Load the items $db->setQuery($query); diff --git a/admin/models/libraries.php b/admin/models/libraries.php index 68f17d7ce..4ed002386 100644 --- a/admin/models/libraries.php +++ b/admin/models/libraries.php @@ -277,7 +277,7 @@ class ComponentbuilderModelLibraries extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); diff --git a/admin/models/placeholders.php b/admin/models/placeholders.php index fea3b1493..6d191f790 100644 --- a/admin/models/placeholders.php +++ b/admin/models/placeholders.php @@ -181,7 +181,7 @@ class ComponentbuilderModelPlaceholders extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -228,7 +228,7 @@ class ComponentbuilderModelPlaceholders extends JModelList } // Order the results by ordering - $query->order('a.ordering ASC'); + $query->order('a.id desc'); // Load the items $db->setQuery($query); diff --git a/admin/models/site_views.php b/admin/models/site_views.php index dfc9a6f60..69207716f 100644 --- a/admin/models/site_views.php +++ b/admin/models/site_views.php @@ -267,7 +267,7 @@ class ComponentbuilderModelSite_views extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'DESC'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -314,7 +314,7 @@ class ComponentbuilderModelSite_views extends JModelList } // Order the results by ordering - $query->order('a.id DESC'); + $query->order('a.id desc'); // Load the items $db->setQuery($query); diff --git a/admin/models/snippets.php b/admin/models/snippets.php index 9222b1134..5fa27a5aa 100644 --- a/admin/models/snippets.php +++ b/admin/models/snippets.php @@ -323,7 +323,7 @@ class ComponentbuilderModelSnippets extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -370,7 +370,7 @@ class ComponentbuilderModelSnippets extends JModelList } // Order the results by ordering - $query->order('a.ordering ASC'); + $query->order('a.id desc'); // Load the items $db->setQuery($query); diff --git a/admin/models/templates.php b/admin/models/templates.php index 27ff093e0..ac562b4f4 100644 --- a/admin/models/templates.php +++ b/admin/models/templates.php @@ -235,7 +235,7 @@ class ComponentbuilderModelTemplates extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'DESC'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -282,7 +282,7 @@ class ComponentbuilderModelTemplates extends JModelList } // Order the results by ordering - $query->order('a.id DESC'); + $query->order('a.id desc'); // Load the items $db->setQuery($query); diff --git a/admin/models/validation_rules.php b/admin/models/validation_rules.php index 17bbfe287..b1dbca638 100644 --- a/admin/models/validation_rules.php +++ b/admin/models/validation_rules.php @@ -179,7 +179,7 @@ class ComponentbuilderModelValidation_rules extends JModelList // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -226,7 +226,7 @@ class ComponentbuilderModelValidation_rules extends JModelList } // Order the results by ordering - $query->order('a.ordering ASC'); + $query->order('a.id desc'); // Load the items $db->setQuery($query); diff --git a/admin/views/admin_views/view.html.php b/admin/views/admin_views/view.html.php index 98b3991a5..aa6cbd4fb 100644 --- a/admin/views/admin_views/view.html.php +++ b/admin/views/admin_views/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/admins_custom_tabs/view.html.php b/admin/views/admins_custom_tabs/view.html.php index 708346c78..826f01f50 100644 --- a/admin/views/admins_custom_tabs/view.html.php +++ b/admin/views/admins_custom_tabs/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewAdmins_custom_tabs extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 91706f7be..602d3b89d 100644 --- a/admin/views/admins_fields/view.html.php +++ b/admin/views/admins_fields/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 d166ad212..76e25b0c3 100644 --- a/admin/views/admins_fields_conditions/view.html.php +++ b/admin/views/admins_fields_conditions/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 5f35af011..836528945 100644 --- a/admin/views/admins_fields_relations/view.html.php +++ b/admin/views/admins_fields_relations/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewAdmins_fields_relations extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 e9853096c..280e3a8a4 100644 --- a/admin/views/class_extendings/view.html.php +++ b/admin/views/class_extendings/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewClass_extendings extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/class_methods/view.html.php b/admin/views/class_methods/view.html.php index 96ff4a12c..4c8fd1d21 100644 --- a/admin/views/class_methods/view.html.php +++ b/admin/views/class_methods/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewClass_methods extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/class_properties/view.html.php b/admin/views/class_properties/view.html.php index 7faa956be..23bbe8de1 100644 --- a/admin/views/class_properties/view.html.php +++ b/admin/views/class_properties/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewClass_properties extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == '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 6ba273c93..b2451a3b0 100644 --- a/admin/views/components_admin_views/view.html.php +++ b/admin/views/components_admin_views/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 0966e738e..b3193256b 100644 --- a/admin/views/components_config/view.html.php +++ b/admin/views/components_config/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewComponents_config extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 32af9aefb..7d3d238e6 100644 --- a/admin/views/components_custom_admin_menus/view.html.php +++ b/admin/views/components_custom_admin_menus/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 08ba68ee0..005aed9c6 100644 --- a/admin/views/components_custom_admin_views/view.html.php +++ b/admin/views/components_custom_admin_views/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 7c7af3922..b5b26ea2b 100644 --- a/admin/views/components_dashboard/view.html.php +++ b/admin/views/components_dashboard/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 4b2224669..394673df3 100644 --- a/admin/views/components_files_folders/view.html.php +++ b/admin/views/components_files_folders/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 615af532b..3fa8ec0e6 100644 --- a/admin/views/components_modules/view.html.php +++ b/admin/views/components_modules/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewComponents_modules extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 932590ef1..811e24274 100644 --- a/admin/views/components_mysql_tweaks/view.html.php +++ b/admin/views/components_mysql_tweaks/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 dfeab8055..1209ca0fe 100644 --- a/admin/views/components_placeholders/view.html.php +++ b/admin/views/components_placeholders/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewComponents_placeholders extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 26b8d5903..8e925e30b 100644 --- a/admin/views/components_plugins/view.html.php +++ b/admin/views/components_plugins/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewComponents_plugins extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 cf80cfcb0..91e959c01 100644 --- a/admin/views/components_site_views/view.html.php +++ b/admin/views/components_site_views/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 4462c30b8..c6761f65a 100644 --- a/admin/views/components_updates/view.html.php +++ b/admin/views/components_updates/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 36156be68..e040d422f 100644 --- a/admin/views/custom_admin_views/view.html.php +++ b/admin/views/custom_admin_views/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/custom_codes/view.html.php b/admin/views/custom_codes/view.html.php index 552e98085..18976f197 100644 --- a/admin/views/custom_codes/view.html.php +++ b/admin/views/custom_codes/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/dynamic_gets/view.html.php b/admin/views/dynamic_gets/view.html.php index 078941359..32a81413e 100644 --- a/admin/views/dynamic_gets/view.html.php +++ b/admin/views/dynamic_gets/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/fields/view.html.php b/admin/views/fields/view.html.php index 23d5bb351..2beec06b4 100644 --- a/admin/views/fields/view.html.php +++ b/admin/views/fields/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewFields extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/fieldtypes/view.html.php b/admin/views/fieldtypes/view.html.php index 8e9b92677..075cdb23f 100644 --- a/admin/views/fieldtypes/view.html.php +++ b/admin/views/fieldtypes/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 467b0d682..6ddfa8ba3 100644 --- a/admin/views/help_documents/view.html.php +++ b/admin/views/help_documents/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/joomla_components/view.html.php b/admin/views/joomla_components/view.html.php index 0cf4685f3..00036299d 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/joomla_modules/view.html.php b/admin/views/joomla_modules/view.html.php index 7ece0f897..f4e5fc7ee 100644 --- a/admin/views/joomla_modules/view.html.php +++ b/admin/views/joomla_modules/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewJoomla_modules extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); 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 12e7ca417..387682196 100644 --- a/admin/views/joomla_modules_files_folders_urls/view.html.php +++ b/admin/views/joomla_modules_files_folders_urls/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewJoomla_modules_files_folders_urls extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 f9d4a397c..d5b90296e 100644 --- a/admin/views/joomla_modules_updates/view.html.php +++ b/admin/views/joomla_modules_updates/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewJoomla_modules_updates extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 a7a0f3363..378fdc96d 100644 --- a/admin/views/joomla_plugin_groups/view.html.php +++ b/admin/views/joomla_plugin_groups/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewJoomla_plugin_groups extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/joomla_plugins/view.html.php b/admin/views/joomla_plugins/view.html.php index 41b2f5172..1d98c0306 100644 --- a/admin/views/joomla_plugins/view.html.php +++ b/admin/views/joomla_plugins/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewJoomla_plugins extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); 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 0b290303e..1bf5a9ff3 100644 --- a/admin/views/joomla_plugins_files_folders_urls/view.html.php +++ b/admin/views/joomla_plugins_files_folders_urls/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewJoomla_plugins_files_folders_urls extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 3ef8b0799..5ed43dc26 100644 --- a/admin/views/joomla_plugins_updates/view.html.php +++ b/admin/views/joomla_plugins_updates/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewJoomla_plugins_updates extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 2da83ae01..95b430c3f 100644 --- a/admin/views/language_translations/view.html.php +++ b/admin/views/language_translations/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 9b5d2975f..71dd8b38d 100644 --- a/admin/views/languages/view.html.php +++ b/admin/views/languages/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewLanguages extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 5dd02db03..6bd7ac34c 100644 --- a/admin/views/layouts/view.html.php +++ b/admin/views/layouts/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewLayouts extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/libraries/view.html.php b/admin/views/libraries/view.html.php index 4ba226444..7f906a1d4 100644 --- a/admin/views/libraries/view.html.php +++ b/admin/views/libraries/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewLibraries extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/libraries_config/view.html.php b/admin/views/libraries_config/view.html.php index cb0a34798..e6acdf78a 100644 --- a/admin/views/libraries_config/view.html.php +++ b/admin/views/libraries_config/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 449e59aba..37a901234 100644 --- a/admin/views/libraries_files_folders_urls/view.html.php +++ b/admin/views/libraries_files_folders_urls/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/placeholders/view.html.php b/admin/views/placeholders/view.html.php index 56c0a74f6..e2eaa3655 100644 --- a/admin/views/placeholders/view.html.php +++ b/admin/views/placeholders/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewPlaceholders extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == '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 e3e0275bf..2283ddf6c 100644 --- a/admin/views/servers/view.html.php +++ b/admin/views/servers/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewServers extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 6b959f2b0..6d51fc227 100644 --- a/admin/views/site_views/view.html.php +++ b/admin/views/site_views/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewSite_views extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/snippet_types/view.html.php b/admin/views/snippet_types/view.html.php index 54cfe563a..9532233d7 100644 --- a/admin/views/snippet_types/view.html.php +++ b/admin/views/snippet_types/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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->saveOrder = $this->listOrder == '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 1a9f73527..e4b62e813 100644 --- a/admin/views/snippets/view.html.php +++ b/admin/views/snippets/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewSnippets extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/templates/view.html.php b/admin/views/templates/view.html.php index f0046359d..3c4de15bb 100644 --- a/admin/views/templates/view.html.php +++ b/admin/views/templates/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewTemplates extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/admin/views/validation_rules/view.html.php b/admin/views/validation_rules/view.html.php index 872d4216b..3005c815c 100644 --- a/admin/views/validation_rules/view.html.php +++ b/admin/views/validation_rules/view.html.php @@ -33,9 +33,10 @@ class ComponentbuilderViewValidation_rules extends JViewLegacy $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); + $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', 'desc')); $this->saveOrder = $this->listOrder == 'ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); diff --git a/componentbuilder.xml b/componentbuilder.xml index a59fc8a37..366966b47 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 21st May, 2020 + 22nd May, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com -- 2.40.1 From eda4d594d68a268e794eef725e2987abae3fbea1 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sun, 24 May 2020 23:59:55 +0200 Subject: [PATCH 4/4] Impoved the update server naming ability. --- admin/helpers/compiler/e_Interpretation.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index ed62e178b..1182eb8c8 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -1177,13 +1177,12 @@ class Interpretation extends Fields { $updateXML[] = ''; // UPDATE_SERVER_XML - $name = str_replace( - '.xml', '', substr( + $name = substr( $this->componentData->update_server_url, strrpos($this->componentData->update_server_url, '/') + 1 - ) - ); + ); + $name = explode('.xml', $name)[0]; $target = array('admin' => $name); $this->buildDynamique($target, 'update_server'); $this->fileContentDynamic[$name][$this->hhh -- 2.40.1