From 5c956e1e22a496191a3836c37eee7fea527964b1 Mon Sep 17 00:00:00 2001 From: Yann Gomiero Date: Wed, 21 Aug 2024 08:47:51 +0200 Subject: [PATCH] 5.1.3 --- README.md | 6 +- README.txt | 3 - .../src/Controller/DisplayController.php | 2 +- administrator/components/com_admin/script.php | 17 + .../com_content/src/Field/VotelistField.php | 2 +- .../com_content/src/Field/VoteradioField.php | 2 +- .../src/View/Articles/HtmlView.php | 1 - .../com_fields/src/Field/FieldLayoutField.php | 6 +- .../com_fields/src/Model/GroupsModel.php | 2 +- .../com_finder/tmpl/index/default.php | 2 +- .../com_finder/tmpl/index/emptystate.php | 2 +- .../com_menus/src/View/Menu/XmlView.php | 42 +- .../com_messages/tmpl/message/default.php | 3 +- .../com_redirect/tmpl/links/default.php | 2 +- .../com_redirect/tmpl/links/emptystate.php | 2 +- .../components/com_users/src/Helper/Mfa.php | 2 +- .../com_users/src/Model/UserModel.php | 11 +- administrator/language/en-GB/install.xml | 4 +- administrator/language/en-GB/langmetadata.xml | 4 +- .../language/fr-FR/com_joomlaupdate.ini | 4 +- administrator/language/fr-FR/install.xml | 4 +- administrator/language/fr-FR/langmetadata.xml | 4 +- administrator/manifests/files/joomla.xml | 4 +- .../manifests/packages/pkg_en-GB.xml | 4 +- .../manifests/packages/pkg_fr-FR.xml | 8 +- api/language/en-GB/install.xml | 4 +- api/language/en-GB/langmetadata.xml | 4 +- api/language/fr-FR/install.xml | 4 +- api/language/fr-FR/langmetadata.xml | 4 +- .../src/Controller/ContactController.php | 1 + .../com_users/src/Model/ProfileModel.php | 2 +- .../com_users/src/Model/RegistrationModel.php | 3 +- installation/language/af-ZA/langmetadata.xml | 2 +- installation/language/ar-AA/langmetadata.xml | 2 +- installation/language/be-BY/langmetadata.xml | 2 +- installation/language/bg-BG/langmetadata.xml | 2 +- installation/language/ca-ES/langmetadata.xml | 2 +- installation/language/cs-CZ/langmetadata.xml | 2 +- installation/language/cy-GB/langmetadata.xml | 2 +- installation/language/da-DK/langmetadata.xml | 2 +- installation/language/de-AT/langmetadata.xml | 4 +- installation/language/de-CH/langmetadata.xml | 4 +- installation/language/de-LI/langmetadata.xml | 4 +- installation/language/de-LU/langmetadata.xml | 4 +- installation/language/el-GR/langmetadata.xml | 2 +- installation/language/en-AU/langmetadata.xml | 2 +- installation/language/en-CA/langmetadata.xml | 2 +- installation/language/en-GB/langmetadata.xml | 4 +- installation/language/en-NZ/langmetadata.xml | 2 +- installation/language/en-US/langmetadata.xml | 2 +- installation/language/es-ES/langmetadata.xml | 2 +- installation/language/et-EE/langmetadata.xml | 2 +- installation/language/eu-ES/langmetadata.xml | 2 +- installation/language/fa-AF/langmetadata.xml | 2 +- installation/language/fa-IR/langmetadata.xml | 2 +- installation/language/fi-FI/langmetadata.xml | 2 +- installation/language/fr-CA/langmetadata.xml | 2 +- installation/language/fr-FR/langmetadata.xml | 2 +- installation/language/he-IL/langmetadata.xml | 2 +- installation/language/hr-HR/langmetadata.xml | 2 +- installation/language/hu-HU/langmetadata.xml | 2 +- installation/language/id-ID/langmetadata.xml | 2 +- installation/language/it-IT/langmetadata.xml | 2 +- installation/language/ja-JP/langmetadata.xml | 2 +- installation/language/ka-GE/langmetadata.xml | 2 +- installation/language/kk-KZ/langmetadata.xml | 2 +- installation/language/ko-KR/langmetadata.xml | 2 +- installation/language/lt-LT/langmetadata.xml | 2 +- installation/language/lv-LV/langmetadata.xml | 2 +- installation/language/mk-MK/langmetadata.xml | 2 +- installation/language/nl-BE/langmetadata.xml | 2 +- installation/language/nl-NL/langmetadata.xml | 2 +- installation/language/pl-PL/langmetadata.xml | 2 +- installation/language/pt-BR/joomla.ini | 2 +- installation/language/pt-BR/langmetadata.xml | 6 +- installation/language/pt-PT/langmetadata.xml | 2 +- installation/language/ro-RO/langmetadata.xml | 2 +- installation/language/sk-SK/langmetadata.xml | 2 +- installation/language/sl-SI/langmetadata.xml | 2 +- installation/language/sr-YU/langmetadata.xml | 2 +- installation/language/sv-SE/langmetadata.xml | 2 +- installation/language/ta-IN/langmetadata.xml | 2 +- installation/language/th-TH/langmetadata.xml | 2 +- installation/language/tr-TR/langmetadata.xml | 2 +- installation/language/uk-UA/langmetadata.xml | 2 +- installation/language/ur-PK/langmetadata.xml | 10 +- installation/language/vi-VN/langmetadata.xml | 2 +- installation/language/zh-CN/joomla.ini | 6 +- installation/language/zh-CN/langmetadata.xml | 2 +- installation/language/zh-TW/langmetadata.xml | 2 +- installation/sql/mysql/localise.sql | 2 +- .../Form/Field/Installation/LanguageField.php | 2 +- language/en-GB/install.xml | 4 +- language/en-GB/langmetadata.xml | 4 +- language/fr-FR/install.xml | 4 +- language/fr-FR/langmetadata.xml | 4 +- .../form/field/modal-select/buttons.php | 6 +- layouts/joomla/form/field/text.php | 2 +- libraries/src/Captcha/Captcha.php | 6 +- .../src/Console/CheckJoomlaUpdatesCommand.php | 1 - .../src/Console/CoreUpdateChannelCommand.php | 7 +- libraries/src/Console/TasksListCommand.php | 15 +- .../Document/Renderer/Html/HeadRenderer.php | 9 +- libraries/src/Form/Field/SqlField.php | 13 +- libraries/src/Form/Field/TransitionField.php | 2 +- .../src/Form/Field/WorkflowconditionField.php | 2 +- .../src/Form/Field/WorkflowstageField.php | 2 +- libraries/src/Form/FormField.php | 2 +- libraries/src/Form/FormRule.php | 2 +- libraries/src/Form/Rule/SubFormRule.php | 2 +- libraries/src/Mail/Mail.php | 14 +- libraries/src/Mail/MailTemplate.php | 51 +- libraries/src/Pagination/Pagination.php | 46 +- libraries/src/Service/Provider/Session.php | 6 +- libraries/src/Uri/Uri.php | 4 +- libraries/src/Version.php | 4 +- libraries/vendor/autoload.php | 2 +- .../vendor/composer/InstalledVersions.php | 4 +- libraries/vendor/composer/LICENSE | 2 - libraries/vendor/composer/autoload_real.php | 10 +- libraries/vendor/composer/autoload_static.php | 8 +- libraries/vendor/composer/installed.json | 208 +-- libraries/vendor/composer/installed.php | 86 +- .../application/src/AbstractApplication.php | 2 +- .../src/AbstractWebApplication.php | 8 +- .../joomla/application/src/WebApplication.php | 16 +- .../src/Descriptor/ApplicationDescription.php | 4 +- .../joomla/data/src/DumpableInterface.php | 2 +- .../database/src/Command/ExportCommand.php | 17 +- .../joomla/database/src/DatabaseDriver.php | 2 +- .../joomla/database/src/DatabaseQuery.php | 2 +- .../Exception/ConnectionFailureException.php | 2 +- .../Exception/ExecutionFailureException.php | 2 +- .../PrepareStatementFailureException.php | 2 +- .../joomla/database/src/Mysql/MysqlDriver.php | 4 +- .../database/src/Mysqli/MysqliDriver.php | 4 +- .../database/src/Mysqli/MysqliStatement.php | 18 +- .../database/src/Query/MysqlQueryBuilder.php | 9 + .../joomla/database/src/QueryInterface.php | 2 +- .../database/src/Sqlsrv/SqlsrvDriver.php | 2 + .../database/src/Sqlsrv/SqlsrvStatement.php | 16 +- .../src/Exception/FilesystemException.php | 2 +- .../vendor/joomla/filesystem/src/File.php | 3 +- .../vendor/joomla/filesystem/src/Folder.php | 9 +- .../vendor/joomla/filesystem/src/Path.php | 4 + .../vendor/joomla/filter/src/InputFilter.php | 113 +- .../vendor/joomla/filter/src/OutputFilter.php | 12 +- .../vendor/joomla/session/src/Session.php | 14 +- .../session/src/Storage/NativeStorage.php | 6 +- .../vendor/joomla/string/src/StringHelper.php | 4 +- media/com_associations/joomla.asset.json | 24 +- media/com_content/joomla.asset.json | 34 +- media/com_fields/joomla.asset.json | 12 +- media/com_finder/joomla.asset.json | 24 +- media/com_languages/joomla.asset.json | 12 +- media/com_menus/joomla.asset.json | 62 +- media/com_modules/joomla.asset.json | 16 +- media/com_scheduler/joomla.asset.json | 24 +- media/com_users/joomla.asset.json | 12 +- .../plg_editors_codemirror/joomla.asset.json | 12 +- media/system/css/system-site-general.css | 14 +- media/system/css/system-site-general.min.css | 2 +- .../system/css/system-site-general.min.css.gz | Bin 672 -> 673 bytes media/system/joomla.asset.json | 220 +-- media/system/js/core.js | 324 ++-- media/system/js/core.min.js | 5 +- media/system/js/core.min.js.gz | Bin 3173 -> 3242 bytes .../system/js/fields/joomla-field-subform.js | 22 +- .../js/fields/joomla-field-subform.min.js | 2 +- .../js/fields/joomla-field-subform.min.js.gz | Bin 2477 -> 2494 bytes .../js/fields/modal-content-select-field.js | 11 +- .../fields/modal-content-select-field.min.js | 4 +- .../modal-content-select-field.min.js.gz | Bin 1155 -> 1183 bytes media/system/js/fields/validate.js | 1468 +++++++++-------- media/system/js/fields/validate.min.js | 4 +- media/system/js/fields/validate.min.js.gz | Bin 3235 -> 3112 bytes media/system/js/multiselect.js | 4 +- media/system/js/multiselect.min.js | 2 +- media/system/js/multiselect.min.js.gz | Bin 928 -> 915 bytes media/system/js/showon.js | 2 +- .../administrator/atum/css/template-rtl.css | 8 +- .../atum/css/template-rtl.min.css | 2 +- .../atum/css/template-rtl.min.css.gz | Bin 52414 -> 52414 bytes .../administrator/atum/css/template.css | 8 +- .../administrator/atum/css/template.min.css | 2 +- .../atum/css/template.min.css.gz | Bin 52396 -> 52397 bytes .../atum/css/vendor/minicolors/minicolors.css | 2 +- .../css/vendor/minicolors/minicolors.min.css | 2 +- .../vendor/minicolors/minicolors.min.css.gz | Bin 1605 -> 1606 bytes .../administrator/atum/js/template.js | 17 + .../administrator/atum/js/template.min.js | 2 +- .../administrator/atum/js/template.min.js.gz | Bin 1807 -> 1907 bytes .../site/cassiopeia/css/template-rtl.css | 8 + .../site/cassiopeia/css/template-rtl.min.css | 2 +- .../cassiopeia/css/template-rtl.min.css.gz | Bin 38832 -> 38844 bytes .../site/cassiopeia/css/template.css | 8 + .../site/cassiopeia/css/template.min.css | 2 +- .../site/cassiopeia/css/template.min.css.gz | Bin 38838 -> 38852 bytes .../site/cassiopeia/scss/blocks/_header.scss | 4 + .../site/cassiopeia/scss/blocks/_toolbar.scss | 4 + media/vendor/joomla.asset.json | 216 +-- media/vendor/sa11y/css/sa11y.min.css | 2 +- media/vendor/sa11y/css/sa11y.min.css.gz | Bin 3567 -> 3567 bytes media/vendor/tinymce/models/dom/model.js | 2 +- media/vendor/tinymce/models/dom/model.min.js | 2 +- .../vendor/tinymce/models/dom/model.min.js.gz | Bin 32770 -> 32771 bytes .../tinymce/plugins/accordion/plugin.js | 2 +- .../tinymce/plugins/accordion/plugin.min.js | 2 +- .../plugins/accordion/plugin.min.js.gz | Bin 5144 -> 5144 bytes .../vendor/tinymce/plugins/advlist/plugin.js | 2 +- .../tinymce/plugins/advlist/plugin.min.js | 2 +- .../tinymce/plugins/advlist/plugin.min.js.gz | Bin 1602 -> 1605 bytes media/vendor/tinymce/plugins/anchor/plugin.js | 2 +- .../tinymce/plugins/anchor/plugin.min.js | 2 +- .../tinymce/plugins/anchor/plugin.min.js.gz | Bin 1316 -> 1316 bytes .../vendor/tinymce/plugins/autolink/plugin.js | 2 +- .../tinymce/plugins/autolink/plugin.min.js | 2 +- .../tinymce/plugins/autolink/plugin.min.js.gz | Bin 1672 -> 1673 bytes .../tinymce/plugins/autoresize/plugin.js | 2 +- .../tinymce/plugins/autoresize/plugin.min.js | 2 +- .../plugins/autoresize/plugin.min.js.gz | Bin 1185 -> 1186 bytes .../vendor/tinymce/plugins/autosave/plugin.js | 2 +- .../tinymce/plugins/autosave/plugin.min.js | 2 +- .../tinymce/plugins/autosave/plugin.min.js.gz | Bin 1421 -> 1422 bytes .../vendor/tinymce/plugins/charmap/plugin.js | 2 +- .../tinymce/plugins/charmap/plugin.min.js | 2 +- .../tinymce/plugins/charmap/plugin.min.js.gz | Bin 4482 -> 4482 bytes media/vendor/tinymce/plugins/code/plugin.js | 2 +- .../vendor/tinymce/plugins/code/plugin.min.js | 2 +- .../tinymce/plugins/code/plugin.min.js.gz | Bin 505 -> 506 bytes .../tinymce/plugins/codesample/plugin.js | 2 +- .../tinymce/plugins/codesample/plugin.min.js | 2 +- .../plugins/codesample/plugin.min.js.gz | Bin 15677 -> 15677 bytes .../tinymce/plugins/directionality/plugin.js | 2 +- .../plugins/directionality/plugin.min.js | 2 +- .../plugins/directionality/plugin.min.js.gz | Bin 1937 -> 1937 bytes .../tinymce/plugins/emoticons/plugin.js | 2 +- .../tinymce/plugins/emoticons/plugin.min.js | 2 +- .../plugins/emoticons/plugin.min.js.gz | Bin 2825 -> 2825 bytes .../tinymce/plugins/fullscreen/plugin.js | 2 +- .../tinymce/plugins/fullscreen/plugin.min.js | 2 +- .../plugins/fullscreen/plugin.min.js.gz | Bin 5895 -> 5896 bytes media/vendor/tinymce/plugins/help/plugin.js | 2 +- .../vendor/tinymce/plugins/help/plugin.min.js | 2 +- .../tinymce/plugins/help/plugin.min.js.gz | Bin 3966 -> 3967 bytes media/vendor/tinymce/plugins/image/plugin.js | 2 +- .../tinymce/plugins/image/plugin.min.js | 2 +- .../tinymce/plugins/image/plugin.min.js.gz | Bin 6907 -> 6907 bytes .../tinymce/plugins/importcss/plugin.js | 2 +- .../tinymce/plugins/importcss/plugin.min.js | 2 +- .../plugins/importcss/plugin.min.js.gz | Bin 1898 -> 1898 bytes .../tinymce/plugins/insertdatetime/plugin.js | 2 +- .../plugins/insertdatetime/plugin.min.js | 2 +- .../plugins/insertdatetime/plugin.min.js.gz | Bin 1287 -> 1287 bytes media/vendor/tinymce/plugins/link/plugin.js | 2 +- .../vendor/tinymce/plugins/link/plugin.min.js | 2 +- .../tinymce/plugins/link/plugin.min.js.gz | Bin 5876 -> 5877 bytes media/vendor/tinymce/plugins/lists/plugin.js | 2 +- .../tinymce/plugins/lists/plugin.min.js | 2 +- .../tinymce/plugins/lists/plugin.min.js.gz | Bin 9907 -> 9907 bytes media/vendor/tinymce/plugins/media/plugin.js | 2 +- .../tinymce/plugins/media/plugin.min.js | 2 +- .../tinymce/plugins/media/plugin.min.js.gz | Bin 6267 -> 6267 bytes .../tinymce/plugins/nonbreaking/plugin.js | 2 +- .../tinymce/plugins/nonbreaking/plugin.min.js | 2 +- .../plugins/nonbreaking/plugin.min.js.gz | Bin 793 -> 794 bytes .../tinymce/plugins/pagebreak/plugin.js | 2 +- .../tinymce/plugins/pagebreak/plugin.min.js | 2 +- .../plugins/pagebreak/plugin.min.js.gz | Bin 883 -> 884 bytes .../vendor/tinymce/plugins/preview/plugin.js | 2 +- .../tinymce/plugins/preview/plugin.min.js | 2 +- .../tinymce/plugins/preview/plugin.min.js.gz | Bin 945 -> 945 bytes .../tinymce/plugins/quickbars/plugin.js | 2 +- .../tinymce/plugins/quickbars/plugin.min.js | 2 +- .../plugins/quickbars/plugin.min.js.gz | Bin 2227 -> 2226 bytes media/vendor/tinymce/plugins/save/plugin.js | 2 +- .../vendor/tinymce/plugins/save/plugin.min.js | 2 +- .../tinymce/plugins/save/plugin.min.js.gz | Bin 737 -> 737 bytes .../tinymce/plugins/searchreplace/plugin.js | 2 +- .../plugins/searchreplace/plugin.min.js | 2 +- .../plugins/searchreplace/plugin.min.js.gz | Bin 5537 -> 5537 bytes media/vendor/tinymce/plugins/table/plugin.js | 2 +- .../tinymce/plugins/table/plugin.min.js | 2 +- .../tinymce/plugins/table/plugin.min.js.gz | Bin 14115 -> 14116 bytes .../tinymce/plugins/visualblocks/plugin.js | 2 +- .../plugins/visualblocks/plugin.min.js | 2 +- .../plugins/visualblocks/plugin.min.js.gz | Bin 584 -> 584 bytes .../tinymce/plugins/visualchars/plugin.js | 2 +- .../tinymce/plugins/visualchars/plugin.min.js | 2 +- .../plugins/visualchars/plugin.min.js.gz | Bin 2492 -> 2493 bytes .../tinymce/plugins/wordcount/plugin.js | 2 +- .../tinymce/plugins/wordcount/plugin.min.js | 2 +- .../plugins/wordcount/plugin.min.js.gz | Bin 5274 -> 5274 bytes media/vendor/tinymce/themes/silver/theme.js | 2 +- .../vendor/tinymce/themes/silver/theme.min.js | 2 +- .../tinymce/themes/silver/theme.min.js.gz | Bin 133867 -> 133868 bytes media/vendor/tinymce/tinymce.js | 39 +- media/vendor/tinymce/tinymce.min.js | 4 +- media/vendor/tinymce/tinymce.min.js.gz | Bin 151338 -> 151342 bytes plugins/content/vote/tmpl/rating.php | 15 +- plugins/editors/tinymce/tinymce.xml | 2 +- .../schemaorg/src/Extension/Schemaorg.php | 53 +- plugins/system/webauthn/fido.jwt | 2 +- plugins/user/joomla/src/Extension/Joomla.php | 1 + 304 files changed, 2151 insertions(+), 1818 deletions(-) diff --git a/README.md b/README.md index e226128d6d..135ecc4c71 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -# AFUJ: Joomla! CMS™ - Version 5.1.2 avec pack fr-FR +# AFUJ: Joomla! CMS™ - Version 5.1.3 avec pack fr-FR ![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/AFUJ/joomla-cms-fr?color=green&include_prereleases&label=release&style=for-the-badge) ## DESCRIPTION -La version 5.1.2 de Joomla! incluant le pack de langue fr-FR et des traductions d'éléments à l'installation +La version 5.1.3 de Joomla! incluant le pack de langue fr-FR et des traductions d'éléments à l'installation ## 1- Aperçu -* Ceci est un package d'installation 5.1.1 francisé. +* Ceci est un package d'installation 5.1.3 francisé. * Site officiel de Joomla! : (https://www.joomla.org) * Historique des versions Joomla! 5.1 - [https://docs.joomla.org/Special:MyLanguage/Joomla_5.1_version_history](https://docs.joomla.org/Special:MyLanguage/Joomla_5.1_version_history) * Modifications détaillées dans le journal des modifications : [https://github.com/joomla/joomla-cms/commits/5.1-dev](https://github.com/joomla/joomla-cms/commits/5.1-dev) diff --git a/README.txt b/README.txt index f925b88e42..a55712c2ab 100644 --- a/README.txt +++ b/README.txt @@ -1,8 +1,5 @@ Joomla! CMS™ -The Joomla! 5.1 branch is under heavy development and not all links in this document are available yet ------------------------------------------------------------------------------------------------------- - 1- Overview * This is a Joomla! 5.x installation/upgrade package. * Joomla! Official site: https://www.joomla.org diff --git a/administrator/components/com_actionlogs/src/Controller/DisplayController.php b/administrator/components/com_actionlogs/src/Controller/DisplayController.php index 7493052e2d..999dde7fe4 100644 --- a/administrator/components/com_actionlogs/src/Controller/DisplayController.php +++ b/administrator/components/com_actionlogs/src/Controller/DisplayController.php @@ -17,7 +17,7 @@ // phpcs:enable PSR1.Files.SideEffects /** - * Plugins display controller. + * Actionlogs display controller. * * @since 4.0.0 */ diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index 8932fd19a5..fbd3585fd7 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -2333,6 +2333,23 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) '/libraries/vendor/cweagans/composer-patches/src/Patches.php', '/libraries/vendor/cweagans/composer-patches/tests/PatchEventTest.php', '/libraries/vendor/laminas/laminas-diactoros/PATCHES.txt', + // From 5.1.2 to 5.1.3 + '/libraries/vendor/joomla/application/rector.php', + '/libraries/vendor/joomla/console/.drone.jsonnet', + '/libraries/vendor/joomla/console/.drone.yml', + '/libraries/vendor/joomla/database/.drone.jsonnet', + '/libraries/vendor/joomla/database/.drone.yml', + '/libraries/vendor/joomla/database/phpunit.appveyor_sql2012sp1.xml.dist', + '/libraries/vendor/joomla/database/phpunit.appveyor_sql2014.xml.dist', + '/libraries/vendor/joomla/database/phpunit.appveyor_sql2017.xml.dist', + '/libraries/vendor/joomla/database/phpunit.mariadb.xml.dist', + '/libraries/vendor/joomla/database/phpunit.mysql.xml.dist', + '/libraries/vendor/joomla/database/phpunit.mysqli.xml.dist', + '/libraries/vendor/joomla/database/phpunit.pgsql.xml.dist', + '/libraries/vendor/joomla/database/phpunit.sqlite.xml.dist', + '/libraries/vendor/joomla/database/phpunit.sqlsrv.xml.dist', + '/libraries/vendor/joomla/session/.drone.jsonnet', + '/libraries/vendor/joomla/session/.drone.yml', ]; $folders = [ diff --git a/administrator/components/com_content/src/Field/VotelistField.php b/administrator/components/com_content/src/Field/VotelistField.php index 35ab56c415..7fc097a6d4 100644 --- a/administrator/components/com_content/src/Field/VotelistField.php +++ b/administrator/components/com_content/src/Field/VotelistField.php @@ -37,7 +37,7 @@ class VotelistField extends ListField * * @param \SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. + * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * diff --git a/administrator/components/com_content/src/Field/VoteradioField.php b/administrator/components/com_content/src/Field/VoteradioField.php index 5e02579a8b..8c654138ec 100644 --- a/administrator/components/com_content/src/Field/VoteradioField.php +++ b/administrator/components/com_content/src/Field/VoteradioField.php @@ -37,7 +37,7 @@ class VoteradioField extends RadioField * * @param \SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. + * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * diff --git a/administrator/components/com_content/src/View/Articles/HtmlView.php b/administrator/components/com_content/src/View/Articles/HtmlView.php index fd8be990c4..5662aa0597 100644 --- a/administrator/components/com_content/src/View/Articles/HtmlView.php +++ b/administrator/components/com_content/src/View/Articles/HtmlView.php @@ -234,7 +234,6 @@ protected function addToolbar() if ( $user->authorise('core.create', 'com_content') && $user->authorise('core.edit', 'com_content') - && $user->authorise('core.execute.transition', 'com_content') ) { $childBar->popupButton('batch', 'JTOOLBAR_BATCH') ->popupType('inline') diff --git a/administrator/components/com_fields/src/Field/FieldLayoutField.php b/administrator/components/com_fields/src/Field/FieldLayoutField.php index 4eb681fd17..95216b097e 100644 --- a/administrator/components/com_fields/src/Field/FieldLayoutField.php +++ b/administrator/components/com_fields/src/Field/FieldLayoutField.php @@ -56,9 +56,9 @@ protected function getInput() // Build the query. $query->select('element, name') ->from('#__extensions') - ->where('client_id = 0') - ->where('type = ' . $db->quote('template')) - ->where('enabled = 1'); + ->where($db->quoteName('client_id') . ' = 0') + ->where($db->quoteName('type') . ' = ' . $db->quote('template')) + ->where($db->quoteName('enabled') . ' = 1'); // Set the query and load the templates. $db->setQuery($query); diff --git a/administrator/components/com_fields/src/Model/GroupsModel.php b/administrator/components/com_fields/src/Model/GroupsModel.php index 725c0d2252..930a3666c8 100644 --- a/administrator/components/com_fields/src/Model/GroupsModel.php +++ b/administrator/components/com_fields/src/Model/GroupsModel.php @@ -189,7 +189,7 @@ protected function getListQuery() if (stripos($search, 'id:') === 0) { $search = (int) substr($search, 3); $query->where($db->quoteName('a.id') . ' = :search') - ->bind(':id', $search, ParameterType::INTEGER); + ->bind(':search', $search, ParameterType::INTEGER); } else { $search = '%' . str_replace(' ', '%', trim($search)) . '%'; $query->where($db->quoteName('a.title') . ' LIKE :search') diff --git a/administrator/components/com_finder/tmpl/index/default.php b/administrator/components/com_finder/tmpl/index/default.php index 9143f27f49..d78b9863f8 100644 --- a/administrator/components/com_finder/tmpl/index/default.php +++ b/administrator/components/com_finder/tmpl/index/default.php @@ -43,7 +43,7 @@ Text::_('COM_FINDER_CONTENT_PLUGIN'), [ 'class' => 'alert-link', - 'data-joomla-dialog' => $this->escape(json_encode($popupOptions, JSON_UNESCAPED_SLASHES)), + 'data-joomla-dialog' => $this->escape(json_encode($popupOptions, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)), 'data-checkin-url' => Route::_('index.php?option=com_plugins&task=plugins.checkin&format=json&cid[]=' . $this->finderPluginId), 'data-close-on-message' => '', 'data-reload-on-close' => '', diff --git a/administrator/components/com_finder/tmpl/index/emptystate.php b/administrator/components/com_finder/tmpl/index/emptystate.php index c9c117274d..c05eaf8243 100644 --- a/administrator/components/com_finder/tmpl/index/emptystate.php +++ b/administrator/components/com_finder/tmpl/index/emptystate.php @@ -47,7 +47,7 @@ Text::_('COM_FINDER_CONTENT_PLUGIN'), [ 'class' => 'alert-link', - 'data-joomla-dialog' => $this->escape(json_encode($popupOptions, JSON_UNESCAPED_SLASHES)), + 'data-joomla-dialog' => $this->escape(json_encode($popupOptions, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)), 'data-checkin-url' => Route::_('index.php?option=com_plugins&task=plugins.checkin&format=json&cid[]=' . $this->finderPluginId), 'data-close-on-message' => '', 'data-reload-on-close' => '', diff --git a/administrator/components/com_menus/src/View/Menu/XmlView.php b/administrator/components/com_menus/src/View/Menu/XmlView.php index 147531c416..10df5a2367 100644 --- a/administrator/components/com_menus/src/View/Menu/XmlView.php +++ b/administrator/components/com_menus/src/View/Menu/XmlView.php @@ -115,22 +115,22 @@ protected function addXmlChild($xml, $item) { $node = $xml->addChild('menuitem'); - $node['type'] = $item->type; - if ($item->title) { $node['title'] = htmlentities($item->title, ENT_XML1); } - if ($item->link) { - $node['link'] = $item->link; - } + $node['type'] = $item->type; if ($item->element) { $node['element'] = $item->element; } - if (isset($item->class) && $item->class) { - $node['class'] = htmlentities($item->class, ENT_XML1); + if ($item->link) { + $node['link'] = $item->link; + } + + if (isset($item->class) && trim($item->class)) { + $node['class'] = htmlentities(trim($item->class), ENT_XML1); } if ($item->access) { @@ -141,6 +141,34 @@ protected function addXmlChild($xml, $item) $node['target'] = '_blank'; } + if ($item->getParams()->get('ajax-badge')) { + $node['ajax-badge'] = $item->getParams()->get('ajax-badge'); + } + + if ($item->icon) { + $node['icon'] = $item->icon; + } + + if ($item->getParams()->get('menu-quicktask')) { + $node['quicktask'] = $item->getParams()->get('menu-quicktask'); + + if ($item->getParams()->get('menu-quicktask-title')) { + $node['quicktask-title'] = $item->getParams()->get('menu-quicktask-title'); + } + + if ($item->getParams()->get('menu-quicktask-icon')) { + $node['quicktask-icon'] = $item->getParams()->get('menu-quicktask-icon'); + } + + if ($item->getParams()->get('menu-quicktask-permission')) { + $node['quicktask-permission'] = $item->getParams()->get('menu-quicktask-permission'); + } + } + + if ($item->getParams()->get('dashboard')) { + $node['dashboard'] = $item->getParams()->get('dashboard'); + } + if ($item->getParams() && $hideitems = $item->getParams()->get('hideitems')) { $item->getParams()->set('hideitems', $this->getModel('Menu')->getExtensionElementsForMenuItems($hideitems)); diff --git a/administrator/components/com_messages/tmpl/message/default.php b/administrator/components/com_messages/tmpl/message/default.php index 0bd7249090..02961165b8 100644 --- a/administrator/components/com_messages/tmpl/message/default.php +++ b/administrator/components/com_messages/tmpl/message/default.php @@ -12,6 +12,7 @@ use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; +use Joomla\CMS\Mail\MailHelper; use Joomla\CMS\Router\Route; /** @var \Joomla\Component\Messages\Administrator\View\Message\HtmlView $this */ @@ -41,7 +42,7 @@
item->subject; ?>
-
item->message; ?>
+
item->message); ?>
diff --git a/administrator/components/com_redirect/tmpl/links/default.php b/administrator/components/com_redirect/tmpl/links/default.php index 77555130dc..d187222889 100644 --- a/administrator/components/com_redirect/tmpl/links/default.php +++ b/administrator/components/com_redirect/tmpl/links/default.php @@ -51,7 +51,7 @@ Text::_('COM_REDIRECT_SYSTEM_PLUGIN'), [ 'class' => 'alert-link', - 'data-joomla-dialog' => $this->escape(json_encode($popupOptions, JSON_UNESCAPED_SLASHES)), + 'data-joomla-dialog' => $this->escape(json_encode($popupOptions, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)), 'data-checkin-url' => Route::_('index.php?option=com_plugins&task=plugins.checkin&format=json&cid[]=' . $redirectPluginId), 'data-close-on-message' => '', 'data-reload-on-close' => '', diff --git a/administrator/components/com_redirect/tmpl/links/emptystate.php b/administrator/components/com_redirect/tmpl/links/emptystate.php index edc7899266..abb23ec485 100644 --- a/administrator/components/com_redirect/tmpl/links/emptystate.php +++ b/administrator/components/com_redirect/tmpl/links/emptystate.php @@ -65,7 +65,7 @@ Text::_('COM_REDIRECT_SYSTEM_PLUGIN'), [ 'class' => 'alert-link', - 'data-joomla-dialog' => $this->escape(json_encode($popupOptions, JSON_UNESCAPED_SLASHES)), + 'data-joomla-dialog' => $this->escape(json_encode($popupOptions, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)), 'data-checkin-url' => Route::_('index.php?option=com_plugins&task=plugins.checkin&format=json&cid[]=' . $redirectPluginId), 'data-close-on-message' => '', 'data-reload-on-close' => '', diff --git a/administrator/components/com_users/src/Helper/Mfa.php b/administrator/components/com_users/src/Helper/Mfa.php index 64499ce5ef..cc743ce007 100644 --- a/administrator/components/com_users/src/Helper/Mfa.php +++ b/administrator/components/com_users/src/Helper/Mfa.php @@ -77,7 +77,7 @@ public static function getConfigurationInterface(User $user): ?string /** @var CMSApplication $app */ $app = Factory::getApplication(); - if (!$app->getInput()->getCmd('option', '') === 'com_users') { + if ($app->getInput()->getCmd('option', '') !== 'com_users') { $app->getLanguage()->load('com_users'); $app->getDocument() ->getWebAssetManager() diff --git a/administrator/components/com_users/src/Model/UserModel.php b/administrator/components/com_users/src/Model/UserModel.php index cdbbd8ed9b..6058b74470 100644 --- a/administrator/components/com_users/src/Model/UserModel.php +++ b/administrator/components/com_users/src/Model/UserModel.php @@ -142,7 +142,7 @@ public function getForm($data = [], $loadData = true) // When multilanguage is set, a user's default site language should also be a Content Language if (Multilanguage::isEnabled()) { - $form->setFieldAttribute('language', 'type', 'frontend_language', 'params'); + $form->setFieldAttribute('language', 'type', 'frontendlanguage', 'params'); } $userId = (int) $form->getValue('id'); @@ -268,6 +268,15 @@ public function save($data) } } + // Unset the username if it should not be overwritten + if ( + !$my->authorise('core.manage', 'com_users') + && (int) $user->id === (int) $my->id + && !ComponentHelper::getParams('com_users')->get('change_login_name') + ) { + unset($data['username']); + } + // Bind the data. if (!$user->bind($data)) { $this->setError($user->getError()); diff --git a/administrator/language/en-GB/install.xml b/administrator/language/en-GB/install.xml index 03e4f85383..dcbbcc348a 100644 --- a/administrator/language/en-GB/install.xml +++ b/administrator/language/en-GB/install.xml @@ -2,8 +2,8 @@ English (en-GB) en-GB - 5.1.2 - 2024-07 + 5.1.3 + 2024-08 Joomla! Project admin@joomla.org www.joomla.org diff --git a/administrator/language/en-GB/langmetadata.xml b/administrator/language/en-GB/langmetadata.xml index 42f5616bf0..40574f1e81 100644 --- a/administrator/language/en-GB/langmetadata.xml +++ b/administrator/language/en-GB/langmetadata.xml @@ -1,8 +1,8 @@ English (en-GB) - 5.1.2 - 2024-07 + 5.1.3 + 2024-08 Joomla! Project admin@joomla.org www.joomla.org diff --git a/administrator/language/fr-FR/com_joomlaupdate.ini b/administrator/language/fr-FR/com_joomlaupdate.ini index 7fa9af4183..5ca370c9ff 100644 --- a/administrator/language/fr-FR/com_joomlaupdate.ini +++ b/administrator/language/fr-FR/com_joomlaupdate.ini @@ -69,6 +69,8 @@ COM_JOOMLAUPDATE_SELF_EMPTYSTATE_CONTENT="Vous devez d'abord mettre à jour ce c COM_JOOMLAUPDATE_SELF_EMPTYSTATE_TITLE="Une nouvelle version du composant de mise à jour de Joomla est disponible" COM_JOOMLAUPDATE_SYSTEM_CHECK="Vérification du système" COM_JOOMLAUPDATE_TOOLBAR_CHECK="Rechercher des mises à jour" +COM_JOOMLAUPDATE_UPDATE_CHANGE_UPDATE_SOURCE_FAILED="Échec de la réinitialisation du canal de mise à jour de \"%1$s\" à \"%2$s\". Veuillez le modifier dans les options du composant de mise à jour de Joomla pour ne pas manquer les futures mises à jour." +COM_JOOMLAUPDATE_UPDATE_CHANGE_UPDATE_SOURCE_OK="Le canal de mise à jour a été réinitialisé de \"%1$s\" à \"%2$s\"." COM_JOOMLAUPDATE_UPDATE_CHECK="Vérification de mise à jour" COM_JOOMLAUPDATE_UPDATE_CONFIRM_BACKUP="Je possède une sauvegarde du site et suis prêt à effectuer la mise à jour." COM_JOOMLAUPDATE_UPDATE_EMPTYSTATE_TITLE="Mettre le site à jour vers \"Joomla %s\"" @@ -169,7 +171,7 @@ COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATE_NOTICE="Avant de mettre à jour Joomla, ass COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATEFOUND="Une mise à jour de Joomla a été trouvée" COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_CUSTOM="Vous êtes sur le canal de mise à jour "%s". Ce n'est pas un canal de mise à jour officiel de Joomla." COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_DEFAULT="Vous êtes sur le canal de mise à jour "%s". Grâce à ce canal, vous recevrez des notifications pour toutes les mises à jour de la version actuelle de Joomla (5.x)" -COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_NEXT="Vous êtes sur le canal de mise à jour "%s". Grâce à ce canal, vous recevrez des notifications pour toutes les mises à jour de la version actuelle de Joomla (5.x) et vous serez également averti lorsque la prochaine version majeure (6.x) sera disponible. Avant de passer à la version 6.x, vous devrez évaluer sa compatibilité avec votre environnement." +COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_NEXT="Vous êtes sur le canal de mise à jour "%s". Par ce canal, vous serez informé lorsque la future version majeure (6.x) sera disponible. Avant de passer à la version 6.x, vous devrez évaluer sa compatibilité avec votre environnement. Vous ne serez pas informé des mises à jour de la version actuelle de Joomla (5.x)." COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_TESTING="Vous êtes sur le canal de mise à jour "%s". Ce canal est consacré aux tests des nouvelles versions et corrections de Joomla.
Il est uniquement destiné aux membres du JBS (Joomla Bug Squad™) et autres testeurs de la communauté. N'utilisez pas ce canal sur un site en production." COM_JOOMLAUPDATE_VIEW_DEFAULT_UPLOAD_INTRO="Vous pouvez utiliser cette fonction pour mettre à jour Joomla si votre serveur se trouve derrière un pare-feu ou s'il est incapable de contacter les serveurs de mise à jour. Téléchargez le pack de mise à jour de Joomla en format ZIP à partir de la page officielle de téléchargement de Joomla, puis utilisez les champs ci-dessous pour l'envoyer et l'installer." COM_JOOMLAUPDATE_VIEW_UPDATE_BYTESEXTRACTED="Octets extraits" diff --git a/administrator/language/fr-FR/install.xml b/administrator/language/fr-FR/install.xml index 018c8eb167..a7de871472 100644 --- a/administrator/language/fr-FR/install.xml +++ b/administrator/language/fr-FR/install.xml @@ -2,8 +2,8 @@ French (fr-FR) fr-FR - 5.1.2 - 2024-07-09 + 5.1.3 + 2024-08-20 Joomla! Project - French translation team traduction@joomla.fr www.joomla.fr diff --git a/administrator/language/fr-FR/langmetadata.xml b/administrator/language/fr-FR/langmetadata.xml index 817b741d59..07dcbe35c1 100644 --- a/administrator/language/fr-FR/langmetadata.xml +++ b/administrator/language/fr-FR/langmetadata.xml @@ -1,8 +1,8 @@ French (fr-FR) - 5.1.2 - 2024-07 + 5.1.3 + 2024-08-20 Joomla! Project - French translation team traduction@joomla.fr www.joomla.fr diff --git a/administrator/manifests/files/joomla.xml b/administrator/manifests/files/joomla.xml index a7cd5462d0..10819b110c 100644 --- a/administrator/manifests/files/joomla.xml +++ b/administrator/manifests/files/joomla.xml @@ -6,8 +6,8 @@ www.joomla.org (C) 2019 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt - 5.1.2 - 2024-07 + 5.1.3 + 2024-08 FILES_JOOMLA_XML_DESCRIPTION administrator/components/com_admin/script.php diff --git a/administrator/manifests/packages/pkg_en-GB.xml b/administrator/manifests/packages/pkg_en-GB.xml index 362e73bd40..af871811b3 100644 --- a/administrator/manifests/packages/pkg_en-GB.xml +++ b/administrator/manifests/packages/pkg_en-GB.xml @@ -2,8 +2,8 @@ English (en-GB) Language Pack en-GB - 5.1.2.1 - 2024-07 + 5.1.3.1 + 2024-08 Joomla! Project admin@joomla.org www.joomla.org diff --git a/administrator/manifests/packages/pkg_fr-FR.xml b/administrator/manifests/packages/pkg_fr-FR.xml index 896754a576..c474536b89 100644 --- a/administrator/manifests/packages/pkg_fr-FR.xml +++ b/administrator/manifests/packages/pkg_fr-FR.xml @@ -2,8 +2,8 @@ French (fr-FR) Language pack fr-FR - 5.1.2.1 - 2024-07-09 + 5.1.3.1 + 2024-08-20 Joomla! Project - French translation team traduction@joomla.fr www.joomla.fr @@ -13,8 +13,8 @@ Joomla! Project - French translation team www.joomla.fr -

Joomla! Full French (fr-FR) Language Package - Version 5.1.2 v1

-

Pack de langue Joomla! français (fr-FR) complet - Version 5.1.2 v1

+

Joomla! Full French (fr-FR) Language Package - Version 5.1.3 v1

+

Pack de langue Joomla! français (fr-FR) complet - Version 5.1.3 v1

www.joomla.fr - traduction@joomla.fr

]]>
true diff --git a/api/language/en-GB/install.xml b/api/language/en-GB/install.xml index 2559980607..1b4a6fc5db 100644 --- a/api/language/en-GB/install.xml +++ b/api/language/en-GB/install.xml @@ -2,8 +2,8 @@ English (en-GB) en-GB - 5.1.2 - 2024-07 + 5.1.3 + 2024-08 Joomla! Project admin@joomla.org www.joomla.org diff --git a/api/language/en-GB/langmetadata.xml b/api/language/en-GB/langmetadata.xml index 63822cd83e..24c6252d44 100644 --- a/api/language/en-GB/langmetadata.xml +++ b/api/language/en-GB/langmetadata.xml @@ -1,8 +1,8 @@ English (en-GB) - 5.1.2 - 2024-07 + 5.1.3 + 2024-08 Joomla! Project admin@joomla.org www.joomla.org diff --git a/api/language/fr-FR/install.xml b/api/language/fr-FR/install.xml index fec32afb69..dba1c74f4f 100644 --- a/api/language/fr-FR/install.xml +++ b/api/language/fr-FR/install.xml @@ -2,8 +2,8 @@ French (fr-FR) fr-FR - 5.1.2 - 2024-07-09 + 5.1.3 + 2024-08-20 Joomla! Project - French translation team traduction@joomla.fr www.joomla.fr diff --git a/api/language/fr-FR/langmetadata.xml b/api/language/fr-FR/langmetadata.xml index 5a5a029693..335d4ddb7a 100644 --- a/api/language/fr-FR/langmetadata.xml +++ b/api/language/fr-FR/langmetadata.xml @@ -1,8 +1,8 @@ French (fr-FR) - 5.1.2 - 2024-07-09 + 5.1.3 + 2024-08-20 Joomla! Project - French translation team traduction@joomla.fr www.joomla.fr diff --git a/components/com_contact/src/Controller/ContactController.php b/components/com_contact/src/Controller/ContactController.php index 9c2bb4cdca..b794196699 100644 --- a/components/com_contact/src/Controller/ContactController.php +++ b/components/com_contact/src/Controller/ContactController.php @@ -283,6 +283,7 @@ private function _sendEmail($data, $contact, $emailCopyToSender) $mailer->addRecipient($contact->email_to); $mailer->setReplyTo($templateData['email'], $templateData['name']); $mailer->addTemplateData($templateData); + $mailer->addUnsafeTags(['name', 'email', 'body', 'customfields']); $sent = $mailer->send(); // If we are supposed to copy the sender, do so. diff --git a/components/com_users/src/Model/ProfileModel.php b/components/com_users/src/Model/ProfileModel.php index 2746417a7a..fc19b00cbe 100644 --- a/components/com_users/src/Model/ProfileModel.php +++ b/components/com_users/src/Model/ProfileModel.php @@ -149,7 +149,7 @@ public function getForm($data = [], $loadData = true) // When multilanguage is set, a user's default site language should also be a Content Language if (Multilanguage::isEnabled()) { - $form->setFieldAttribute('language', 'type', 'frontend_language', 'params'); + $form->setFieldAttribute('language', 'type', 'frontendlanguage', 'params'); } // If the user needs to change their password, mark the password fields as required diff --git a/components/com_users/src/Model/RegistrationModel.php b/components/com_users/src/Model/RegistrationModel.php index 673553fe6a..15b4bce1a9 100644 --- a/components/com_users/src/Model/RegistrationModel.php +++ b/components/com_users/src/Model/RegistrationModel.php @@ -339,7 +339,7 @@ public function getForm($data = [], $loadData = true) // When multilanguage is set, a user's default site language should also be a Content Language if (Multilanguage::isEnabled()) { - $form->setFieldAttribute('language', 'type', 'frontend_language', 'params'); + $form->setFieldAttribute('language', 'type', 'frontendlanguage', 'params'); } return $form; @@ -512,6 +512,7 @@ public function register($temp) $mailer = new MailTemplate($mailtemplate, $app->getLanguage()->getTag()); $mailer->addTemplateData($data); $mailer->addRecipient($data['email']); + $mailer->addUnsafeTags(['username', 'password_clear', 'name']); $return = $mailer->send(); } catch (\Exception $exception) { try { diff --git a/installation/language/af-ZA/langmetadata.xml b/installation/language/af-ZA/langmetadata.xml index 7572eabdbc..23645d7bb7 100644 --- a/installation/language/af-ZA/langmetadata.xml +++ b/installation/language/af-ZA/langmetadata.xml @@ -1,7 +1,7 @@ Afrikaans (Suid-Afrika) - 5.1.2 + 5.1.3 2024-07 Afrikaans Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/ar-AA/langmetadata.xml b/installation/language/ar-AA/langmetadata.xml index 6ada8fbc21..3289e5582a 100644 --- a/installation/language/ar-AA/langmetadata.xml +++ b/installation/language/ar-AA/langmetadata.xml @@ -1,7 +1,7 @@ Arabic (اللغة العربية) - 5.1.2 + 5.1.3 2024-07 Dr. Ashraf Damra (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/be-BY/langmetadata.xml b/installation/language/be-BY/langmetadata.xml index 7dd6a6e958..c12f0e6fe6 100644 --- a/installation/language/be-BY/langmetadata.xml +++ b/installation/language/be-BY/langmetadata.xml @@ -1,7 +1,7 @@ Belarusian (Belarus) - 5.1.2 + 5.1.3 2024-07 Joomla Belarus Community (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/bg-BG/langmetadata.xml b/installation/language/bg-BG/langmetadata.xml index 2560e6f4dd..ad1c530392 100644 --- a/installation/language/bg-BG/langmetadata.xml +++ b/installation/language/bg-BG/langmetadata.xml @@ -1,7 +1,7 @@ Bulgarian (bg-BG) - 5.1.2 + 5.1.3 2024-07 Joomla! Bulgaria (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/ca-ES/langmetadata.xml b/installation/language/ca-ES/langmetadata.xml index 781b39dbbb..6d7c763521 100644 --- a/installation/language/ca-ES/langmetadata.xml +++ b/installation/language/ca-ES/langmetadata.xml @@ -1,7 +1,7 @@ Catalan (ca-ES) - 5.1.2 + 5.1.3 2024-07 Catalan [ca-ES] Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/cs-CZ/langmetadata.xml b/installation/language/cs-CZ/langmetadata.xml index d4ede0bf12..a103cd712a 100644 --- a/installation/language/cs-CZ/langmetadata.xml +++ b/installation/language/cs-CZ/langmetadata.xml @@ -1,7 +1,7 @@ Czech (Čeština) - 5.1.2 + 5.1.3 2024-07 Czech Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/cy-GB/langmetadata.xml b/installation/language/cy-GB/langmetadata.xml index 9a5fb77200..1ac2a1c7c2 100644 --- a/installation/language/cy-GB/langmetadata.xml +++ b/installation/language/cy-GB/langmetadata.xml @@ -1,7 +1,7 @@ Welsh (United Kingdom) - 5.1.2 + 5.1.3 2024-07 Joomla! Project - Welsh Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/da-DK/langmetadata.xml b/installation/language/da-DK/langmetadata.xml index 110951f8b2..34d3d4dc78 100644 --- a/installation/language/da-DK/langmetadata.xml +++ b/installation/language/da-DK/langmetadata.xml @@ -1,7 +1,7 @@ Danish (Danmark) - 5.1.2 + 5.1.3 2024-07 Danish Translation Team (Transl.: Ronny Buelund) (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/de-AT/langmetadata.xml b/installation/language/de-AT/langmetadata.xml index f657dfdf27..ecc06ac111 100644 --- a/installation/language/de-AT/langmetadata.xml +++ b/installation/language/de-AT/langmetadata.xml @@ -1,8 +1,8 @@ German (Austria) - 5.1.1 - 2024-05 + 5.1.2 + 2024-07 J!German (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/de-CH/langmetadata.xml b/installation/language/de-CH/langmetadata.xml index dc7885dab3..a4887b3a7d 100644 --- a/installation/language/de-CH/langmetadata.xml +++ b/installation/language/de-CH/langmetadata.xml @@ -1,8 +1,8 @@ German (Switzerland) - 5.1.1 - 2024-05 + 5.1.2 + 2024-07 J!German (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/de-LI/langmetadata.xml b/installation/language/de-LI/langmetadata.xml index 6108e4a6f0..db2eaf22da 100644 --- a/installation/language/de-LI/langmetadata.xml +++ b/installation/language/de-LI/langmetadata.xml @@ -1,8 +1,8 @@ German (Liechtenstein) - 5.1.1 - 2024-05 + 5.1.2 + 2024-07 J!German (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/de-LU/langmetadata.xml b/installation/language/de-LU/langmetadata.xml index 7de0832c63..c8cfaa75f6 100644 --- a/installation/language/de-LU/langmetadata.xml +++ b/installation/language/de-LU/langmetadata.xml @@ -1,8 +1,8 @@ German (Luxembourg) - 5.1.1 - 2024-05 + 5.1.2 + 2024-07 J!German (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/el-GR/langmetadata.xml b/installation/language/el-GR/langmetadata.xml index b22a3faa9c..fb837b319e 100644 --- a/installation/language/el-GR/langmetadata.xml +++ b/installation/language/el-GR/langmetadata.xml @@ -1,7 +1,7 @@ Greek (el-GR) - 5.1.2 + 5.1.3 2024-07 Ομάδα Μετάφρασης: joomla. gr (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/en-AU/langmetadata.xml b/installation/language/en-AU/langmetadata.xml index e45fe1004d..187fdee5c9 100644 --- a/installation/language/en-AU/langmetadata.xml +++ b/installation/language/en-AU/langmetadata.xml @@ -1,7 +1,7 @@ English (Australia) - 5.1.2 + 5.1.3 2024-07 Joomla! Project (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/en-CA/langmetadata.xml b/installation/language/en-CA/langmetadata.xml index bb8519e7d0..7d2fed2a6c 100644 --- a/installation/language/en-CA/langmetadata.xml +++ b/installation/language/en-CA/langmetadata.xml @@ -1,7 +1,7 @@ English (Canada) - 5.1.2 + 5.1.3 2024-07 Joomla! Project (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/en-GB/langmetadata.xml b/installation/language/en-GB/langmetadata.xml index da4b795fd0..8a4467a197 100644 --- a/installation/language/en-GB/langmetadata.xml +++ b/installation/language/en-GB/langmetadata.xml @@ -1,8 +1,8 @@ English (United Kingdom) - 5.1.2 - 2024-07 + 5.1.3 + 2024-08 Joomla! Project (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/en-NZ/langmetadata.xml b/installation/language/en-NZ/langmetadata.xml index 2813105a74..8de5cae77c 100644 --- a/installation/language/en-NZ/langmetadata.xml +++ b/installation/language/en-NZ/langmetadata.xml @@ -1,7 +1,7 @@ English (New Zealand) - 5.1.2 + 5.1.3 2024-07 Joomla! Project (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/en-US/langmetadata.xml b/installation/language/en-US/langmetadata.xml index 334174613e..ce5cb7fb2b 100644 --- a/installation/language/en-US/langmetadata.xml +++ b/installation/language/en-US/langmetadata.xml @@ -1,7 +1,7 @@ English (United States) - 5.1.2 + 5.1.3 2024-07 Joomla! Project (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/es-ES/langmetadata.xml b/installation/language/es-ES/langmetadata.xml index 232bd9bf45..e63984d6a7 100644 --- a/installation/language/es-ES/langmetadata.xml +++ b/installation/language/es-ES/langmetadata.xml @@ -1,7 +1,7 @@ Spanish (es-ES) - 5.1.2 + 5.1.3 2024-07 Spanish [es-ES] Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/et-EE/langmetadata.xml b/installation/language/et-EE/langmetadata.xml index f01f436567..ec72498699 100644 --- a/installation/language/et-EE/langmetadata.xml +++ b/installation/language/et-EE/langmetadata.xml @@ -1,7 +1,7 @@ Estonian - 5.1.2 + 5.1.3 2024-07 Joomla! Project (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/eu-ES/langmetadata.xml b/installation/language/eu-ES/langmetadata.xml index 4b2ff50ffa..e5aecf574d 100644 --- a/installation/language/eu-ES/langmetadata.xml +++ b/installation/language/eu-ES/langmetadata.xml @@ -1,7 +1,7 @@ Basque - 5.1.2 + 5.1.3 2024-07 Joomla! Basque Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/fa-AF/langmetadata.xml b/installation/language/fa-AF/langmetadata.xml index 263127bc21..5444110184 100644 --- a/installation/language/fa-AF/langmetadata.xml +++ b/installation/language/fa-AF/langmetadata.xml @@ -1,7 +1,7 @@ فارسی (دری) - 5.1.2 + 5.1.3 2024-07 JoomlaPersian Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/fa-IR/langmetadata.xml b/installation/language/fa-IR/langmetadata.xml index cba2468b7f..c52a2a5e62 100644 --- a/installation/language/fa-IR/langmetadata.xml +++ b/installation/language/fa-IR/langmetadata.xml @@ -1,7 +1,7 @@ Persian (fa-IR) - 5.1.2 + 5.1.3 2024-07 Persian Translation Team: joomlafarsi.com (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/fi-FI/langmetadata.xml b/installation/language/fi-FI/langmetadata.xml index fb83c0bdb5..6271d6861b 100644 --- a/installation/language/fi-FI/langmetadata.xml +++ b/installation/language/fi-FI/langmetadata.xml @@ -1,7 +1,7 @@ Finnish (Finland) - 5.1.2 + 5.1.3 2024-07 Finnish translation team: Joomla.fi (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/fr-CA/langmetadata.xml b/installation/language/fr-CA/langmetadata.xml index c65199a822..58b6832dfb 100644 --- a/installation/language/fr-CA/langmetadata.xml +++ b/installation/language/fr-CA/langmetadata.xml @@ -1,7 +1,7 @@ French (Canada) - 5.1.2 + 5.1.3 2024-07 Joomla! Project - French translation team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/fr-FR/langmetadata.xml b/installation/language/fr-FR/langmetadata.xml index 6b9e9e076f..b79f37df3f 100644 --- a/installation/language/fr-FR/langmetadata.xml +++ b/installation/language/fr-FR/langmetadata.xml @@ -1,7 +1,7 @@ French (fr-FR) - 5.1.2 + 5.1.3 2024-07 Joomla! Project - French translation team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/he-IL/langmetadata.xml b/installation/language/he-IL/langmetadata.xml index 370f3cf5ea..b35a4fae62 100644 --- a/installation/language/he-IL/langmetadata.xml +++ b/installation/language/he-IL/langmetadata.xml @@ -1,7 +1,7 @@ Hebrew (Israel) - 5.1.2 + 5.1.3 2024-07 פרוייקט ג'ומלה (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/hr-HR/langmetadata.xml b/installation/language/hr-HR/langmetadata.xml index dc86d1d8a3..197434a185 100644 --- a/installation/language/hr-HR/langmetadata.xml +++ b/installation/language/hr-HR/langmetadata.xml @@ -1,7 +1,7 @@ Croatian (Croatia) - 5.1.2 + 5.1.3 2024-07 Joomla! Hrvatska team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/hu-HU/langmetadata.xml b/installation/language/hu-HU/langmetadata.xml index 202a7675de..675d04b83f 100644 --- a/installation/language/hu-HU/langmetadata.xml +++ b/installation/language/hu-HU/langmetadata.xml @@ -1,7 +1,7 @@ Hungarian (Magyar) - 5.1.2 + 5.1.3 2024-07 Joomla! Magyarország (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/id-ID/langmetadata.xml b/installation/language/id-ID/langmetadata.xml index c25c281918..9ef4103984 100644 --- a/installation/language/id-ID/langmetadata.xml +++ b/installation/language/id-ID/langmetadata.xml @@ -1,7 +1,7 @@ Bahasa Indonesia (id-ID) - 5.1.2 + 5.1.3 2024-07 Joomla! Indonesia (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/it-IT/langmetadata.xml b/installation/language/it-IT/langmetadata.xml index 7610a4239e..26b5b13f2a 100644 --- a/installation/language/it-IT/langmetadata.xml +++ b/installation/language/it-IT/langmetadata.xml @@ -1,7 +1,7 @@ Italiano (it-IT) - 5.1.2 + 5.1.3 2024-07 Joomla! Project (Italian Translation Team) (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/ja-JP/langmetadata.xml b/installation/language/ja-JP/langmetadata.xml index 3af88db901..3b61b147ac 100644 --- a/installation/language/ja-JP/langmetadata.xml +++ b/installation/language/ja-JP/langmetadata.xml @@ -1,7 +1,7 @@ Japanese (Japan) - 5.1.2 + 5.1.3 2024-07 Joomla!じゃぱん (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/ka-GE/langmetadata.xml b/installation/language/ka-GE/langmetadata.xml index c4ca918f1c..86ac4cde72 100644 --- a/installation/language/ka-GE/langmetadata.xml +++ b/installation/language/ka-GE/langmetadata.xml @@ -1,7 +1,7 @@ Georgian (Georgia) - 5.1.2 + 5.1.3 2024-07 Georgian Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/kk-KZ/langmetadata.xml b/installation/language/kk-KZ/langmetadata.xml index 3a440b82c3..68c76f6790 100644 --- a/installation/language/kk-KZ/langmetadata.xml +++ b/installation/language/kk-KZ/langmetadata.xml @@ -1,7 +1,7 @@ Kazakh (Kazakhstan) - 5.1.2 + 5.1.3 2024-07 Sarvarov Akylkerey (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/ko-KR/langmetadata.xml b/installation/language/ko-KR/langmetadata.xml index 51bbf3327b..3432b91586 100644 --- a/installation/language/ko-KR/langmetadata.xml +++ b/installation/language/ko-KR/langmetadata.xml @@ -1,7 +1,7 @@ Korean (Republic of Korea) - 5.1.2 + 5.1.3 2024-07 Joomla! 프로젝트 (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/lt-LT/langmetadata.xml b/installation/language/lt-LT/langmetadata.xml index 14c66ae4d2..0f7eedfc5b 100644 --- a/installation/language/lt-LT/langmetadata.xml +++ b/installation/language/lt-LT/langmetadata.xml @@ -1,7 +1,7 @@ Lietuvių (lt-LT) - 5.1.2 + 5.1.3 2024-07 Oskaras Jankauskas (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/lv-LV/langmetadata.xml b/installation/language/lv-LV/langmetadata.xml index 6009b71c86..d2598bebd0 100644 --- a/installation/language/lv-LV/langmetadata.xml +++ b/installation/language/lv-LV/langmetadata.xml @@ -1,7 +1,7 @@ Latvian (Latvia) - 5.1.2 + 5.1.3 2024-07 Joomla! Projekts (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/mk-MK/langmetadata.xml b/installation/language/mk-MK/langmetadata.xml index 3039f4a328..d5c2db1ab0 100644 --- a/installation/language/mk-MK/langmetadata.xml +++ b/installation/language/mk-MK/langmetadata.xml @@ -1,7 +1,7 @@ Macedonian (mk-MK) - 5.1.2 + 5.1.3 2024-07 Joomla! Project (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/nl-BE/langmetadata.xml b/installation/language/nl-BE/langmetadata.xml index 05cb11970a..ba79c4faef 100644 --- a/installation/language/nl-BE/langmetadata.xml +++ b/installation/language/nl-BE/langmetadata.xml @@ -1,7 +1,7 @@ Dutch (Belgium) - 5.1.2 + 5.1.3 2024-07 Dutch (BE) translation team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/nl-NL/langmetadata.xml b/installation/language/nl-NL/langmetadata.xml index cc858bda3b..8d3f01ed07 100644 --- a/installation/language/nl-NL/langmetadata.xml +++ b/installation/language/nl-NL/langmetadata.xml @@ -1,7 +1,7 @@ Dutch (nl-NL) - 5.1.2 + 5.1.3 2024-07 Dutch Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/pl-PL/langmetadata.xml b/installation/language/pl-PL/langmetadata.xml index 5dbca359da..827a501a3e 100644 --- a/installation/language/pl-PL/langmetadata.xml +++ b/installation/language/pl-PL/langmetadata.xml @@ -1,7 +1,7 @@ Polski (PL) - 5.1.2 + 5.1.3 2024-07 Projekt Joomla! (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/pt-BR/joomla.ini b/installation/language/pt-BR/joomla.ini index 1474608dea..6715f8218d 100644 --- a/installation/language/pt-BR/joomla.ini +++ b/installation/language/pt-BR/joomla.ini @@ -213,7 +213,7 @@ JHIDEPASSWORD="Ocultar senha" JINVALID_TOKEN="A requisição mais recente foi negada por conter um token de segurança inválido. Recarregue a página e tente novamente." JINVALID_TOKEN_NOTICE="O token de segurança não corresponde. A solicitação foi cancelada para evitar qualquer violação de segurança. Tente novamente." JNEXT="Próximo" -JNO="Nunca" +JNO="Não" JNOTICE="Aviso" JOFF="Desativado" JON="Ativado" diff --git a/installation/language/pt-BR/langmetadata.xml b/installation/language/pt-BR/langmetadata.xml index b1c1bee491..1857e42bd7 100644 --- a/installation/language/pt-BR/langmetadata.xml +++ b/installation/language/pt-BR/langmetadata.xml @@ -1,7 +1,7 @@ - Português do Brasil (pt-BR) - 5.1.2 + Portuguese (Brazil) + 5.1.3 2024-07 Projeto Joomla! (C) 2005 Open Source Matters, Inc. @@ -11,7 +11,7 @@ Brazilian Portuguese (pt-BR) - Português do Brasil (pt-BR) + Portuguese (Brazil) pt-BR 0 diff --git a/installation/language/pt-PT/langmetadata.xml b/installation/language/pt-PT/langmetadata.xml index b2a7b6b5c8..6c880e291e 100644 --- a/installation/language/pt-PT/langmetadata.xml +++ b/installation/language/pt-PT/langmetadata.xml @@ -1,7 +1,7 @@ Português (Portugal) - 5.1.2 + 5.1.3 2024-07 Comunidade JoomlaPortugal (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/ro-RO/langmetadata.xml b/installation/language/ro-RO/langmetadata.xml index da87ee2083..2e3059746a 100644 --- a/installation/language/ro-RO/langmetadata.xml +++ b/installation/language/ro-RO/langmetadata.xml @@ -1,7 +1,7 @@ Română (România) - 5.1.2 + 5.1.3 2024-07 Horia Negura - Quanta (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/sk-SK/langmetadata.xml b/installation/language/sk-SK/langmetadata.xml index ba1ed4c1c0..e4bffe1937 100644 --- a/installation/language/sk-SK/langmetadata.xml +++ b/installation/language/sk-SK/langmetadata.xml @@ -1,7 +1,7 @@ Slovak (Slovakia) - 5.1.2 + 5.1.3 2024-07 Slovak translation team : Peter Michnica (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/sl-SI/langmetadata.xml b/installation/language/sl-SI/langmetadata.xml index 5d6d6ec461..6347f0e749 100644 --- a/installation/language/sl-SI/langmetadata.xml +++ b/installation/language/sl-SI/langmetadata.xml @@ -1,7 +1,7 @@ Slovenščina (Slovenija) - 5.1.2 + 5.1.3 2024-07 Slovenska prevajalska ekipa (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/sr-YU/langmetadata.xml b/installation/language/sr-YU/langmetadata.xml index 571bb1f9af..df4fa58346 100644 --- a/installation/language/sr-YU/langmetadata.xml +++ b/installation/language/sr-YU/langmetadata.xml @@ -1,7 +1,7 @@ Srpski (Republika Srbija) - 5.1.2 + 5.1.3 2024-07 Goran Nešić - UIX Web Design & Saša Matić Bardak.RS (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/sv-SE/langmetadata.xml b/installation/language/sv-SE/langmetadata.xml index ccc86c5cdc..b75446b0e8 100644 --- a/installation/language/sv-SE/langmetadata.xml +++ b/installation/language/sv-SE/langmetadata.xml @@ -1,7 +1,7 @@ Swedish (Sweden) - 5.1.2 + 5.1.3 2024-07 Swedish Translation Team - SvenskJoomla (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/ta-IN/langmetadata.xml b/installation/language/ta-IN/langmetadata.xml index 63b463cbe1..3eea857034 100644 --- a/installation/language/ta-IN/langmetadata.xml +++ b/installation/language/ta-IN/langmetadata.xml @@ -1,7 +1,7 @@ Tamil (India) - 5.1.2 + 5.1.3 2024-07 Ilagnayeru 'MIG' Manickam, Elango Samy Manim (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/th-TH/langmetadata.xml b/installation/language/th-TH/langmetadata.xml index dd075d4fd5..32df127169 100644 --- a/installation/language/th-TH/langmetadata.xml +++ b/installation/language/th-TH/langmetadata.xml @@ -1,7 +1,7 @@ Thai (ภาษาไทย) - 5.1.2 + 5.1.3 2024-07 Thai Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/tr-TR/langmetadata.xml b/installation/language/tr-TR/langmetadata.xml index 127fb1c2d2..6b4158f9c1 100644 --- a/installation/language/tr-TR/langmetadata.xml +++ b/installation/language/tr-TR/langmetadata.xml @@ -1,7 +1,7 @@ Turkish (Turkey) - 5.1.2 + 5.1.3 2024-07 Joomla! Türkiye (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/uk-UA/langmetadata.xml b/installation/language/uk-UA/langmetadata.xml index d9a96e8ae8..8d53ee270b 100644 --- a/installation/language/uk-UA/langmetadata.xml +++ b/installation/language/uk-UA/langmetadata.xml @@ -1,7 +1,7 @@ Ukrainian (uk-UA) - 5.1.2 + 5.1.3 2024-07 Denys Nosov (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/ur-PK/langmetadata.xml b/installation/language/ur-PK/langmetadata.xml index 1657b4ea8e..2e3cf0542d 100644 --- a/installation/language/ur-PK/langmetadata.xml +++ b/installation/language/ur-PK/langmetadata.xml @@ -1,19 +1,19 @@ - انگریزی (برطانیہ) - 5.1.2 + Urdu (ur-PK) + 5.1.3 2024-07 - عبدالوحید + Urdu Translation Team (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt joomla.ini - انگریزی (en-GB) + Urdu (ur-PK) انگریزی (برطانیہ) ur-PK - 0 + 1 diff --git a/installation/language/vi-VN/langmetadata.xml b/installation/language/vi-VN/langmetadata.xml index 7ce369030b..49ec547e65 100644 --- a/installation/language/vi-VN/langmetadata.xml +++ b/installation/language/vi-VN/langmetadata.xml @@ -1,7 +1,7 @@ Vietnamese (Vietnam) - 5.1.2 + 5.1.3 2024-07 Joomla! Project (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/zh-CN/joomla.ini b/installation/language/zh-CN/joomla.ini index 3faba9bfc8..afa57a8ce2 100644 --- a/installation/language/zh-CN/joomla.ini +++ b/installation/language/zh-CN/joomla.ini @@ -115,10 +115,10 @@ INSTL_COMPLETE_SITE_BTN="完成并打开前台" INSTL_COMPLETE_ADMIN_BTN="完成并打开后台" INSTL_COMPLETE_FINAL="安装完成" INSTL_COMPLETE_FINAL_DESC="网站安装完成,可以使用了。" -INSTL_COMPLETE_ADD_EXTRA_LANGUAGE="安装其它语言" +INSTL_COMPLETE_ADD_EXTRA_LANGUAGE="安装本地化语言包(zh-CN为简体中文)" INSTL_REMOVE_INST_FOLDER="你确定要删除吗? 确认 将永久删除 \"%s\"文件夹。" ; Languages view -INSTL_LANGUAGES="安装其它语言" +INSTL_LANGUAGES="安装本地化语言包" INSTL_LANGUAGES_COLUMN_HEADER_LANGUAGE="语言" INSTL_LANGUAGES_COLUMN_HEADER_LANGUAGE_SELECT="选择安装语言" INSTL_LANGUAGES_COLUMN_HEADER_LANGUAGE_TAG="语言标签" @@ -200,7 +200,7 @@ INSTL_SESSION_AUTO_START="会话自启动(Session Auto Start)" INSTL_WRITABLE="没有足够的权限创建 %s" INSTL_ZIP_SUPPORT_AVAILABLE="Native ZIP 支持并启用" ; Global strings -JADMINISTRATOR="管理员激活" +JADMINISTRATOR="管理员" JEMAIL="邮件" JERROR="错误" JERROR_LAYOUT_ERROR_HAS_OCCURRED_WHILE_PROCESSING_YOUR_REQUEST="没有找到你要访问的内容." diff --git a/installation/language/zh-CN/langmetadata.xml b/installation/language/zh-CN/langmetadata.xml index 17ec789a8c..f9633f8158 100644 --- a/installation/language/zh-CN/langmetadata.xml +++ b/installation/language/zh-CN/langmetadata.xml @@ -1,7 +1,7 @@ Chinese Simplified (China) - 5.1.2 + 5.1.3 2024-07 Joomla中文网 (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/zh-TW/langmetadata.xml b/installation/language/zh-TW/langmetadata.xml index f4139f199e..bc39d83ae4 100644 --- a/installation/language/zh-TW/langmetadata.xml +++ b/installation/language/zh-TW/langmetadata.xml @@ -1,7 +1,7 @@ 正體中文 - 5.1.2 + 5.1.3 2024-07 正體中文 Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/sql/mysql/localise.sql b/installation/sql/mysql/localise.sql index c07c987b22..d555049ea7 100644 --- a/installation/sql/mysql/localise.sql +++ b/installation/sql/mysql/localise.sql @@ -143,4 +143,4 @@ UPDATE IGNORE `#__categories` SET `alias` = 'non-classe' WHERE `id` = 2; UPDATE IGNORE `#__categories` SET `alias` = 'non-classe' WHERE `id` = 3; UPDATE IGNORE `#__categories` SET `alias` = 'non-classe' WHERE `id` = 4; UPDATE IGNORE `#__categories` SET `alias` = 'non-classe' WHERE `id` = 5; -UPDATE IGNORE `#__categories` SET `alias` = 'non-classe' WHERE `id` = 7; \ No newline at end of file +UPDATE IGNORE `#__categories` SET `alias` = 'non-classe' WHERE `id` = 7; diff --git a/installation/src/Form/Field/Installation/LanguageField.php b/installation/src/Form/Field/Installation/LanguageField.php index dc80d658e7..20b86e57b1 100644 --- a/installation/src/Form/Field/Installation/LanguageField.php +++ b/installation/src/Form/Field/Installation/LanguageField.php @@ -38,7 +38,7 @@ class LanguageField extends ListField * * @param \SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. + * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * diff --git a/language/en-GB/install.xml b/language/en-GB/install.xml index 144e6e93f0..78e5e2ba7e 100644 --- a/language/en-GB/install.xml +++ b/language/en-GB/install.xml @@ -2,8 +2,8 @@ English (en-GB) en-GB - 5.1.2 - 2024-07 + 5.1.3 + 2024-08 Joomla! Project admin@joomla.org www.joomla.org diff --git a/language/en-GB/langmetadata.xml b/language/en-GB/langmetadata.xml index d8b3215740..c6bc4cfd87 100644 --- a/language/en-GB/langmetadata.xml +++ b/language/en-GB/langmetadata.xml @@ -1,8 +1,8 @@ English (en-GB) - 5.1.2 - 2024-07 + 5.1.3 + 2024-08 Joomla! Project admin@joomla.org www.joomla.org diff --git a/language/fr-FR/install.xml b/language/fr-FR/install.xml index 1fa97d9395..7d950f6a10 100644 --- a/language/fr-FR/install.xml +++ b/language/fr-FR/install.xml @@ -2,8 +2,8 @@ French (fr-FR) fr-FR - 5.1.2 - 2024-07-09 + 5.1.3 + 2024-08-20 Joomla! Project - French translation team traduction@joomla.fr www.joomla.fr diff --git a/language/fr-FR/langmetadata.xml b/language/fr-FR/langmetadata.xml index 4a8b1e8de9..4ec390e1f7 100644 --- a/language/fr-FR/langmetadata.xml +++ b/language/fr-FR/langmetadata.xml @@ -1,8 +1,8 @@ French (fr-FR) - 5.1.2 - 2024-07 + 5.1.3 + 2024-08-20 Joomla! Project - French translation team traduction@joomla.fr www.joomla.fr diff --git a/layouts/joomla/form/field/modal-select/buttons.php b/layouts/joomla/form/field/modal-select/buttons.php index 33b6ee025e..a877514dd3 100644 --- a/layouts/joomla/form/field/modal-select/buttons.php +++ b/layouts/joomla/form/field/modal-select/buttons.php @@ -54,17 +54,17 @@ $modalSelect = [ 'popupType' => 'iframe', 'src' => empty($urls['select']) ? '' : Route::_($urls['select'], false), - 'textHeader' => $modalTitles['select'] ?? Text::_('JSELECT'), + 'textHeader' => Text::_($modalTitles['select'] ?? 'JSELECT'), ]; $modalNew = [ 'popupType' => 'iframe', 'src' => empty($urls['new']) ? '' : Route::_($urls['new'], false), - 'textHeader' => $modalTitles['new'] ?? Text::_('JACTION_CREATE'), + 'textHeader' => Text::_($modalTitles['new'] ?? 'JACTION_CREATE'), ]; $modalEdit = [ 'popupType' => 'iframe', 'src' => empty($urls['edit']) ? '' : Route::_($urls['edit'], false), - 'textHeader' => $modalTitles['edit'] ?? Text::_('JACTION_EDIT'), + 'textHeader' => Text::_($modalTitles['edit'] ?? 'JACTION_EDIT'), ]; // Decide when the select button always will be visible diff --git a/layouts/joomla/form/field/text.php b/layouts/joomla/form/field/text.php index cba5f453b9..4dcaf2c4fc 100644 --- a/layouts/joomla/form/field/text.php +++ b/layouts/joomla/form/field/text.php @@ -95,7 +95,7 @@ !empty($pattern) ? 'pattern="' . $pattern . '"' : '', // @TODO add a proper string here!!! - !empty($validationtext) ? 'data-validation-text="' . $validationtext . '"' : '', + !empty($validationtext) ? 'data-validation-text="' . $this->escape(Text::_($validationtext)) . '"' : '', ]; $addonBeforeHtml = '' . Text::_($addonBefore) . ''; diff --git a/libraries/src/Captcha/Captcha.php b/libraries/src/Captcha/Captcha.php index a5b673de07..260e81f1cc 100644 --- a/libraries/src/Captcha/Captcha.php +++ b/libraries/src/Captcha/Captcha.php @@ -51,7 +51,7 @@ class Captcha implements DispatcherAwareInterface private $provider; /** - * Editor Plugin name + * Captcha Plugin name * * @var string * @since 2.5 @@ -281,10 +281,10 @@ private function _load(array $options = []) // Build the path to the needed captcha plugin $name = InputFilter::getInstance()->clean($this->name, 'cmd'); - // Boot the editor plugin + // Boot the captcha plugin $this->captcha = Factory::getApplication()->bootPlugin($name, 'captcha'); - // Check if the editor can be loaded + // Check if the captcha can be loaded if (!$this->captcha) { throw new \RuntimeException(Text::sprintf('JLIB_CAPTCHA_ERROR_PLUGIN_NOT_FOUND', $name)); } diff --git a/libraries/src/Console/CheckJoomlaUpdatesCommand.php b/libraries/src/Console/CheckJoomlaUpdatesCommand.php index 12c02ec6ae..7f31704b74 100644 --- a/libraries/src/Console/CheckJoomlaUpdatesCommand.php +++ b/libraries/src/Console/CheckJoomlaUpdatesCommand.php @@ -152,7 +152,6 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in switch ($config->get('updatesource', 'default')) { case 'default': case 'next': - case 'testing': $symfonyStyle->writeln('You are on the ' . $config->get('updatesource', 'default') . ' update channel.'); break; case 'custom': diff --git a/libraries/src/Console/CoreUpdateChannelCommand.php b/libraries/src/Console/CoreUpdateChannelCommand.php index 86a0ac44ac..31dba413e2 100644 --- a/libraries/src/Console/CoreUpdateChannelCommand.php +++ b/libraries/src/Console/CoreUpdateChannelCommand.php @@ -75,7 +75,7 @@ protected function configure(): void $this->setDescription('Manage the update channel for Joomla core updates'); $this->setHelp($help); - $this->addArgument('channel', InputArgument::OPTIONAL, 'Name of the update channel [default, next, testing, custom]'); + $this->addArgument('channel', InputArgument::OPTIONAL, 'Name of the update channel [default, next, custom]'); $this->addOption('url', null, InputOption::VALUE_OPTIONAL, 'URL to update source. Only for custom update channel'); } @@ -100,7 +100,6 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in switch ($params->get('updatesource', 'default')) { case 'default': case 'next': - case 'testing': $symfonyStyle->writeln('You are on the "' . $params->get('updatesource', 'default') . '" update channel.'); break; case 'custom': @@ -114,8 +113,8 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in return Command::SUCCESS; } - if (!\in_array($channel, ['default', 'next', 'testing', 'custom'])) { - $symfonyStyle->error('The given update channel is invalid. Please only choose from [default, next, testing, custom].'); + if (!\in_array($channel, ['default', 'next', 'custom'])) { + $symfonyStyle->error('The given update channel is invalid. Please only choose from [default, next, custom].'); return Command::FAILURE; } diff --git a/libraries/src/Console/TasksListCommand.php b/libraries/src/Console/TasksListCommand.php index dfefb3937a..217677d8fb 100644 --- a/libraries/src/Console/TasksListCommand.php +++ b/libraries/src/Console/TasksListCommand.php @@ -72,15 +72,22 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in $tasks = array_map( function (\stdClass $task): array { $enabled = $task->state === 1; - $nextExec = Factory::getDate($task->next_execution, 'UTC'); - $due = $enabled && $task->taskOption && Factory::getDate('now', 'UTC') > $nextExec; + $rule = json_decode($task->execution_rules); + + if ($rule->{'rule-type'} === 'manual') { + $nextRun = 'Manual'; + } else { + $nextExec = Factory::getDate($task->next_execution, 'UTC'); + $due = $enabled && $task->taskOption && Factory::getDate('now', 'UTC') > $nextExec; + $nextRun = $due ? 'DUE!' : $nextExec->toRFC822(); + } return [ 'id' => $task->id, 'title' => $task->title, 'type' => $task->safeTypeTitle, 'state' => $task->state === 1 ? 'Enabled' : ($task->state === 0 ? 'Disabled' : 'Trashed'), - 'next_execution' => $due ? 'DUE!' : $nextExec->toRFC822(), + 'next_execution' => $nextRun, ]; }, $this->getTasks() @@ -105,7 +112,7 @@ private function getTasks(): array return $scheduler->fetchTaskRecords( ['state' => '*'], - ['ordering' => 'a.title', 'select' => 'a.id, a.title, a.type, a.state, a.next_execution'] + ['ordering' => 'a.title', 'select' => 'a.id, a.title, a.type, a.state, a.next_execution, a.execution_rules'] ); } diff --git a/libraries/src/Document/Renderer/Html/HeadRenderer.php b/libraries/src/Document/Renderer/Html/HeadRenderer.php index 62da32d411..fec504abe5 100644 --- a/libraries/src/Document/Renderer/Html/HeadRenderer.php +++ b/libraries/src/Document/Renderer/Html/HeadRenderer.php @@ -35,11 +35,8 @@ class HeadRenderer extends DocumentRenderer */ public function render($head, $params = [], $content = null) { - $buffer = ''; - $buffer .= $this->_doc->loadRenderer('metas')->render($head, $params, $content); - $buffer .= $this->_doc->loadRenderer('styles')->render($head, $params, $content); - $buffer .= $this->_doc->loadRenderer('scripts')->render($head, $params, $content); - - return $buffer; + return $this->_doc->loadRenderer('metas')->render($head, $params, $content) + . $this->_doc->loadRenderer('styles')->render($head, $params, $content) + . $this->_doc->loadRenderer('scripts')->render($head, $params, $content); } } diff --git a/libraries/src/Form/Field/SqlField.php b/libraries/src/Form/Field/SqlField.php index cb1bd4aeaa..9a3893cdc2 100644 --- a/libraries/src/Form/Field/SqlField.php +++ b/libraries/src/Form/Field/SqlField.php @@ -233,12 +233,21 @@ protected function processQuery($conditions, $filters, $defaults) // Process the filters if (\is_array($filters)) { - $html_filters = Factory::getApplication()->getUserStateFromRequest($this->context . '.filter', 'filter', [], 'array'); + // @TODO: Loading the filtering value from the request need to be deprecated. + $html_filters = $this->context ? Factory::getApplication()->getUserStateFromRequest($this->context . '.filter', 'filter', [], 'array') : false; + $form = $this->form; foreach ($filters as $k => $value) { - if (!empty($html_filters[$value])) { + // Get the filter value from the linked filter field + $filterFieldValue = $form->getValue($value, $this->group); + + if ($html_filters && !empty($html_filters[$value])) { $escape = $db->quote($db->escape($html_filters[$value]), false); + $query->where("{$value} = {$escape}"); + } elseif ($filterFieldValue !== null) { + $escape = $db->quote($db->escape($filterFieldValue), false); + $query->where("{$value} = {$escape}"); } elseif (!empty($defaults[$value])) { $escape = $db->quote($db->escape($defaults[$value]), false); diff --git a/libraries/src/Form/Field/TransitionField.php b/libraries/src/Form/Field/TransitionField.php index 3a064d6df5..0ffdccec55 100644 --- a/libraries/src/Form/Field/TransitionField.php +++ b/libraries/src/Form/Field/TransitionField.php @@ -53,7 +53,7 @@ class TransitionField extends GroupedlistField * * @param \SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. + * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * diff --git a/libraries/src/Form/Field/WorkflowconditionField.php b/libraries/src/Form/Field/WorkflowconditionField.php index 55a07674af..b0aacdc215 100644 --- a/libraries/src/Form/Field/WorkflowconditionField.php +++ b/libraries/src/Form/Field/WorkflowconditionField.php @@ -53,7 +53,7 @@ class WorkflowconditionField extends ListField * * @param \SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. + * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * diff --git a/libraries/src/Form/Field/WorkflowstageField.php b/libraries/src/Form/Field/WorkflowstageField.php index 0651d32416..6145028899 100644 --- a/libraries/src/Form/Field/WorkflowstageField.php +++ b/libraries/src/Form/Field/WorkflowstageField.php @@ -53,7 +53,7 @@ class WorkflowstageField extends GroupedlistField * * @param \SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. + * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * diff --git a/libraries/src/Form/FormField.php b/libraries/src/Form/FormField.php index 36f3e90c0f..0be3179f1c 100644 --- a/libraries/src/Form/FormField.php +++ b/libraries/src/Form/FormField.php @@ -627,7 +627,7 @@ public function setForm(Form $form) * * @param \SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. + * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * diff --git a/libraries/src/Form/FormRule.php b/libraries/src/Form/FormRule.php index 0214326571..c6e916df06 100644 --- a/libraries/src/Form/FormRule.php +++ b/libraries/src/Form/FormRule.php @@ -58,7 +58,7 @@ class FormRule * * @param \SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. + * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * @param ?Registry $input An optional Registry object with the entire data set to validate against the entire form. diff --git a/libraries/src/Form/Rule/SubFormRule.php b/libraries/src/Form/Rule/SubFormRule.php index 6a822763a0..b24b4cd512 100644 --- a/libraries/src/Form/Rule/SubFormRule.php +++ b/libraries/src/Form/Rule/SubFormRule.php @@ -30,7 +30,7 @@ class SubformRule extends FormRule * * @param \SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. + * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * @param ?Registry $input An optional Registry object with the entire data set to validate against the entire form. diff --git a/libraries/src/Mail/Mail.php b/libraries/src/Mail/Mail.php index 09f06c531b..0c33af5178 100644 --- a/libraries/src/Mail/Mail.php +++ b/libraries/src/Mail/Mail.php @@ -401,20 +401,12 @@ public function addAttachment($path, $name = '', $encoding = 'base64', $type = ' $result = true; if (\is_array($path)) { - if (!empty($name) && \count($path) != \count($name)) { + if (!empty($name) && \is_array($name) && \count($path) != \count($name)) { throw new \InvalidArgumentException('The number of attachments must be equal with the number of name'); } foreach ($path as $key => $file) { - if (!empty($name)) { - $result = parent::addAttachment($file, $name[$key], $encoding, $type); - } else { - if (!empty($name)) { - $result = parent::addAttachment($file, $name[$key], $encoding, $type, $disposition); - } else { - $result = parent::addAttachment($file, $name, $encoding, $type, $disposition); - } - } + $result = parent::addAttachment($file, isset($name[$key]) ? $name[$key] : '', $encoding, $type, $disposition); } // Check for boolean false return if exception handling is disabled @@ -422,7 +414,7 @@ public function addAttachment($path, $name = '', $encoding = 'base64', $type = ' return false; } } else { - $result = parent::addAttachment($path, $name, $encoding, $type); + $result = parent::addAttachment($path, $name, $encoding, $type, $disposition); } // Check for boolean false return if exception handling is disabled diff --git a/libraries/src/Mail/MailTemplate.php b/libraries/src/Mail/MailTemplate.php index 2910b22ec5..cd8d1b366e 100644 --- a/libraries/src/Mail/MailTemplate.php +++ b/libraries/src/Mail/MailTemplate.php @@ -67,6 +67,13 @@ class MailTemplate */ protected $plain_data = []; + /** + * + * @var string[] + * @since 5.1.3 + */ + protected $unsafe_tags = []; + /** * * @var string[] @@ -186,6 +193,20 @@ public function addTemplateData($data, $plain = false) } } + /** + * Mark tags as unsafe to ensure escaping in HTML mails + * + * @param array $tags Tag names + * + * @return void + * + * @since 5.1.3 + */ + public function addUnsafeTags($tags) + { + $this->unsafe_tags = array_merge($this->unsafe_tags, array_map('strtoupper', $tags)); + } + /** * Render and send the mail * @@ -248,7 +269,7 @@ public function send() // Use the plain-text replacement data, if specified. $plainData = $this->plain_data ?: $this->data; $plainBody = $this->replaceTags(Text::_($mail->body), $plainData); - $htmlBody = $this->replaceTags(Text::_($mail->htmlbody), $this->data); + $htmlBody = $this->replaceTags(Text::_($mail->htmlbody), $this->data, true); if ($mailStyle === 'plaintext' || $mailStyle === 'both') { // If the Plain template is empty try to convert the HTML template to a Plain text @@ -269,7 +290,7 @@ public function send() // If HTML body is empty try to convert the Plain template to html if (!$htmlBody) { - $htmlBody = nl2br($plainBody, false); + $htmlBody = nl2br($this->replaceTags(Text::_($mail->body), $plainData, true), false); } $htmlBody = MailHelper::convertRelativeToAbsoluteUrls($htmlBody); @@ -329,14 +350,15 @@ public function send() /** * Replace tags with their values recursively * - * @param string $text The template to process - * @param array $tags An associative array to replace in the template + * @param string $text The template to process + * @param array $tags An associative array to replace in the template + * @param bool $isHtml Is the text an HTML text and requires escaping * * @return string Rendered mail template * * @since 4.0.0 */ - protected function replaceTags($text, $tags) + protected function replaceTags($text, $tags, $isHtml = false) { foreach ($tags as $key => $value) { // If the value is NULL, replace with an empty string. NULL itself throws notices @@ -354,10 +376,22 @@ protected function replaceTags($text, $tags) foreach ($value as $name => $subvalue) { if (\is_array($subvalue) && $name == $matches[1][$i]) { + $subvalue = implode("\n", $subvalue); + + // Escape if necessary + if ($isHtml && \in_array(strtoupper($key), $this->unsafe_tags, true)) { + $subvalue = htmlspecialchars($subvalue, ENT_QUOTES, 'UTF-8'); + } + $replacement .= implode("\n", $subvalue); } elseif (\is_array($subvalue)) { - $replacement .= $this->replaceTags($matches[1][$i], $subvalue); + $replacement .= $this->replaceTags($matches[1][$i], $subvalue, $isHtml); } elseif (\is_string($subvalue) && $name == $matches[1][$i]) { + // Escape if necessary + if ($isHtml && \in_array(strtoupper($key), $this->unsafe_tags, true)) { + $subvalue = htmlspecialchars($subvalue, ENT_QUOTES, 'UTF-8'); + } + $replacement .= $subvalue; } } @@ -366,6 +400,11 @@ protected function replaceTags($text, $tags) } } } else { + // Escape if necessary + if ($isHtml && \in_array(strtoupper($key), $this->unsafe_tags, true)) { + $value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8'); + } + $text = str_replace('{' . strtoupper($key) . '}', $value, $text); } } diff --git a/libraries/src/Pagination/Pagination.php b/libraries/src/Pagination/Pagination.php index 48c8a307c5..c9368063e5 100644 --- a/libraries/src/Pagination/Pagination.php +++ b/libraries/src/Pagination/Pagination.php @@ -663,20 +663,44 @@ protected function _buildDataObject() { $data = new \stdClass(); - // Build the additional URL parameters string. - $params = ''; + // Platform defaults + $defaultUrlParams = [ + 'format' => 'WORD', + 'option' => 'WORD', + 'view' => 'WORD', + 'layout' => 'WORD', + 'tpl' => 'CMD', + 'id' => 'INT', + 'Itemid' => 'INT', + ]; + + // Prepare the routes + $params = []; + + // Use platform defaults if parameter doesn't already exist. + foreach ($defaultUrlParams as $param => $filter) { + $value = $this->app->input->get($param, null, $filter); + + if ($value === null) { + continue; + } + + $params[$param] = $value; + } if (!empty($this->additionalUrlParams)) { foreach ($this->additionalUrlParams as $key => $value) { - $params .= '&' . $key . '=' . $value; + $params[$key] = $value; } } + $params = http_build_query($params); + $data->all = new PaginationObject(Text::_('JLIB_HTML_VIEW_ALL'), $this->prefix); if (!$this->viewall) { $data->all->base = '0'; - $data->all->link = Route::_($params . '&' . $this->prefix . 'limitstart='); + $data->all->link = Route::_('index.php?' . $params . '&' . $this->prefix . 'limitstart='); } // Set the start and previous data objects. @@ -687,9 +711,9 @@ protected function _buildDataObject() $page = ($this->pagesCurrent - 2) * $this->limit; if ($this->hideEmptyLimitstart) { - $data->start->link = Route::_($params . '&' . $this->prefix . 'limitstart='); + $data->start->link = Route::_('index.php?' . $params . '&' . $this->prefix . 'limitstart='); } else { - $data->start->link = Route::_($params . '&' . $this->prefix . 'limitstart=0'); + $data->start->link = Route::_('index.php?' . $params . '&' . $this->prefix . 'limitstart=0'); } $data->start->base = '0'; @@ -698,7 +722,7 @@ protected function _buildDataObject() if ($page === 0 && $this->hideEmptyLimitstart) { $data->previous->link = $data->start->link; } else { - $data->previous->link = Route::_($params . '&' . $this->prefix . 'limitstart=' . $page); + $data->previous->link = Route::_('index.php?' . $params . '&' . $this->prefix . 'limitstart=' . $page); } } @@ -711,9 +735,9 @@ protected function _buildDataObject() $end = ($this->pagesTotal - 1) * $this->limit; $data->next->base = $next; - $data->next->link = Route::_($params . '&' . $this->prefix . 'limitstart=' . $next); + $data->next->link = Route::_('index.php?' . $params . '&' . $this->prefix . 'limitstart=' . $next); $data->end->base = $end; - $data->end->link = Route::_($params . '&' . $this->prefix . 'limitstart=' . $end); + $data->end->link = Route::_('index.php?' . $params . '&' . $this->prefix . 'limitstart=' . $end); } $data->pages = []; @@ -730,7 +754,9 @@ protected function _buildDataObject() if ($offset === 0 && $this->hideEmptyLimitstart) { $data->pages[$i]->link = $data->start->link; } else { - $data->pages[$i]->link = Route::_($params . '&' . $this->prefix . 'limitstart=' . $offset); + $data->pages[$i]->link = Route::_( + 'index.php?' . $params . '&' . $this->prefix . 'limitstart=' . $offset + ); } } else { $data->pages[$i]->active = true; diff --git a/libraries/src/Service/Provider/Session.php b/libraries/src/Service/Provider/Session.php index df97bb9519..4fe992d9e3 100644 --- a/libraries/src/Service/Provider/Session.php +++ b/libraries/src/Service/Provider/Session.php @@ -86,7 +86,7 @@ function (Container $container) { $options['cookie_path'] = $config->get('cookie_path', '/'); return new \Joomla\CMS\Session\Session( - new JoomlaStorage($input, $handler), + new JoomlaStorage($input, $handler, $options), $container->get(DispatcherInterface::class), $options ); @@ -133,7 +133,7 @@ function (Container $container) { $options['cookie_path'] = $config->get('cookie_path', '/'); return new \Joomla\CMS\Session\Session( - new JoomlaStorage($input, $handler), + new JoomlaStorage($input, $handler, $options), $container->get(DispatcherInterface::class), $options ); @@ -174,7 +174,7 @@ function (Container $container) { $options['cookie_path'] = $config->get('cookie_path', '/'); return new \Joomla\CMS\Session\Session( - new JoomlaStorage($input, $handler), + new JoomlaStorage($input, $handler, $options), $container->get(DispatcherInterface::class), $options ); diff --git a/libraries/src/Uri/Uri.php b/libraries/src/Uri/Uri.php index 922472544f..e07db2a268 100644 --- a/libraries/src/Uri/Uri.php +++ b/libraries/src/Uri/Uri.php @@ -249,9 +249,9 @@ public static function isInternal($url) // @see UriTest if ( empty($host) && strpos($uri->path, 'index.php') === 0 - || !empty($host) && preg_match('#' . preg_quote(static::base(), '#') . '#', $base) + || !empty($host) && preg_match('#^' . preg_quote(static::base(), '#') . '#', $base) || !empty($host) && $host === static::getInstance(static::base())->host && strpos($uri->path, 'index.php') !== false - || !empty($host) && $base === $host && preg_match('#' . preg_quote($base, '#') . '#', static::base()) + || !empty($host) && $base === $host && preg_match('#^' . preg_quote($base, '#') . '#', static::base()) ) { return true; } diff --git a/libraries/src/Version.php b/libraries/src/Version.php index 32ed17d54d..48001a267d 100644 --- a/libraries/src/Version.php +++ b/libraries/src/Version.php @@ -55,7 +55,7 @@ final class Version * @var integer * @since 3.8.0 */ - public const PATCH_VERSION = 2; + public const PATCH_VERSION = 3; /** * Extra release version info. @@ -90,7 +90,7 @@ final class Version * @var string * @since 3.5 */ - public const RELDATE = '9-July-2024'; + public const RELDATE = '20-August-2024'; /** * Release time. diff --git a/libraries/vendor/autoload.php b/libraries/vendor/autoload.php index 17ce55e5bc..c3f42d9f08 100644 --- a/libraries/vendor/autoload.php +++ b/libraries/vendor/autoload.php @@ -22,4 +22,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitb25e220b440613ef9279a3625e03eb71::getLoader(); +return ComposerAutoloaderInitaae023790be60da2592864badd7e8a46::getLoader(); diff --git a/libraries/vendor/composer/InstalledVersions.php b/libraries/vendor/composer/InstalledVersions.php index 51e734a774..39e55eab59 100644 --- a/libraries/vendor/composer/InstalledVersions.php +++ b/libraries/vendor/composer/InstalledVersions.php @@ -266,7 +266,7 @@ public static function getRawData() if (null === self::$installed) { // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { + if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) { self::$installed = include __DIR__ . '/installed.php'; } else { self::$installed = array(); @@ -341,7 +341,7 @@ private static function getInstalled() if (null === self::$installed) { // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { + if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) { /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ $required = require __DIR__ . '/installed.php'; self::$installed = $required; diff --git a/libraries/vendor/composer/LICENSE b/libraries/vendor/composer/LICENSE index f27399a042..62ecfd8d00 100644 --- a/libraries/vendor/composer/LICENSE +++ b/libraries/vendor/composer/LICENSE @@ -1,4 +1,3 @@ - Copyright (c) Nils Adermann, Jordi Boggiano Permission is hereby granted, free of charge, to any person obtaining a copy @@ -18,4 +17,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/libraries/vendor/composer/autoload_real.php b/libraries/vendor/composer/autoload_real.php index 25899cacf5..88c9c75849 100644 --- a/libraries/vendor/composer/autoload_real.php +++ b/libraries/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitb25e220b440613ef9279a3625e03eb71 +class ComposerAutoloaderInitaae023790be60da2592864badd7e8a46 { private static $loader; @@ -24,16 +24,16 @@ public static function getLoader() require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInitb25e220b440613ef9279a3625e03eb71', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitaae023790be60da2592864badd7e8a46', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInitb25e220b440613ef9279a3625e03eb71', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitaae023790be60da2592864badd7e8a46', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitb25e220b440613ef9279a3625e03eb71::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitaae023790be60da2592864badd7e8a46::getInitializer($loader)); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInitb25e220b440613ef9279a3625e03eb71::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInitaae023790be60da2592864badd7e8a46::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/libraries/vendor/composer/autoload_static.php b/libraries/vendor/composer/autoload_static.php index cbd0f1b939..2c5c9881d0 100644 --- a/libraries/vendor/composer/autoload_static.php +++ b/libraries/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitb25e220b440613ef9279a3625e03eb71 +class ComposerStaticInitaae023790be60da2592864badd7e8a46 { public static $files = array ( '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', @@ -3999,9 +3999,9 @@ class ComposerStaticInitb25e220b440613ef9279a3625e03eb71 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitb25e220b440613ef9279a3625e03eb71::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitb25e220b440613ef9279a3625e03eb71::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitb25e220b440613ef9279a3625e03eb71::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitaae023790be60da2592864badd7e8a46::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitaae023790be60da2592864badd7e8a46::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitaae023790be60da2592864badd7e8a46::$classMap; }, null, ClassLoader::class); } diff --git a/libraries/vendor/composer/installed.json b/libraries/vendor/composer/installed.json index 9771bf69ae..ad6c50fb3f 100644 --- a/libraries/vendor/composer/installed.json +++ b/libraries/vendor/composer/installed.json @@ -1093,17 +1093,17 @@ }, { "name": "joomla/application", - "version": "3.0.1", - "version_normalized": "3.0.1.0", + "version": "3.0.2", + "version_normalized": "3.0.2.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/application.git", - "reference": "608393d09e355180e858b33f3c49d188c22d279c" + "reference": "dd055642fbe8d7b919a6c6c345a0d016b0981e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/application/zipball/608393d09e355180e858b33f3c49d188c22d279c", - "reference": "608393d09e355180e858b33f3c49d188c22d279c", + "url": "https://api.github.com/repos/joomla-framework/application/zipball/dd055642fbe8d7b919a6c6c345a0d016b0981e65", + "reference": "dd055642fbe8d7b919a6c6c345a0d016b0981e65", "shasum": "" }, "require": { @@ -1126,10 +1126,10 @@ "joomla/uri": "^3.0", "phan/phan": "^5.4", "phpstan/phpstan": "^1.10.7", - "phpunit/phpunit": "^9.5.28", - "rector/rector": "^0.15.21", - "squizlabs/php_codesniffer": "~3.7.1", - "symfony/phpunit-bridge": "^5.0" + "phpunit/phpunit": "^10.0", + "rector/rector": "^1.0", + "squizlabs/php_codesniffer": "~3.10.2", + "symfony/phpunit-bridge": "^7.0" }, "suggest": { "ext-json": "To use JSON format, ext-json is required", @@ -1140,7 +1140,7 @@ "joomla/uri": "^3.0 To use AbstractWebApplication, install joomla/uri", "psr/container": "^1.0 To use the ContainerControllerResolver, install any PSR-11 compatible container" }, - "time": "2024-01-18T17:13:50+00:00", + "time": "2024-08-07T16:49:02+00:00", "type": "library", "extra": { "branch-alias": { @@ -1193,17 +1193,17 @@ }, { "name": "joomla/archive", - "version": "3.0.1", - "version_normalized": "3.0.1.0", + "version": "3.0.2", + "version_normalized": "3.0.2.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/archive.git", - "reference": "8dd5190d54ef6705d48927fbe2d17a3b0184b273" + "reference": "6b44bac8a28cfaf67e7da40bc3b9bd460e8c29c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/archive/zipball/8dd5190d54ef6705d48927fbe2d17a3b0184b273", - "reference": "8dd5190d54ef6705d48927fbe2d17a3b0184b273", + "url": "https://api.github.com/repos/joomla-framework/archive/zipball/6b44bac8a28cfaf67e7da40bc3b9bd460e8c29c5", + "reference": "6b44bac8a28cfaf67e7da40bc3b9bd460e8c29c5", "shasum": "" }, "require": { @@ -1222,7 +1222,7 @@ "ext-zip": "To extract zip compressed packages", "ext-zlib": "To extract gzip or zip compressed packages" }, - "time": "2024-01-21T22:05:29+00:00", + "time": "2024-08-15T17:52:52+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -1249,7 +1249,7 @@ ], "support": { "issues": "https://github.com/joomla-framework/archive/issues", - "source": "https://github.com/joomla-framework/archive/tree/3.0.1" + "source": "https://github.com/joomla-framework/archive/tree/3.0.2" }, "funding": [ { @@ -1265,17 +1265,17 @@ }, { "name": "joomla/authentication", - "version": "3.0.0", - "version_normalized": "3.0.0.0", + "version": "3.0.1", + "version_normalized": "3.0.1.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/authentication.git", - "reference": "c8caa1b772c9ff7442115f68f6d1a6db1f633e8a" + "reference": "8b2d61343c3e108db70de96e2b613ff6f93ad1a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/authentication/zipball/c8caa1b772c9ff7442115f68f6d1a6db1f633e8a", - "reference": "c8caa1b772c9ff7442115f68f6d1a6db1f633e8a", + "url": "https://api.github.com/repos/joomla-framework/authentication/zipball/8b2d61343c3e108db70de96e2b613ff6f93ad1a0", + "reference": "8b2d61343c3e108db70de96e2b613ff6f93ad1a0", "shasum": "" }, "require": { @@ -1294,7 +1294,7 @@ "joomla/database": "Required if you want to use Joomla\\Authentication\\Strategies\\DatabaseStrategy", "joomla/input": "Required if you want to use classes in the Joomla\\Authentication\\Strategies namespace" }, - "time": "2023-10-05T19:38:42+00:00", + "time": "2024-08-15T17:55:34+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -1321,7 +1321,7 @@ ], "support": { "issues": "https://github.com/joomla-framework/authentication/issues", - "source": "https://github.com/joomla-framework/authentication/tree/3.0.0" + "source": "https://github.com/joomla-framework/authentication/tree/3.0.1" }, "funding": [ { @@ -1337,17 +1337,17 @@ }, { "name": "joomla/console", - "version": "3.0.0", - "version_normalized": "3.0.0.0", + "version": "3.0.1", + "version_normalized": "3.0.1.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/console.git", - "reference": "e105c751a53b63d5ff932c122e31ddf5480aa66d" + "reference": "03ad84c3f690aaab9d29165844c0a8eb96dc31a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/console/zipball/e105c751a53b63d5ff932c122e31ddf5480aa66d", - "reference": "e105c751a53b63d5ff932c122e31ddf5480aa66d", + "url": "https://api.github.com/repos/joomla-framework/console/zipball/03ad84c3f690aaab9d29165844c0a8eb96dc31a8", + "reference": "03ad84c3f690aaab9d29165844c0a8eb96dc31a8", "shasum": "" }, "require": { @@ -1369,7 +1369,7 @@ "suggest": { "psr/container-implementation": "To use the ContainerLoader" }, - "time": "2023-10-05T20:00:00+00:00", + "time": "2024-07-17T19:34:34+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -1396,7 +1396,7 @@ ], "support": { "issues": "https://github.com/joomla-framework/console/issues", - "source": "https://github.com/joomla-framework/console/tree/3.0.0" + "source": "https://github.com/joomla-framework/console/tree/3.0.1" }, "funding": [ { @@ -1412,17 +1412,17 @@ }, { "name": "joomla/crypt", - "version": "3.0.0", - "version_normalized": "3.0.0.0", + "version": "3.0.1", + "version_normalized": "3.0.1.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/crypt.git", - "reference": "2f1c4e43eeb520557887a9e6ed6b2747485ee78d" + "reference": "3ecc66347117d08866a9144b908ac4a2994bbea2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/crypt/zipball/2f1c4e43eeb520557887a9e6ed6b2747485ee78d", - "reference": "2f1c4e43eeb520557887a9e6ed6b2747485ee78d", + "url": "https://api.github.com/repos/joomla-framework/crypt/zipball/3ecc66347117d08866a9144b908ac4a2994bbea2", + "reference": "3ecc66347117d08866a9144b908ac4a2994bbea2", "shasum": "" }, "require": { @@ -1430,7 +1430,7 @@ }, "require-dev": { "defuse/php-encryption": "^2.0", - "paragonie/sodium_compat": "^1.0", + "paragonie/sodium_compat": "^1|^2", "phan/phan": "^5.4.2", "phpstan/phpstan": "^1.10.7", "phpunit/phpunit": "^9.5.28", @@ -1444,7 +1444,7 @@ "ext-sodium": "To use the Sodium cipher", "paragonie/sodium_compat": "To use Sodium cipher if neither ext/sodium or ext/libsodium are available" }, - "time": "2023-10-05T20:18:57+00:00", + "time": "2024-08-15T19:53:48+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -1471,7 +1471,7 @@ ], "support": { "issues": "https://github.com/joomla-framework/crypt/issues", - "source": "https://github.com/joomla-framework/crypt/tree/3.0.0" + "source": "https://github.com/joomla-framework/crypt/tree/3.0.1" }, "funding": [ { @@ -1487,17 +1487,17 @@ }, { "name": "joomla/data", - "version": "3.0.0", - "version_normalized": "3.0.0.0", + "version": "3.0.1", + "version_normalized": "3.0.1.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/data.git", - "reference": "1fd9dbac7a19c761874784ea4c8215c3c3ff775b" + "reference": "34ac195b12ef3572991f0c30258fc500c1d319b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/data/zipball/1fd9dbac7a19c761874784ea4c8215c3c3ff775b", - "reference": "1fd9dbac7a19c761874784ea4c8215c3c3ff775b", + "url": "https://api.github.com/repos/joomla-framework/data/zipball/34ac195b12ef3572991f0c30258fc500c1d319b7", + "reference": "34ac195b12ef3572991f0c30258fc500c1d319b7", "shasum": "" }, "require": { @@ -1511,7 +1511,7 @@ "phpunit/phpunit": "^9.5.28", "squizlabs/php_codesniffer": "~3.7.2" }, - "time": "2023-10-06T15:50:35+00:00", + "time": "2024-08-15T19:57:34+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -1538,7 +1538,7 @@ ], "support": { "issues": "https://github.com/joomla-framework/data/issues", - "source": "https://github.com/joomla-framework/data/tree/3.0.0" + "source": "https://github.com/joomla-framework/data/tree/3.0.1" }, "funding": [ { @@ -1554,17 +1554,17 @@ }, { "name": "joomla/database", - "version": "3.0.0", - "version_normalized": "3.0.0.0", + "version": "3.2.0", + "version_normalized": "3.2.0.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/database.git", - "reference": "d440247b1e07710f22d5e07650393fbd9364b01e" + "reference": "7abff998d4e0d63c0469dae5358822e757928871" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/database/zipball/d440247b1e07710f22d5e07650393fbd9364b01e", - "reference": "d440247b1e07710f22d5e07650393fbd9364b01e", + "url": "https://api.github.com/repos/joomla-framework/database/zipball/7abff998d4e0d63c0469dae5358822e757928871", + "reference": "7abff998d4e0d63c0469dae5358822e757928871", "shasum": "" }, "require": { @@ -1597,7 +1597,7 @@ "joomla/registry": "To use the Database ServiceProviderInterface objects, install joomla/registry.", "psr/log": "To use the LoggingMonitor, install psr/log." }, - "time": "2023-10-06T17:19:23+00:00", + "time": "2024-08-15T10:09:54+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -1624,7 +1624,7 @@ ], "support": { "issues": "https://github.com/joomla-framework/database/issues", - "source": "https://github.com/joomla-framework/database/tree/3.0.0" + "source": "https://github.com/joomla-framework/database/tree/3.2.0" }, "funding": [ { @@ -1640,17 +1640,17 @@ }, { "name": "joomla/di", - "version": "3.0.0", - "version_normalized": "3.0.0.0", + "version": "3.0.1", + "version_normalized": "3.0.1.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/di.git", - "reference": "ec3866463257b3d4bfbd5ed0900a5e5505b909cb" + "reference": "33d6b586663906567316b402cf6b44fe3b79cb2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/di/zipball/ec3866463257b3d4bfbd5ed0900a5e5505b909cb", - "reference": "ec3866463257b3d4bfbd5ed0900a5e5505b909cb", + "url": "https://api.github.com/repos/joomla-framework/di/zipball/33d6b586663906567316b402cf6b44fe3b79cb2d", + "reference": "33d6b586663906567316b402cf6b44fe3b79cb2d", "shasum": "" }, "require": { @@ -1668,7 +1668,7 @@ "phpunit/phpunit": "^9.5.28", "squizlabs/php_codesniffer": "~3.7.2" }, - "time": "2023-10-06T16:05:26+00:00", + "time": "2024-08-15T20:00:49+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -1698,7 +1698,7 @@ ], "support": { "issues": "https://github.com/joomla-framework/di/issues", - "source": "https://github.com/joomla-framework/di/tree/3.0.0" + "source": "https://github.com/joomla-framework/di/tree/3.0.1" }, "funding": [ { @@ -1714,17 +1714,17 @@ }, { "name": "joomla/event", - "version": "3.0.0", - "version_normalized": "3.0.0.0", + "version": "3.0.1", + "version_normalized": "3.0.1.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/event.git", - "reference": "b259ffdb574067ec74953693cb61a9690291920e" + "reference": "c1444f72764c395e34720f98386989f4bde8f4ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/event/zipball/b259ffdb574067ec74953693cb61a9690291920e", - "reference": "b259ffdb574067ec74953693cb61a9690291920e", + "url": "https://api.github.com/repos/joomla-framework/event/zipball/c1444f72764c395e34720f98386989f4bde8f4ac", + "reference": "c1444f72764c395e34720f98386989f4bde8f4ac", "shasum": "" }, "require": { @@ -1743,7 +1743,7 @@ "joomla/console": "If you want to use the DebugEventDispatcherCommand class, please install joomla/console", "psr/container-implementation": "If you want to use the LazyServiceEventListener class, please install a PSR-11 container" }, - "time": "2023-10-06T19:19:02+00:00", + "time": "2024-08-16T06:22:30+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -1770,7 +1770,7 @@ ], "support": { "issues": "https://github.com/joomla-framework/event/issues", - "source": "https://github.com/joomla-framework/event/tree/3.0.0" + "source": "https://github.com/joomla-framework/event/tree/3.0.1" }, "funding": [ { @@ -1786,17 +1786,17 @@ }, { "name": "joomla/filesystem", - "version": "3.0.0", - "version_normalized": "3.0.0.0", + "version": "3.0.1", + "version_normalized": "3.0.1.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/filesystem.git", - "reference": "1398fe1b3acbd97c5237cd9b405530a1f7d49daa" + "reference": "c636a134c95f9c7003cdf8f8d18d416a83688f2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/filesystem/zipball/1398fe1b3acbd97c5237cd9b405530a1f7d49daa", - "reference": "1398fe1b3acbd97c5237cd9b405530a1f7d49daa", + "url": "https://api.github.com/repos/joomla-framework/filesystem/zipball/c636a134c95f9c7003cdf8f8d18d416a83688f2a", + "reference": "c636a134c95f9c7003cdf8f8d18d416a83688f2a", "shasum": "" }, "require": { @@ -1810,7 +1810,7 @@ "phpunit/phpunit": "^9.5.28", "squizlabs/php_codesniffer": "^3.7.2" }, - "time": "2023-10-07T21:08:48+00:00", + "time": "2024-08-16T09:41:56+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -1837,7 +1837,7 @@ ], "support": { "issues": "https://github.com/joomla-framework/filesystem/issues", - "source": "https://github.com/joomla-framework/filesystem/tree/3.0.0" + "source": "https://github.com/joomla-framework/filesystem/tree/3.0.1" }, "funding": [ { @@ -1853,17 +1853,17 @@ }, { "name": "joomla/filter", - "version": "3.0.1", - "version_normalized": "3.0.1.0", + "version": "dev-3x-outputfilter-case", + "version_normalized": "dev-3x-outputfilter-case", "source": { "type": "git", - "url": "https://github.com/joomla-framework/filter.git", - "reference": "552b882b374aae70759e65e4f87e4db232b5f32e" + "url": "git@github.com:joomla-framework/security-filter.git", + "reference": "135606b04dd012d2f750a351418a4118b1d39d8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/filter/zipball/552b882b374aae70759e65e4f87e4db232b5f32e", - "reference": "552b882b374aae70759e65e4f87e4db232b5f32e", + "url": "https://api.github.com/repos/joomla-framework/security-filter/zipball/135606b04dd012d2f750a351418a4118b1d39d8e", + "reference": "135606b04dd012d2f750a351418a4118b1d39d8e", "shasum": "" }, "require": { @@ -1880,7 +1880,7 @@ "suggest": { "joomla/language": "Required only if you want to use `OutputFilter::stringURLSafe`." }, - "time": "2024-02-20T16:41:55+00:00", + "time": "2024-08-09T07:18:47+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -1894,7 +1894,11 @@ "Joomla\\Filter\\": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-4": { + "Joomla\\Filter\\Tests\\": "Tests/" + } + }, "license": [ "GPL-2.0-or-later" ], @@ -1906,17 +1910,17 @@ "joomla" ], "support": { - "issues": "https://github.com/joomla-framework/filter/issues", - "source": "https://github.com/joomla-framework/filter/tree/3.0.1" + "source": "https://github.com/joomla-framework/security-filter/tree/3x-outputfilter-case", + "issues": "https://github.com/joomla-framework/security-filter/issues" }, "funding": [ { - "url": "https://community.joomla.org/sponsorship-campaigns.html", - "type": "custom" + "type": "github", + "url": "https://github.com/joomla" }, { - "url": "https://github.com/joomla", - "type": "github" + "type": "custom", + "url": "https://community.joomla.org/sponsorship-campaigns.html" } ], "install-path": "../joomla/filter" @@ -2428,17 +2432,17 @@ }, { "name": "joomla/session", - "version": "3.0.0", - "version_normalized": "3.0.0.0", + "version": "3.0.1", + "version_normalized": "3.0.1.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/session.git", - "reference": "be15f3eee054802c3d8dfeabb2e42ecbe5a4c574" + "reference": "1899f93e399a5183eb6e5e72aacc8c924c416ac2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/session/zipball/be15f3eee054802c3d8dfeabb2e42ecbe5a4c574", - "reference": "be15f3eee054802c3d8dfeabb2e42ecbe5a4c574", + "url": "https://api.github.com/repos/joomla-framework/session/zipball/1899f93e399a5183eb6e5e72aacc8c924c416ac2", + "reference": "1899f93e399a5183eb6e5e72aacc8c924c416ac2", "shasum": "" }, "require": { @@ -2468,7 +2472,7 @@ "joomla/event": "The joomla/event package is required to use Joomla\\Session\\Session.", "joomla/input": "The joomla/input package is required to use Address and Forwarded session validators." }, - "time": "2023-10-08T14:30:42+00:00", + "time": "2024-08-16T09:17:14+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -2495,7 +2499,7 @@ ], "support": { "issues": "https://github.com/joomla-framework/session/issues", - "source": "https://github.com/joomla-framework/session/tree/3.0.0" + "source": "https://github.com/joomla-framework/session/tree/3.0.1" }, "funding": [ { @@ -2511,17 +2515,17 @@ }, { "name": "joomla/string", - "version": "3.0.0", - "version_normalized": "3.0.0.0", + "version": "3.0.1", + "version_normalized": "3.0.1.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/string.git", - "reference": "9d76d779450745679c2fa591add238b5dd3f203f" + "reference": "fadb95a9e67dbe24ea905dc60b74008cce5990ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/string/zipball/9d76d779450745679c2fa591add238b5dd3f203f", - "reference": "9d76d779450745679c2fa591add238b5dd3f203f", + "url": "https://api.github.com/repos/joomla-framework/string/zipball/fadb95a9e67dbe24ea905dc60b74008cce5990ea", + "reference": "fadb95a9e67dbe24ea905dc60b74008cce5990ea", "shasum": "" }, "require": { @@ -2543,7 +2547,7 @@ "doctrine/inflector": "To use the string inflector", "ext-mbstring": "For improved processing" }, - "time": "2023-10-08T14:33:26+00:00", + "time": "2024-08-16T08:56:24+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -2587,7 +2591,7 @@ ], "support": { "issues": "https://github.com/joomla-framework/string/issues", - "source": "https://github.com/joomla-framework/string/tree/3.0.0" + "source": "https://github.com/joomla-framework/string/tree/3.0.1" }, "funding": [ { diff --git a/libraries/vendor/composer/installed.php b/libraries/vendor/composer/installed.php index 5e254a5fb0..5a47e03069 100644 --- a/libraries/vendor/composer/installed.php +++ b/libraries/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'joomla/joomla-cms', 'pretty_version' => 'dev-5.1-dev', 'version' => 'dev-5.1-dev', - 'reference' => '6a587ced0894af8568c96974ebee55479ae6851d', + 'reference' => '458d846681bd92a64e0e7a2b3a39159c8e751c0d', 'type' => 'project', 'install_path' => __DIR__ . '/../../../', 'aliases' => array(), @@ -155,102 +155,104 @@ 'dev_requirement' => false, ), 'joomla/application' => array( - 'pretty_version' => '3.0.1', - 'version' => '3.0.1.0', - 'reference' => '608393d09e355180e858b33f3c49d188c22d279c', + 'pretty_version' => '3.0.2', + 'version' => '3.0.2.0', + 'reference' => 'dd055642fbe8d7b919a6c6c345a0d016b0981e65', 'type' => 'library', 'install_path' => __DIR__ . '/../joomla/application', 'aliases' => array(), 'dev_requirement' => false, ), 'joomla/archive' => array( - 'pretty_version' => '3.0.1', - 'version' => '3.0.1.0', - 'reference' => '8dd5190d54ef6705d48927fbe2d17a3b0184b273', + 'pretty_version' => '3.0.2', + 'version' => '3.0.2.0', + 'reference' => '6b44bac8a28cfaf67e7da40bc3b9bd460e8c29c5', 'type' => 'joomla-package', 'install_path' => __DIR__ . '/../joomla/archive', 'aliases' => array(), 'dev_requirement' => false, ), 'joomla/authentication' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', - 'reference' => 'c8caa1b772c9ff7442115f68f6d1a6db1f633e8a', + 'pretty_version' => '3.0.1', + 'version' => '3.0.1.0', + 'reference' => '8b2d61343c3e108db70de96e2b613ff6f93ad1a0', 'type' => 'joomla-package', 'install_path' => __DIR__ . '/../joomla/authentication', 'aliases' => array(), 'dev_requirement' => false, ), 'joomla/console' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', - 'reference' => 'e105c751a53b63d5ff932c122e31ddf5480aa66d', + 'pretty_version' => '3.0.1', + 'version' => '3.0.1.0', + 'reference' => '03ad84c3f690aaab9d29165844c0a8eb96dc31a8', 'type' => 'joomla-package', 'install_path' => __DIR__ . '/../joomla/console', 'aliases' => array(), 'dev_requirement' => false, ), 'joomla/crypt' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', - 'reference' => '2f1c4e43eeb520557887a9e6ed6b2747485ee78d', + 'pretty_version' => '3.0.1', + 'version' => '3.0.1.0', + 'reference' => '3ecc66347117d08866a9144b908ac4a2994bbea2', 'type' => 'joomla-package', 'install_path' => __DIR__ . '/../joomla/crypt', 'aliases' => array(), 'dev_requirement' => false, ), 'joomla/data' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', - 'reference' => '1fd9dbac7a19c761874784ea4c8215c3c3ff775b', + 'pretty_version' => '3.0.1', + 'version' => '3.0.1.0', + 'reference' => '34ac195b12ef3572991f0c30258fc500c1d319b7', 'type' => 'joomla-package', 'install_path' => __DIR__ . '/../joomla/data', 'aliases' => array(), 'dev_requirement' => false, ), 'joomla/database' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', - 'reference' => 'd440247b1e07710f22d5e07650393fbd9364b01e', + 'pretty_version' => '3.2.0', + 'version' => '3.2.0.0', + 'reference' => '7abff998d4e0d63c0469dae5358822e757928871', 'type' => 'joomla-package', 'install_path' => __DIR__ . '/../joomla/database', 'aliases' => array(), 'dev_requirement' => false, ), 'joomla/di' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', - 'reference' => 'ec3866463257b3d4bfbd5ed0900a5e5505b909cb', + 'pretty_version' => '3.0.1', + 'version' => '3.0.1.0', + 'reference' => '33d6b586663906567316b402cf6b44fe3b79cb2d', 'type' => 'joomla-package', 'install_path' => __DIR__ . '/../joomla/di', 'aliases' => array(), 'dev_requirement' => false, ), 'joomla/event' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', - 'reference' => 'b259ffdb574067ec74953693cb61a9690291920e', + 'pretty_version' => '3.0.1', + 'version' => '3.0.1.0', + 'reference' => 'c1444f72764c395e34720f98386989f4bde8f4ac', 'type' => 'joomla-package', 'install_path' => __DIR__ . '/../joomla/event', 'aliases' => array(), 'dev_requirement' => false, ), 'joomla/filesystem' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', - 'reference' => '1398fe1b3acbd97c5237cd9b405530a1f7d49daa', + 'pretty_version' => '3.0.1', + 'version' => '3.0.1.0', + 'reference' => 'c636a134c95f9c7003cdf8f8d18d416a83688f2a', 'type' => 'joomla-package', 'install_path' => __DIR__ . '/../joomla/filesystem', 'aliases' => array(), 'dev_requirement' => false, ), 'joomla/filter' => array( - 'pretty_version' => '3.0.1', - 'version' => '3.0.1.0', - 'reference' => '552b882b374aae70759e65e4f87e4db232b5f32e', + 'pretty_version' => 'dev-3x-outputfilter-case', + 'version' => 'dev-3x-outputfilter-case', + 'reference' => '135606b04dd012d2f750a351418a4118b1d39d8e', 'type' => 'joomla-package', 'install_path' => __DIR__ . '/../joomla/filter', - 'aliases' => array(), + 'aliases' => array( + 0 => '3.0.2', + ), 'dev_requirement' => false, ), 'joomla/http' => array( @@ -274,7 +276,7 @@ 'joomla/joomla-cms' => array( 'pretty_version' => 'dev-5.1-dev', 'version' => 'dev-5.1-dev', - 'reference' => '6a587ced0894af8568c96974ebee55479ae6851d', + 'reference' => '458d846681bd92a64e0e7a2b3a39159c8e751c0d', 'type' => 'project', 'install_path' => __DIR__ . '/../../../', 'aliases' => array(), @@ -326,18 +328,18 @@ 'dev_requirement' => false, ), 'joomla/session' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', - 'reference' => 'be15f3eee054802c3d8dfeabb2e42ecbe5a4c574', + 'pretty_version' => '3.0.1', + 'version' => '3.0.1.0', + 'reference' => '1899f93e399a5183eb6e5e72aacc8c924c416ac2', 'type' => 'joomla-package', 'install_path' => __DIR__ . '/../joomla/session', 'aliases' => array(), 'dev_requirement' => false, ), 'joomla/string' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', - 'reference' => '9d76d779450745679c2fa591add238b5dd3f203f', + 'pretty_version' => '3.0.1', + 'version' => '3.0.1.0', + 'reference' => 'fadb95a9e67dbe24ea905dc60b74008cce5990ea', 'type' => 'joomla-package', 'install_path' => __DIR__ . '/../joomla/string', 'aliases' => array(), diff --git a/libraries/vendor/joomla/application/src/AbstractApplication.php b/libraries/vendor/joomla/application/src/AbstractApplication.php index 521457afe8..b68521154d 100644 --- a/libraries/vendor/joomla/application/src/AbstractApplication.php +++ b/libraries/vendor/joomla/application/src/AbstractApplication.php @@ -51,7 +51,7 @@ abstract class AbstractApplication implements * * @since 1.0.0 */ - public function __construct(Registry $config = null) + public function __construct(?Registry $config = null) { $this->config = $config ?: new Registry(); diff --git a/libraries/vendor/joomla/application/src/AbstractWebApplication.php b/libraries/vendor/joomla/application/src/AbstractWebApplication.php index a7d3522fc5..23464c0010 100644 --- a/libraries/vendor/joomla/application/src/AbstractWebApplication.php +++ b/libraries/vendor/joomla/application/src/AbstractWebApplication.php @@ -191,10 +191,10 @@ abstract class AbstractWebApplication extends AbstractApplication implements Web * @since 1.0.0 */ public function __construct( - Input $input = null, - Registry $config = null, - WebClient $client = null, - ResponseInterface $response = null + ?Input $input = null, + ?Registry $config = null, + ?WebClient $client = null, + ?ResponseInterface $response = null ) { $this->input = $input ?: new Input(); $this->client = $client ?: new WebClient(); diff --git a/libraries/vendor/joomla/application/src/WebApplication.php b/libraries/vendor/joomla/application/src/WebApplication.php index 66f447c6f1..e55cdd5e42 100644 --- a/libraries/vendor/joomla/application/src/WebApplication.php +++ b/libraries/vendor/joomla/application/src/WebApplication.php @@ -46,22 +46,22 @@ class WebApplication extends AbstractWebApplication implements SessionAwareWebAp * * @param ControllerResolverInterface $controllerResolver The application's controller resolver * @param RouterInterface $router The application's router - * @param Input ?$input An optional argument to provide dependency injection + * @param Input|null $input An optional argument to provide dependency injection * for the application's input object. If the argument * is an Input object that object will become the * application's input object, otherwise a default input * object is created. - * @param Registry ?$config An optional argument to provide dependency injection + * @param Registry|null $config An optional argument to provide dependency injection * for the application's config object. If the argument * is a Registry object that object will become the * application's config object, otherwise a default * config object is created. - * @param Web\WebClient ?$client An optional argument to provide dependency injection + * @param WebClient|null $client An optional argument to provide dependency injection * for the application's client object. If the argument * is a Web\WebClient object that object will become the * application's client object, otherwise a default * client object is created. - * @param ResponseInterface ?$response An optional argument to provide dependency injection + * @param ResponseInterface|null $response An optional argument to provide dependency injection * for the application's response object. If the * argument is a ResponseInterface object that object * will become the application's response object, @@ -72,10 +72,10 @@ class WebApplication extends AbstractWebApplication implements SessionAwareWebAp public function __construct( ControllerResolverInterface $controllerResolver, RouterInterface $router, - Input $input = null, - Registry $config = null, - WebClient $client = null, - ResponseInterface $response = null + ?Input $input = null, + ?Registry $config = null, + ?WebClient $client = null, + ?ResponseInterface $response = null ) { $this->controllerResolver = $controllerResolver; $this->router = $router; diff --git a/libraries/vendor/joomla/console/src/Descriptor/ApplicationDescription.php b/libraries/vendor/joomla/console/src/Descriptor/ApplicationDescription.php index 4538d9f8c0..65b89fc197 100644 --- a/libraries/vendor/joomla/console/src/Descriptor/ApplicationDescription.php +++ b/libraries/vendor/joomla/console/src/Descriptor/ApplicationDescription.php @@ -146,8 +146,8 @@ public function getCommand(string $name): AbstractCommand /** * Returns the namespace part of the command name. * - * @param string $name The command name to process - * @param integer $limit The maximum number of parts of the namespace + * @param string $name The command name to process + * @param ?integer $limit The maximum number of parts of the namespace * * @return string * diff --git a/libraries/vendor/joomla/data/src/DumpableInterface.php b/libraries/vendor/joomla/data/src/DumpableInterface.php index 5482b42585..108bb6ef8b 100644 --- a/libraries/vendor/joomla/data/src/DumpableInterface.php +++ b/libraries/vendor/joomla/data/src/DumpableInterface.php @@ -24,7 +24,7 @@ interface DumpableInterface * form. A depth of 1 will recurse into the first level of properties only. * @param ?\SplObjectStorage $dumped An array of already serialized objects that is used to avoid infinite loops. * - * @return \stdClass + * @return \stdClass|array * * @since 1.0 */ diff --git a/libraries/vendor/joomla/database/src/Command/ExportCommand.php b/libraries/vendor/joomla/database/src/Command/ExportCommand.php index e784eaa7e3..ab4d172f0a 100644 --- a/libraries/vendor/joomla/database/src/Command/ExportCommand.php +++ b/libraries/vendor/joomla/database/src/Command/ExportCommand.php @@ -16,9 +16,9 @@ use Joomla\Database\Exception\UnsupportedAdapterException; use Joomla\Filesystem\File; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Console\Input\InputOption; /** * Console command for exporting the database @@ -118,6 +118,9 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in /** @var Zip $zipArchive */ $zipArchive = (new Archive())->getAdapter('zip'); + + $filenames = []; + $zipFilesArray = []; } foreach ($tables as $table) { @@ -137,15 +140,21 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in File::write($filename, $data); if ($zip) { - $zipFilesArray = [['name' => $table . '.xml', 'data' => $data]]; - $zipArchive->create($zipFile, $zipFilesArray); - File::delete($filename); + $zipFilesArray[] = ['name' => $table . '.xml', 'data' => $data]; + $filenames[] = $filename; } $symfonyStyle->text(sprintf('Exported data for %s in %d seconds', $table, round(microtime(true) - $taskTime, 3))); } } + if ($zip) { + $zipArchive->create($zipFile, $zipFilesArray); + foreach ($filenames as $fname) { + File::delete($fname); + } + } + $symfonyStyle->success(sprintf('Export completed in %d seconds', round(microtime(true) - $totalTime, 3))); return 0; diff --git a/libraries/vendor/joomla/database/src/DatabaseDriver.php b/libraries/vendor/joomla/database/src/DatabaseDriver.php index 420c598c64..849dd12bda 100644 --- a/libraries/vendor/joomla/database/src/DatabaseDriver.php +++ b/libraries/vendor/joomla/database/src/DatabaseDriver.php @@ -1721,7 +1721,7 @@ public function getMonitor() * * @since 2.0.0 */ - public function setMonitor(QueryMonitorInterface $monitor = null) + public function setMonitor(?QueryMonitorInterface $monitor = null) { $this->monitor = $monitor; diff --git a/libraries/vendor/joomla/database/src/DatabaseQuery.php b/libraries/vendor/joomla/database/src/DatabaseQuery.php index e9690b8d0f..b288c4df91 100644 --- a/libraries/vendor/joomla/database/src/DatabaseQuery.php +++ b/libraries/vendor/joomla/database/src/DatabaseQuery.php @@ -303,7 +303,7 @@ abstract class DatabaseQuery implements QueryInterface * * @since 1.0 */ - public function __construct(DatabaseInterface $db = null) + public function __construct(?DatabaseInterface $db = null) { $this->db = $db; } diff --git a/libraries/vendor/joomla/database/src/Exception/ConnectionFailureException.php b/libraries/vendor/joomla/database/src/Exception/ConnectionFailureException.php index 92dbf7e767..c180984f2b 100644 --- a/libraries/vendor/joomla/database/src/Exception/ConnectionFailureException.php +++ b/libraries/vendor/joomla/database/src/Exception/ConnectionFailureException.php @@ -25,7 +25,7 @@ class ConnectionFailureException extends \RuntimeException * * @since 2.0.0 */ - public function __construct($message = '', $code = 0, \Exception $previous = null) + public function __construct($message = '', $code = 0, ?\Exception $previous = null) { // PDO uses strings for exception codes, PHP forces numeric codes, so "force" the string code to be used parent::__construct($message, 0, $previous); diff --git a/libraries/vendor/joomla/database/src/Exception/ExecutionFailureException.php b/libraries/vendor/joomla/database/src/Exception/ExecutionFailureException.php index 2cadff770b..db0579278c 100644 --- a/libraries/vendor/joomla/database/src/Exception/ExecutionFailureException.php +++ b/libraries/vendor/joomla/database/src/Exception/ExecutionFailureException.php @@ -34,7 +34,7 @@ class ExecutionFailureException extends \RuntimeException * * @since 1.5.0 */ - public function __construct($query, $message = '', $code = 0, \Exception $previous = null) + public function __construct($query, $message = '', $code = 0, ?\Exception $previous = null) { // PDO uses strings for exception codes, PHP forces numeric codes, so "force" the string code to be used parent::__construct($message, 0, $previous); diff --git a/libraries/vendor/joomla/database/src/Exception/PrepareStatementFailureException.php b/libraries/vendor/joomla/database/src/Exception/PrepareStatementFailureException.php index 4082af0511..137c90e471 100644 --- a/libraries/vendor/joomla/database/src/Exception/PrepareStatementFailureException.php +++ b/libraries/vendor/joomla/database/src/Exception/PrepareStatementFailureException.php @@ -25,7 +25,7 @@ class PrepareStatementFailureException extends \RuntimeException * * @since 2.0.0 */ - public function __construct($message = '', $code = 0, \Exception $previous = null) + public function __construct($message = '', $code = 0, ?\Exception $previous = null) { // PDO uses strings for exception codes, PHP forces numeric codes, so "force" the string code to be used parent::__construct($message, 0, $previous); diff --git a/libraries/vendor/joomla/database/src/Mysql/MysqlDriver.php b/libraries/vendor/joomla/database/src/Mysql/MysqlDriver.php index 7a7c5c897c..c41517d045 100644 --- a/libraries/vendor/joomla/database/src/Mysql/MysqlDriver.php +++ b/libraries/vendor/joomla/database/src/Mysql/MysqlDriver.php @@ -486,8 +486,8 @@ public function getTableList() { $this->connect(); - // Set the query to get the tables statement. - return $this->setQuery('SHOW TABLES')->loadColumn(); + // Set the query to get the tables statement and not the views. + return $this->setQuery('SHOW FULL TABLES WHERE table_type="BASE TABLE"')->loadColumn(); } /** diff --git a/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php b/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php index ee0fe407e1..7050f7b05d 100644 --- a/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php +++ b/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php @@ -631,8 +631,8 @@ public function getTableList() { $this->connect(); - // Set the query to get the tables statement. - return $this->setQuery('SHOW TABLES')->loadColumn(); + // Set the query to get the tables statement and not the views. + return $this->setQuery('SHOW FULL TABLES WHERE table_type="BASE TABLE"')->loadColumn(); } /** diff --git a/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php b/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php index f5eb05c749..afda7b7206 100644 --- a/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php +++ b/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php @@ -158,7 +158,7 @@ public function prepareParameterKeyMapping($sql) $quoteChar = ''; $literal = ''; $mapping = []; - $replace = []; + $position = 0; $matches = []; $pattern = '/([:][a-zA-Z0-9_]+)/'; @@ -197,11 +197,15 @@ public function prepareParameterKeyMapping($sql) $literal .= substr($substring, 0, $match[1]); } - $mapping[$match[0]] = \count($mapping); + if (!isset($mapping[$match[0]])) { + $mapping[$match[0]] = []; + } + + $mapping[$match[0]][] = $position++; $endOfPlaceholder = $match[1] + strlen($match[0]); $beginOfNextPlaceholder = $matches[0][$i + 1][1] ?? strlen($substring); $beginOfNextPlaceholder -= $endOfPlaceholder; - $literal .= '?' . substr($substring, $endOfPlaceholder, $beginOfNextPlaceholder); + $literal .= '?' . substr($substring, $endOfPlaceholder, $beginOfNextPlaceholder); } } else { $literal .= $substring; @@ -371,8 +375,12 @@ public function execute(?array $parameters = null) if (!empty($this->parameterKeyMapping)) { foreach ($this->bindedValues as $key => &$value) { - $params[$this->parameterKeyMapping[$key]] =& $value; - $types[$this->parameterKeyMapping[$key]] = $this->typesKeyMapping[$key]; + $paramKey = $this->parameterKeyMapping[$key]; + + foreach ($paramKey as $currentKey) { + $params[$currentKey] =& $value; + $types[$currentKey] = $this->typesKeyMapping[$key]; + } } } else { foreach ($this->bindedValues as $key => &$value) { diff --git a/libraries/vendor/joomla/database/src/Query/MysqlQueryBuilder.php b/libraries/vendor/joomla/database/src/Query/MysqlQueryBuilder.php index ef106a7aaf..5dc69a7886 100644 --- a/libraries/vendor/joomla/database/src/Query/MysqlQueryBuilder.php +++ b/libraries/vendor/joomla/database/src/Query/MysqlQueryBuilder.php @@ -210,9 +210,18 @@ public function findInSet($value, $set) * * @since 2.0.0 * @throws \RuntimeException + * + * @todo Remove this method when the database version requirements have been raised + * to >= 8.0.0 for MySQL and >= 10.2.0 for MariaDB so the ROW_NUMBER() window + * function can be used in any case. */ public function selectRowNumber($orderBy, $orderColumnAlias) { + // Use parent method with ROW_NUMBER() window function on MariaDB 11.0.0 and newer. + if ($this->db->isMariaDb() && version_compare($this->db->getVersion(), '11.0.0', '>=')) { + return parent::selectRowNumber($orderBy, $orderColumnAlias); + } + $this->validateRowNumber($orderBy, $orderColumnAlias); return $this->select("(SELECT @rownum := @rownum + 1 FROM (SELECT @rownum := 0) AS r) AS $orderColumnAlias"); diff --git a/libraries/vendor/joomla/database/src/QueryInterface.php b/libraries/vendor/joomla/database/src/QueryInterface.php index 62c2ebcb0a..4b4d823fde 100644 --- a/libraries/vendor/joomla/database/src/QueryInterface.php +++ b/libraries/vendor/joomla/database/src/QueryInterface.php @@ -10,9 +10,9 @@ namespace Joomla\Database; use Joomla\Database\Exception\QueryTypeAlreadyDefinedException; +use Joomla\Database\Exception\UnknownTypeException; use Joomla\Database\Query\LimitableInterface; use Joomla\Database\Query\PreparableInterface; -use Joomla\Database\Exception\UnknownTypeException; /** * Joomla Framework Query Building Interface. diff --git a/libraries/vendor/joomla/database/src/Sqlsrv/SqlsrvDriver.php b/libraries/vendor/joomla/database/src/Sqlsrv/SqlsrvDriver.php index 43a98874b2..6dfc1a16b8 100644 --- a/libraries/vendor/joomla/database/src/Sqlsrv/SqlsrvDriver.php +++ b/libraries/vendor/joomla/database/src/Sqlsrv/SqlsrvDriver.php @@ -88,6 +88,7 @@ public function __construct(array $options) $options['password'] = $options['password'] ?? ''; $options['database'] = $options['database'] ?? ''; $options['select'] = isset($options['select']) ? (bool) $options['select'] : true; + $options['encrypt'] = isset($options['encrypt']) ? (bool) $options['encrypt'] : true; // Finalize initialisation parent::__construct($options); @@ -119,6 +120,7 @@ public function connect() 'pwd' => $this->options['password'], 'CharacterSet' => 'UTF-8', 'ReturnDatesAsStrings' => true, + 'Encrypt' => $this->options['encrypt'], ]; // Attempt to connect to the server. diff --git a/libraries/vendor/joomla/database/src/Sqlsrv/SqlsrvStatement.php b/libraries/vendor/joomla/database/src/Sqlsrv/SqlsrvStatement.php index bb1fa716fa..e93599fe5b 100644 --- a/libraries/vendor/joomla/database/src/Sqlsrv/SqlsrvStatement.php +++ b/libraries/vendor/joomla/database/src/Sqlsrv/SqlsrvStatement.php @@ -163,7 +163,7 @@ public function prepareParameterKeyMapping($sql) $quoteChar = ''; $literal = ''; $mapping = []; - $replace = []; + $position = 0; $matches = []; $pattern = '/([:][a-zA-Z0-9_]+)/'; @@ -202,11 +202,15 @@ public function prepareParameterKeyMapping($sql) $literal .= substr($substring, 0, $match[1]); } - $mapping[$match[0]] = \count($mapping); + if (!isset($mapping[$match[0]])) { + $mapping[$match[0]] = []; + } + + $mapping[$match[0]][] = $position++; $endOfPlaceholder = $match[1] + strlen($match[0]); $beginOfNextPlaceholder = $matches[0][$i + 1][1] ?? strlen($substring); $beginOfNextPlaceholder -= $endOfPlaceholder; - $literal .= '?' . substr($substring, $endOfPlaceholder, $beginOfNextPlaceholder); + $literal .= '?' . substr($substring, $endOfPlaceholder, $beginOfNextPlaceholder); } } else { $literal .= $substring; @@ -484,7 +488,11 @@ private function prepare() } if (isset($this->parameterKeyMapping[$key])) { - $params[$this->parameterKeyMapping[$key]] = $variable; + $paramKey = $this->parameterKeyMapping[$key]; + + foreach ($paramKey as $currentKey) { + $params[$currentKey] = $variable; + } } else { $params[] = $variable; } diff --git a/libraries/vendor/joomla/filesystem/src/Exception/FilesystemException.php b/libraries/vendor/joomla/filesystem/src/Exception/FilesystemException.php index 639ac360fe..aaeda315e4 100644 --- a/libraries/vendor/joomla/filesystem/src/Exception/FilesystemException.php +++ b/libraries/vendor/joomla/filesystem/src/Exception/FilesystemException.php @@ -27,7 +27,7 @@ class FilesystemException extends \RuntimeException * @param integer $code The code * @param \Throwable|null $previous A previous exception */ - public function __construct($message = "", $code = 0, \Throwable $previous = null) + public function __construct($message = "", $code = 0, ?\Throwable $previous = null) { parent::__construct( Path::removeRoot($message), diff --git a/libraries/vendor/joomla/filesystem/src/File.php b/libraries/vendor/joomla/filesystem/src/File.php index f2dd10bd7b..2b369ae16c 100644 --- a/libraries/vendor/joomla/filesystem/src/File.php +++ b/libraries/vendor/joomla/filesystem/src/File.php @@ -239,8 +239,7 @@ public static function move($src, $dest, $path = '', $useStreams = false) */ public static function write($file, $buffer, $useStreams = false, $appendToFile = false) { - if (\function_exists('set_time_limit')) - { + if (\function_exists('set_time_limit')) { set_time_limit(ini_get('max_execution_time')); } diff --git a/libraries/vendor/joomla/filesystem/src/Folder.php b/libraries/vendor/joomla/filesystem/src/Folder.php index f286e5b6db..c8a0b05cbb 100644 --- a/libraries/vendor/joomla/filesystem/src/Folder.php +++ b/libraries/vendor/joomla/filesystem/src/Folder.php @@ -34,8 +34,7 @@ abstract class Folder */ public static function copy($src, $dest, $path = '', $force = false, $useStreams = false) { - if (\function_exists('set_time_limit')) - { + if (\function_exists('set_time_limit')) { set_time_limit(ini_get('max_execution_time')); } @@ -211,8 +210,7 @@ public static function create($path = '', $mode = 0755) */ public static function delete($path) { - if (\function_exists('set_time_limit')) - { + if (\function_exists('set_time_limit')) { set_time_limit(ini_get('max_execution_time')); } @@ -439,8 +437,7 @@ public static function folders( */ protected static function _items($path, $filter, $recurse, $full, $exclude, $excludeFilterString, $findfiles) { - if (\function_exists('set_time_limit')) - { + if (\function_exists('set_time_limit')) { set_time_limit(ini_get('max_execution_time')); } diff --git a/libraries/vendor/joomla/filesystem/src/Path.php b/libraries/vendor/joomla/filesystem/src/Path.php index 387fea040c..4d1f26b643 100644 --- a/libraries/vendor/joomla/filesystem/src/Path.php +++ b/libraries/vendor/joomla/filesystem/src/Path.php @@ -190,6 +190,10 @@ public static function check($path, $basePath = '') */ public static function clean($path, $ds = \DIRECTORY_SEPARATOR) { + if ($path === '') { + return ''; + } + if (!\is_string($path)) { throw new \InvalidArgumentException('You must specify a non-empty path to clean'); } diff --git a/libraries/vendor/joomla/filter/src/InputFilter.php b/libraries/vendor/joomla/filter/src/InputFilter.php index 5631c75cbe..0f7aae309e 100644 --- a/libraries/vendor/joomla/filter/src/InputFilter.php +++ b/libraries/vendor/joomla/filter/src/InputFilter.php @@ -319,59 +319,59 @@ protected function cleanTags($source) $attr = ''; // Is there a tag? If so it will certainly start with a '<'. - $tagOpenStart = strpos($source, '<'); + $tagOpenStart = StringHelper::strpos($source, '<'); while ($tagOpenStart !== false) { // Get some information about the tag we are processing - $preTag .= substr($postTag, 0, $tagOpenStart); - $postTag = substr($postTag, $tagOpenStart); - $fromTagOpen = substr($postTag, 1); - $tagOpenEnd = strpos($fromTagOpen, '>'); + $preTag .= StringHelper::substr($postTag, 0, $tagOpenStart); + $postTag = StringHelper::substr($postTag, $tagOpenStart); + $fromTagOpen = StringHelper::substr($postTag, 1); + $tagOpenEnd = StringHelper::strpos($fromTagOpen, '>'); // Check for mal-formed tag where we have a second '<' before the first '>' - $nextOpenTag = (strlen($postTag) > $tagOpenStart) ? strpos($postTag, '<', $tagOpenStart + 1) : false; + $nextOpenTag = (StringHelper::strlen($postTag) > $tagOpenStart) ? StringHelper::strpos($postTag, '<', $tagOpenStart + 1) : false; if (($nextOpenTag !== false) && ($nextOpenTag < $tagOpenEnd)) { // At this point we have a mal-formed tag -- remove the offending open - $postTag = substr($postTag, 0, $tagOpenStart) . substr($postTag, $tagOpenStart + 1); - $tagOpenStart = strpos($postTag, '<'); + $postTag = StringHelper::substr($postTag, 0, $tagOpenStart) . StringHelper::substr($postTag, $tagOpenStart + 1); + $tagOpenStart = StringHelper::strpos($postTag, '<'); continue; } // Let's catch any non-terminated tags and skip over them if ($tagOpenEnd === false) { - $postTag = substr($postTag, $tagOpenStart + 1); - $tagOpenStart = strpos($postTag, '<'); + $postTag = StringHelper::substr($postTag, $tagOpenStart + 1); + $tagOpenStart = StringHelper::strpos($postTag, '<'); continue; } // Do we have a nested tag? - $tagOpenNested = strpos($fromTagOpen, '<'); + $tagOpenNested = StringHelper::strpos($fromTagOpen, '<'); if (($tagOpenNested !== false) && ($tagOpenNested < $tagOpenEnd)) { - $preTag .= substr($postTag, 1, $tagOpenNested); - $postTag = substr($postTag, ($tagOpenNested + 1)); - $tagOpenStart = strpos($postTag, '<'); + $preTag .= StringHelper::substr($postTag, 1, $tagOpenNested); + $postTag = StringHelper::substr($postTag, ($tagOpenNested + 1)); + $tagOpenStart = StringHelper::strpos($postTag, '<'); continue; } // Let's get some information about our tag and setup attribute pairs - $tagOpenNested = (strpos($fromTagOpen, '<') + $tagOpenStart + 1); - $currentTag = substr($fromTagOpen, 0, $tagOpenEnd); - $tagLength = strlen($currentTag); + $tagOpenNested = (StringHelper::strpos($fromTagOpen, '<') + $tagOpenStart + 1); + $currentTag = StringHelper::substr($fromTagOpen, 0, $tagOpenEnd); + $tagLength = StringHelper::strlen($currentTag); $tagLeft = $currentTag; $attrSet = []; - $currentSpace = strpos($tagLeft, ' '); + $currentSpace = StringHelper::strpos($tagLeft, ' '); // Are we an open tag or a close tag? - if (substr($currentTag, 0, 1) === '/') { + if (StringHelper::substr($currentTag, 0, 1) === '/') { // Close Tag $isCloseTag = true; list($tagName) = explode(' ', $currentTag); - $tagName = substr($tagName, 1); + $tagName = StringHelper::substr($tagName, 1); } else { // Open Tag $isCloseTag = false; @@ -388,8 +388,8 @@ protected function cleanTags($source) || (!$tagName) || ((\in_array(strtolower($tagName), $this->blockedTags)) && $this->xssAuto) ) { - $postTag = substr($postTag, ($tagLength + 2)); - $tagOpenStart = strpos($postTag, '<'); + $postTag = StringHelper::substr($postTag, ($tagLength + 2)); + $tagOpenStart = StringHelper::strpos($postTag, '<'); // Strip tag continue; @@ -401,61 +401,62 @@ protected function cleanTags($source) */ while ($currentSpace !== false) { $attr = ''; - $fromSpace = substr($tagLeft, ($currentSpace + 1)); - $nextEqual = strpos($fromSpace, '='); - $nextSpace = strpos($fromSpace, ' '); - $openQuotes = strpos($fromSpace, '"'); - $closeQuotes = strpos(substr($fromSpace, ($openQuotes + 1)), '"') + $openQuotes + 1; + $fromSpace = StringHelper::substr($tagLeft, ($currentSpace + 1)); + $nextEqual = StringHelper::strpos($fromSpace, '='); + $nextSpace = StringHelper::strpos($fromSpace, ' '); + $openQuotes = StringHelper::strpos($fromSpace, '"'); + $closeQuotes = StringHelper::strpos(StringHelper::substr($fromSpace, ($openQuotes + 1)), '"') + $openQuotes + 1; $startAtt = ''; $startAttPosition = 0; // Find position of equal and open quotes ignoring if (preg_match('#\s*=\s*\"#', $fromSpace, $matches, \PREG_OFFSET_CAPTURE)) { + // We have found an attribute, convert its byte position to a UTF-8 string length, using non-multibyte substr() $stringBeforeAttr = substr($fromSpace, 0, $matches[0][1]); - $startAttPosition = strlen($stringBeforeAttr); + $startAttPosition = StringHelper::strlen($stringBeforeAttr); $startAtt = $matches[0][0]; - $closeQuotePos = strpos( - substr($fromSpace, ($startAttPosition + strlen($startAtt))), + $closeQuotePos = StringHelper::strpos( + StringHelper::substr($fromSpace, ($startAttPosition + StringHelper::strlen($startAtt))), '"' ); - $closeQuotes = $closeQuotePos + $startAttPosition + strlen($startAtt); - $nextEqual = $startAttPosition + strpos($startAtt, '='); - $openQuotes = $startAttPosition + strpos($startAtt, '"'); - $nextSpace = strpos(substr($fromSpace, $closeQuotes), ' ') + $closeQuotes; + $closeQuotes = $closeQuotePos + $startAttPosition + StringHelper::strlen($startAtt); + $nextEqual = $startAttPosition + StringHelper::strpos($startAtt, '='); + $openQuotes = $startAttPosition + StringHelper::strpos($startAtt, '"'); + $nextSpace = StringHelper::strpos(StringHelper::substr($fromSpace, $closeQuotes), ' ') + $closeQuotes; } // Do we have an attribute to process? [check for equal sign] if ($fromSpace !== '/' && (($nextEqual && $nextSpace && $nextSpace < $nextEqual) || !$nextEqual)) { if (!$nextEqual) { - $attribEnd = strpos($fromSpace, '/') - 1; + $attribEnd = StringHelper::strpos($fromSpace, '/') - 1; } else { $attribEnd = $nextSpace - 1; } // If there is an ending, use this, if not, do not worry. if ($attribEnd > 0) { - $fromSpace = substr($fromSpace, $attribEnd + 1); + $fromSpace = StringHelper::substr($fromSpace, $attribEnd + 1); } } - if (strpos($fromSpace, '=') !== false) { + if (StringHelper::strpos($fromSpace, '=') !== false) { /* * If the attribute value is wrapped in quotes we need to grab the substring from the closing quote, * otherwise grab until the next space. */ if ( ($openQuotes !== false) - && (strpos(substr($fromSpace, ($openQuotes + 1)), '"') !== false) + && (StringHelper::strpos(StringHelper::substr($fromSpace, ($openQuotes + 1)), '"') !== false) ) { - $attr = substr($fromSpace, 0, ($closeQuotes + 1)); + $attr = StringHelper::substr($fromSpace, 0, ($closeQuotes + 1)); } else { - $attr = substr($fromSpace, 0, $nextSpace); + $attr = StringHelper::substr($fromSpace, 0, $nextSpace); } } else { // No more equal signs so add any extra text in the tag into the attribute array [eg. checked] if ($fromSpace !== '/') { - $attr = substr($fromSpace, 0, $nextSpace); + $attr = StringHelper::substr($fromSpace, 0, $nextSpace); } } @@ -468,8 +469,8 @@ protected function cleanTags($source) $attrSet[] = $attr; // Move search point and continue iteration - $tagLeft = substr($fromSpace, strlen($attr)); - $currentSpace = strpos($tagLeft, ' '); + $tagLeft = StringHelper::substr($fromSpace, StringHelper::strlen($attr)); + $currentSpace = StringHelper::strpos($tagLeft, ' '); } // Is our tag in the user input array? @@ -488,7 +489,7 @@ protected function cleanTags($source) } // Reformat single tags to XHTML - if (strpos($fromTagOpen, ''; } else { $preTag .= ' />'; @@ -500,8 +501,8 @@ protected function cleanTags($source) } // Find next tag's start and continue iteration - $postTag = substr($postTag, ($tagLength + 2)); - $tagOpenStart = strpos($postTag, '<'); + $postTag = StringHelper::substr($postTag, ($tagLength + 2)); + $tagOpenStart = StringHelper::strpos($postTag, '<'); } // Append any code after the end of tags and return @@ -658,37 +659,39 @@ protected function escapeAttributeValues($source) // Process each portion based on presence of =" and ", "/>, or "> // See if there are any more attributes to process while (preg_match('#<[^>]*?=\s*?(\"|\')#s', $remainder, $matches, \PREG_OFFSET_CAPTURE)) { + // We have found a tag with an attribute, convert its byte position to a UTF-8 string length, using non-multibyte substr() $stringBeforeTag = substr($remainder, 0, $matches[0][1]); - $tagPosition = strlen($stringBeforeTag); + $tagPosition = StringHelper::strlen($stringBeforeTag); // Get the character length before the attribute value - $nextBefore = $tagPosition + strlen($matches[0][0]); + $nextBefore = $tagPosition + StringHelper::strlen($matches[0][0]); // Figure out if we have a single or double quote and look for the matching closing quote // Closing quote should be "/>, ">, ", or " at the end of the string - $quote = substr($matches[0][0], -1); + $quote = StringHelper::substr($matches[0][0], -1); $pregMatch = ($quote == '"') ? '#(\"\s*/\s*>|\"\s*>|\"\s+|\"$)#' : "#(\'\s*/\s*>|\'\s*>|\'\s+|\'$)#"; // Get the portion after attribute value - $attributeValueRemainder = substr($remainder, $nextBefore); + $attributeValueRemainder = StringHelper::substr($remainder, $nextBefore); if (preg_match($pregMatch, $attributeValueRemainder, $matches, \PREG_OFFSET_CAPTURE)) { + // We have a closing quote, convert its byte position to a UTF-8 string length, using non-multibyte substr() $stringBeforeQuote = substr($attributeValueRemainder, 0, $matches[0][1]); - $closeQuoteChars = strlen($stringBeforeQuote); + $closeQuoteChars = StringHelper::strlen($stringBeforeQuote); $nextAfter = $nextBefore + $closeQuoteChars; } else { // No closing quote - $nextAfter = strlen($remainder); + $nextAfter = StringHelper::strlen($remainder); } // Get the actual attribute value - $attributeValue = substr($remainder, $nextBefore, $nextAfter - $nextBefore); + $attributeValue = StringHelper::substr($remainder, $nextBefore, $nextAfter - $nextBefore); // Escape bad chars $attributeValue = str_replace($badChars, $escapedChars, $attributeValue); $attributeValue = $this->stripCssExpressions($attributeValue); - $alreadyFiltered .= substr($remainder, 0, $nextBefore) . $attributeValue . $quote; - $remainder = substr($remainder, $nextAfter + 1); + $alreadyFiltered .= StringHelper::substr($remainder, 0, $nextBefore) . $attributeValue . $quote; + $remainder = StringHelper::substr($remainder, $nextAfter + 1); } // At this point, we just have to return the $alreadyFiltered and the $remainder diff --git a/libraries/vendor/joomla/filter/src/OutputFilter.php b/libraries/vendor/joomla/filter/src/OutputFilter.php index 0bc01d50fb..ed8f5bb183 100644 --- a/libraries/vendor/joomla/filter/src/OutputFilter.php +++ b/libraries/vendor/joomla/filter/src/OutputFilter.php @@ -262,7 +262,11 @@ public static function setLanguage(Language $language): void */ public static function stripImages($string) { - return preg_replace('#(<[/]?img.*>)#U', '', $string); + while (preg_match('#(<[/]?img.*>)#Ui', $string)) { + $string = preg_replace('#(<[/]?img.*>)#Ui', '', $string); + } + + return $string; } /** @@ -276,6 +280,10 @@ public static function stripImages($string) */ public static function stripIframes($string) { - return preg_replace('#(<[/]?iframe.*>)#U', '', $string); + while (preg_match('#(<[/]?iframe.*>)#Ui', $string)) { + $string = preg_replace('#(<[/]?iframe.*>)#Ui', '', $string); + } + + return $string; } } diff --git a/libraries/vendor/joomla/session/src/Session.php b/libraries/vendor/joomla/session/src/Session.php index de007a22cc..e0f2555627 100644 --- a/libraries/vendor/joomla/session/src/Session.php +++ b/libraries/vendor/joomla/session/src/Session.php @@ -60,16 +60,16 @@ class Session implements SessionInterface, DispatcherAwareInterface /** * Constructor * - * @param StorageInterface $store A StorageInterface implementation. - * @param DispatcherInterface $dispatcher DispatcherInterface for the session to use. - * @param array $options Optional parameters. Supported keys include: - * - name: The session name - * - id: The session ID - * - expire: The session lifetime in seconds + * @param ?StorageInterface $store A StorageInterface implementation. + * @param ?DispatcherInterface $dispatcher DispatcherInterface for the session to use. + * @param array $options Optional parameters. Supported keys include: + * - name: The session name + * - id: The session ID + * - expire: The session lifetime in seconds * * @since 1.0 */ - public function __construct(StorageInterface $store = null, DispatcherInterface $dispatcher = null, array $options = []) + public function __construct(?StorageInterface $store = null, ?DispatcherInterface $dispatcher = null, array $options = []) { $this->store = $store ?: new Storage\NativeStorage(new Handler\FilesystemHandler()); diff --git a/libraries/vendor/joomla/session/src/Storage/NativeStorage.php b/libraries/vendor/joomla/session/src/Storage/NativeStorage.php index 310a8e4aa9..8ef8f238f8 100644 --- a/libraries/vendor/joomla/session/src/Storage/NativeStorage.php +++ b/libraries/vendor/joomla/session/src/Storage/NativeStorage.php @@ -54,8 +54,8 @@ class NativeStorage implements StorageInterface /** * Constructor * - * @param \SessionHandlerInterface $handler Session save handler - * @param array $options Session options + * @param ?\SessionHandlerInterface $handler Session save handler + * @param array $options Session options * * @since 1.0 */ @@ -322,7 +322,7 @@ public function set(string $name, $value = null) /** * Registers session save handler as a PHP session handler * - * @param \SessionHandlerInterface $handler The save handler to use + * @param ?\SessionHandlerInterface $handler The save handler to use * * @return $this * diff --git a/libraries/vendor/joomla/string/src/StringHelper.php b/libraries/vendor/joomla/string/src/StringHelper.php index 6565cf5350..06bd3c5fd6 100644 --- a/libraries/vendor/joomla/string/src/StringHelper.php +++ b/libraries/vendor/joomla/string/src/StringHelper.php @@ -257,8 +257,8 @@ public static function strlen($str) * * Case-insensitive version of str_replace() * - * @param string $search String to search - * @param string $replace Existing string to replace + * @param string|string[] $search String to search + * @param string|string[] $replace Existing string to replace * @param string $str New string to replace with * @param integer|null|boolean $count Optional count value to be passed by referene * diff --git a/media/com_associations/joomla.asset.json b/media/com_associations/joomla.asset.json index b5b8ebb64b..6d71eb7a70 100644 --- a/media/com_associations/joomla.asset.json +++ b/media/com_associations/joomla.asset.json @@ -14,41 +14,41 @@ ] }, { - "name": "com_associations.admin-associations-modal", + "name": "com_associations.admin-associations-default", "type": "script", - "uri": "com_associations/admin-associations-modal.min.js", + "uri": "com_associations/admin-associations-default.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "version": "14d673" + "version": "72d110" }, { - "name": "com_associations.associations-edit", + "name": "com_associations.admin-associations-modal", "type": "script", - "uri": "com_associations/associations-edit.min.js", + "uri": "com_associations/admin-associations-modal.min.js", "dependencies": [ "core" ], "attributes": { - "type": "module", - "defer": true + "type": "module" }, - "version": "00d001" + "version": "14d673" }, { - "name": "com_associations.admin-associations-default", + "name": "com_associations.associations-edit", "type": "script", - "uri": "com_associations/admin-associations-default.min.js", + "uri": "com_associations/associations-edit.min.js", "dependencies": [ "core" ], "attributes": { - "type": "module" + "type": "module", + "defer": true }, - "version": "72d110" + "version": "00d001" }, { "name": "com_associations.sidebyside", diff --git a/media/com_content/joomla.asset.json b/media/com_content/joomla.asset.json index 1dcb0fb087..d733666aaa 100644 --- a/media/com_content/joomla.asset.json +++ b/media/com_content/joomla.asset.json @@ -6,29 +6,29 @@ "license": "GPL-2.0-or-later", "assets": [ { - "name": "com_content.admin-article-readmore", + "name": "com_content.admin-article-pagebreak", "type": "script", - "uri": "com_content/admin-article-readmore.min.js", + "uri": "com_content/admin-article-pagebreak.min.js", "dependencies": [ "core" ], "attributes": { - "type": "module" + "type": "module", + "defer": true }, - "version": "27b7c1" + "version": "214a47" }, { - "name": "com_content.admin-article-pagebreak", + "name": "com_content.admin-article-readmore", "type": "script", - "uri": "com_content/admin-article-pagebreak.min.js", + "uri": "com_content/admin-article-readmore.min.js", "dependencies": [ "core" ], "attributes": { - "type": "module", - "defer": true + "type": "module" }, - "version": "214a47" + "version": "27b7c1" }, { "name": "com_content.admin-articles-batch", @@ -55,30 +55,30 @@ "version": "09d5c2" }, { - "name": "com_content.form-edit", + "name": "com_content.admin-articles-modal", "type": "script", - "uri": "com_content/form-edit.min.js", + "uri": "com_content/admin-articles-modal.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "version": "ea6fb4" + "deprecated": true, + "deprecatedMsg": "Use postMessage() directly or with help of [modal-content-select] asset. To post the modal selection.", + "version": "509ba1" }, { - "name": "com_content.admin-articles-modal", + "name": "com_content.form-edit", "type": "script", - "uri": "com_content/admin-articles-modal.min.js", + "uri": "com_content/form-edit.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "deprecated": true, - "deprecatedMsg": "Use postMessage() directly or with help of [modal-content-select] asset. To post the modal selection.", - "version": "509ba1" + "version": "ea6fb4" }, { "name": "com_content.articles-list", diff --git a/media/com_fields/joomla.asset.json b/media/com_fields/joomla.asset.json index e95957bc24..f46065fd15 100644 --- a/media/com_fields/joomla.asset.json +++ b/media/com_fields/joomla.asset.json @@ -6,28 +6,28 @@ "license": "GPL-2.0-or-later", "assets": [ { - "name": "com_fields.admin-field-edit", + "name": "com_fields.admin-field-changecontext", "type": "script", - "uri": "com_fields/admin-field-edit.min.js", + "uri": "com_fields/admin-field-changecontext.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "version": "f3c19c" + "version": "8abe08" }, { - "name": "com_fields.admin-field-changecontext", + "name": "com_fields.admin-field-edit", "type": "script", - "uri": "com_fields/admin-field-changecontext.min.js", + "uri": "com_fields/admin-field-edit.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "version": "8abe08" + "version": "f3c19c" }, { "name": "com_fields.admin-field-typehaschanged", diff --git a/media/com_finder/joomla.asset.json b/media/com_finder/joomla.asset.json index c46e4351d3..64b5417914 100644 --- a/media/com_finder/joomla.asset.json +++ b/media/com_finder/joomla.asset.json @@ -12,28 +12,34 @@ "version": "e479b6" }, { - "name": "com_finder.filters", + "name": "com_finder.debug", "type": "script", - "uri": "com_finder/filters.min.js", + "uri": "com_finder/debug.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "version": "ce7a61" + "version": "d162b4" }, { - "name": "com_finder.debug", + "name": "com_finder.filters", "type": "script", - "uri": "com_finder/debug.min.js", + "uri": "com_finder/filters.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "version": "d162b4" + "version": "ce7a61" + }, + { + "name": "com_finder.finder", + "type": "style", + "uri": "com_finder/finder.min.css", + "version": "ab077f" }, { "name": "com_finder.finder", @@ -65,12 +71,6 @@ "uri": "com_finder/indexer.min.css", "version": "d51495" }, - { - "name": "com_finder.finder", - "type": "style", - "uri": "com_finder/finder.min.css", - "version": "ab077f" - }, { "name": "com_finder.indexer", "type": "script", diff --git a/media/com_languages/joomla.asset.json b/media/com_languages/joomla.asset.json index 9659507271..ccb25f892b 100644 --- a/media/com_languages/joomla.asset.json +++ b/media/com_languages/joomla.asset.json @@ -13,12 +13,6 @@ "com_languages.overrider#script" ] }, - { - "name": "com_languages.overrider", - "type": "style", - "uri": "com_languages/overrider.min.css", - "version": "d91526" - }, { "name": "com_languages.admin-language-edit-change-flag", "type": "script", @@ -43,6 +37,12 @@ }, "version": "a1febd" }, + { + "name": "com_languages.overrider", + "type": "style", + "uri": "com_languages/overrider.min.css", + "version": "d91526" + }, { "name": "com_languages.overrider", "type": "script", diff --git a/media/com_menus/joomla.asset.json b/media/com_menus/joomla.asset.json index 59a99669b9..2c810d4987 100644 --- a/media/com_menus/joomla.asset.json +++ b/media/com_menus/joomla.asset.json @@ -6,98 +6,98 @@ "license": "GPL-2.0-or-later", "assets": [ { - "name": "com_menus.admin-item-edit-container", - "type": "style", - "uri": "com_menus/admin-item-edit_container.min.css", - "version": "67209f" - }, - { - "name": "com_menus.admin-item-edit-container", + "name": "com_menus.admin-item-edit-modules", "type": "script", - "uri": "com_menus/admin-item-edit_container.min.js", + "uri": "com_menus/admin-item-edit_modules.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "version": "47c6ca" + "version": "bc3cea" }, { - "name": "com_menus.admin-item-edit", + "name": "com_menus.admin-items-modal", "type": "script", - "uri": "com_menus/admin-item-edit.min.js", + "uri": "com_menus/admin-items-modal.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "version": "23b63d" + "deprecated": true, + "deprecatedMsg": "Replaced with [modal-content-select-field] asset. To be removed in Joomla 6.", + "version": "18f50c" }, { - "name": "com_menus.admin-menus", + "name": "com_menus.admin-item-modal", "type": "script", - "uri": "com_menus/admin-menus-default.min.js", + "uri": "com_menus/admin-item-modal.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "version": "8c28f6" + "deprecated": true, + "deprecatedMsg": "Replaced with [modal-content-select-field] asset. To be removed in Joomla 6.", + "version": "9b90e4" }, { - "name": "com_menus.admin-item-edit-modules", + "name": "com_menus.admin-menus", "type": "script", - "uri": "com_menus/admin-item-edit_modules.min.js", + "uri": "com_menus/admin-menus-default.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "version": "bc3cea" + "version": "8c28f6" }, { - "name": "com_menus.admin-item-modal", + "name": "com_menus.batch-body", "type": "script", - "uri": "com_menus/admin-item-modal.min.js", + "uri": "com_menus/default-batch-body.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "deprecated": true, - "deprecatedMsg": "Replaced with [modal-content-select-field] asset. To be removed in Joomla 6.", - "version": "9b90e4" + "version": "457f2a" }, { - "name": "com_menus.batch-body", + "name": "com_menus.admin-item-edit", "type": "script", - "uri": "com_menus/default-batch-body.min.js", + "uri": "com_menus/admin-item-edit.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "version": "457f2a" + "version": "23b63d" }, { - "name": "com_menus.admin-items-modal", + "name": "com_menus.admin-item-edit-container", + "type": "style", + "uri": "com_menus/admin-item-edit_container.min.css", + "version": "67209f" + }, + { + "name": "com_menus.admin-item-edit-container", "type": "script", - "uri": "com_menus/admin-items-modal.min.js", + "uri": "com_menus/admin-item-edit_container.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "deprecated": true, - "deprecatedMsg": "Replaced with [modal-content-select-field] asset. To be removed in Joomla 6.", - "version": "18f50c" + "version": "47c6ca" } ] } \ No newline at end of file diff --git a/media/com_modules/joomla.asset.json b/media/com_modules/joomla.asset.json index ec549d795f..6e36f2c535 100644 --- a/media/com_modules/joomla.asset.json +++ b/media/com_modules/joomla.asset.json @@ -30,30 +30,30 @@ "version": "d8d12e" }, { - "name": "com_modules.admin-modules-modal", + "name": "com_modules.admin-module-search", "type": "script", - "uri": "com_modules/admin-modules-modal.min.js", + "uri": "com_modules/admin-module-search.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "deprecated": true, - "deprecatedMsg": "Use postMessage() directly or with help of [modal-content-select] asset. To post the modal selection.", - "version": "b0c3f2" + "version": "e6aea4" }, { - "name": "com_modules.admin-module-search", + "name": "com_modules.admin-modules-modal", "type": "script", - "uri": "com_modules/admin-module-search.min.js", + "uri": "com_modules/admin-modules-modal.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "version": "e6aea4" + "deprecated": true, + "deprecatedMsg": "Use postMessage() directly or with help of [modal-content-select] asset. To post the modal selection.", + "version": "b0c3f2" }, { "name": "com_modules.admin-select-modal", diff --git a/media/com_scheduler/joomla.asset.json b/media/com_scheduler/joomla.asset.json index 6a23f504cd..e283e1b1f3 100644 --- a/media/com_scheduler/joomla.asset.json +++ b/media/com_scheduler/joomla.asset.json @@ -5,18 +5,6 @@ "description": "Joomla CMS", "license": "GNU General Public License version 2 or later; see LICENSE.txt", "assets": [ - { - "name": "com_scheduler.admin-view-task-css", - "type": "style", - "uri": "com_scheduler/admin-view-task.css", - "version": "b5f92b" - }, - { - "name": "com_scheduler.admin-view-tasks-css", - "type": "style", - "uri": "com_scheduler/admin-view-tasks.css", - "version": "adee39" - }, { "name": "com_scheduler.test-task", "type": "script", @@ -53,6 +41,18 @@ "type": "module" }, "version": "ab7203" + }, + { + "name": "com_scheduler.admin-view-task-css", + "type": "style", + "uri": "com_scheduler/admin-view-task.css", + "version": "b5f92b" + }, + { + "name": "com_scheduler.admin-view-tasks-css", + "type": "style", + "uri": "com_scheduler/admin-view-tasks.css", + "version": "adee39" } ] } \ No newline at end of file diff --git a/media/com_users/joomla.asset.json b/media/com_users/joomla.asset.json index c0e5037c2e..273d2e89be 100644 --- a/media/com_users/joomla.asset.json +++ b/media/com_users/joomla.asset.json @@ -6,28 +6,28 @@ "license": "GPL-2.0-or-later", "assets": [ { - "name": "com_users.two-factor-focus", + "name": "com_users.admin-users-groups", "type": "script", - "uri": "com_users/two-factor-focus.min.js", + "uri": "com_users/admin-users-groups.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "version": "bcc78d" + "version": "44aa77" }, { - "name": "com_users.admin-users-groups", + "name": "com_users.two-factor-focus", "type": "script", - "uri": "com_users/admin-users-groups.min.js", + "uri": "com_users/two-factor-focus.min.js", "dependencies": [ "core" ], "attributes": { "type": "module" }, - "version": "44aa77" + "version": "bcc78d" }, { "name": "com_users.two-factor-list", diff --git a/media/plg_editors_codemirror/joomla.asset.json b/media/plg_editors_codemirror/joomla.asset.json index 69540c6d6b..8c4884de0a 100644 --- a/media/plg_editors_codemirror/joomla.asset.json +++ b/media/plg_editors_codemirror/joomla.asset.json @@ -355,6 +355,12 @@ "importmap": true, "version": "1.0.5" }, + { + "name": "plg_editors_codemirror", + "type": "style", + "uri": "plg_editors_codemirror/codemirror.css", + "version": "ace1a2" + }, { "name": "codemirror", "type": "script", @@ -414,12 +420,6 @@ ], "version": "6ddf4f" }, - { - "name": "plg_editors_codemirror", - "type": "style", - "uri": "plg_editors_codemirror/codemirror.css", - "version": "ace1a2" - }, { "name": "webcomponent.editor-codemirror", "type": "script", diff --git a/media/system/css/system-site-general.css b/media/system/css/system-site-general.css index 39e0bd81c9..0877510dad 100644 --- a/media/system/css/system-site-general.css +++ b/media/system/css/system-site-general.css @@ -54,30 +54,30 @@ label.invalid { .button2-left { float: left; - background: url("../images/j_button2_left.png?v=172045") no-repeat; + background: url("../images/j_button2_left.png?v=172398") no-repeat; margin-left: 5px; } .button2-right { float: left; - background: url("../images/j_button2_right.png?v=172045") 100% 0 no-repeat; + background: url("../images/j_button2_right.png?v=172398") 100% 0 no-repeat; margin-left: 5px; } .button2-left .image { - background: url("../images/j_button2_image.png?v=172045") 100% 0 no-repeat; + background: url("../images/j_button2_image.png?v=172398") 100% 0 no-repeat; } .button2-left .readmore, .button2-left .article { - background: url("../images/j_button2_readmore.png?v=172045") 100% 0 no-repeat; + background: url("../images/j_button2_readmore.png?v=172398") 100% 0 no-repeat; } .button2-left .pagebreak { - background: url("../images/j_button2_pagebreak.png?v=172045") 100% 0 no-repeat; + background: url("../images/j_button2_pagebreak.png?v=172398") 100% 0 no-repeat; } .button2-left .blank { - background: url("../images/j_button2_blank.png?v=172045") 100% 0 no-repeat; + background: url("../images/j_button2_blank.png?v=172398") 100% 0 no-repeat; } div.tooltip { @@ -90,7 +90,7 @@ div.tooltip { } div.tooltip h4 { - background: url("../images/selector-arrow.png?v=172045") no-repeat; + background: url("../images/selector-arrow.png?v=172398") no-repeat; margin: -15px 0 0; padding: 15px 0 5px; font-size: 95%; diff --git a/media/system/css/system-site-general.min.css b/media/system/css/system-site-general.min.css index 28a676b31b..9f240c8452 100644 --- a/media/system/css/system-site-general.min.css +++ b/media/system/css/system-site-general.min.css @@ -1 +1 @@ -@charset "UTF-8";.invalid{border-color:red}label.invalid{color:red}#editor-xtd-buttons{padding:5px}.button2-left,.button2-right,.button2-left div,.button2-right div{float:left}.button2-left a,.button2-right a,.button2-left span,.button2-right span{float:left;color:#666;cursor:pointer;height:22px;font-size:11px;line-height:22px;display:block}.button2-left span,.button2-right span{color:#999;cursor:default}.button2-left .page a,.button2-right .page a,.button2-left .page span,.button2-right .page span{padding:0 6px}.page span{color:#000;font-weight:700}.button2-left a:hover,.button2-right a:hover{color:#0b55c4;text-decoration:none}.button2-left a,.button2-left span{padding:0 24px 0 6px}.button2-right a,.button2-right span{padding:0 6px 0 24px}.button2-left{float:left;background:url(../images/j_button2_left.png?v=172045) no-repeat;margin-left:5px}.button2-right{float:left;background:url(../images/j_button2_right.png?v=172045) 100% 0 no-repeat;margin-left:5px}.button2-left .image{background:url(../images/j_button2_image.png?v=172045) 100% 0 no-repeat}.button2-left .readmore,.button2-left .article{background:url(../images/j_button2_readmore.png?v=172045) 100% 0 no-repeat}.button2-left .pagebreak{background:url(../images/j_button2_pagebreak.png?v=172045) 100% 0 no-repeat}.button2-left .blank{background:url(../images/j_button2_blank.png?v=172045) 100% 0 no-repeat}div.tooltip{z-index:13000;float:left;background:#ffc;border:1px solid #d4d5aa;max-width:200px;padding:5px}div.tooltip h4{background:url(../images/selector-arrow.png?v=172045) no-repeat;margin:-15px 0 0;padding:15px 0 5px;font-size:95%;font-weight:700}div.tooltip p{margin:0;font-size:90%}.img_caption .left{float:left;margin-right:1em}.img_caption .right{float:right;margin-left:1em}.img_caption .left p{clear:left;text-align:center}.img_caption .right p{clear:right;text-align:center}.img_caption{text-align:center!important}.img_caption.none{margin-left:auto;margin-right:auto}a img.calendar{vertical-align:middle;cursor:pointer;background:url(../images/calendar.png?v=ad4756) no-repeat;width:16px;height:16px;margin-left:3px} \ No newline at end of file +@charset "UTF-8";.invalid{border-color:red}label.invalid{color:red}#editor-xtd-buttons{padding:5px}.button2-left,.button2-right,.button2-left div,.button2-right div{float:left}.button2-left a,.button2-right a,.button2-left span,.button2-right span{float:left;color:#666;cursor:pointer;height:22px;font-size:11px;line-height:22px;display:block}.button2-left span,.button2-right span{color:#999;cursor:default}.button2-left .page a,.button2-right .page a,.button2-left .page span,.button2-right .page span{padding:0 6px}.page span{color:#000;font-weight:700}.button2-left a:hover,.button2-right a:hover{color:#0b55c4;text-decoration:none}.button2-left a,.button2-left span{padding:0 24px 0 6px}.button2-right a,.button2-right span{padding:0 6px 0 24px}.button2-left{float:left;background:url(../images/j_button2_left.png?v=172398) no-repeat;margin-left:5px}.button2-right{float:left;background:url(../images/j_button2_right.png?v=172398) 100% 0 no-repeat;margin-left:5px}.button2-left .image{background:url(../images/j_button2_image.png?v=172398) 100% 0 no-repeat}.button2-left .readmore,.button2-left .article{background:url(../images/j_button2_readmore.png?v=172398) 100% 0 no-repeat}.button2-left .pagebreak{background:url(../images/j_button2_pagebreak.png?v=172398) 100% 0 no-repeat}.button2-left .blank{background:url(../images/j_button2_blank.png?v=172398) 100% 0 no-repeat}div.tooltip{z-index:13000;float:left;background:#ffc;border:1px solid #d4d5aa;max-width:200px;padding:5px}div.tooltip h4{background:url(../images/selector-arrow.png?v=172398) no-repeat;margin:-15px 0 0;padding:15px 0 5px;font-size:95%;font-weight:700}div.tooltip p{margin:0;font-size:90%}.img_caption .left{float:left;margin-right:1em}.img_caption .right{float:right;margin-left:1em}.img_caption .left p{clear:left;text-align:center}.img_caption .right p{clear:right;text-align:center}.img_caption{text-align:center!important}.img_caption.none{margin-left:auto;margin-right:auto}a img.calendar{vertical-align:middle;cursor:pointer;background:url(../images/calendar.png?v=ad4756) no-repeat;width:16px;height:16px;margin-left:3px} \ No newline at end of file diff --git a/media/system/css/system-site-general.min.css.gz b/media/system/css/system-site-general.min.css.gz index 234d46a483860bea8843b163a3ee34dbda1ed864..a45c90ab6246e73a63bbddd013db6c43728f4574 100644 GIT binary patch delta 641 zcmV-{0)G9V1)&9y8Goc9ZH%Vv(|*DBxjO6%@oH?#I4LX2f1eDL8q%!kH@JK5dG5Fu zey|SNj6FaN5R=<8iTfPOG{# zz`0N*%}jGldgC&dxOHF0H!I3r@amlr7l#?Zo7%0^;HXDT$$ui4qhUr^8&GqMw*{1W zU&&&utP#-X2!+DQ0I3#r-T@xm+y z>CI;IBF%9NdpWN&F;L=ZwI}8P{FdgcXKWCO*1korjv*yNNMG_(U*jDi^KVag`hfPN z1HF0VDYA^MavFz?i#alF!3nLX(hAS_a{OpPn#+}Gq9NO}lQ97oe@>DcQ9+6I&7X%M zS3+b8?HoD{XN;cwn7i@*>$6iVrILIV~*0<0Tp+_=6&a1a*->2Yip5i$mhHmQI-V zITngzL(|)CzuugRf5mpo^8WbJ)HG48rQp$muXqNKSJ1>yg1a4E5@MP>JhXvQv|F7o zphk(zUu>{eKfN>4G)}W_fyk&e7_!M#++^1$2O~_#v;!XrgUIzU5mouX!1%imCG*7` z#=KhznqoDBhwIfnPxj&z-!<5@Od{A`pu0>UMX4x5fA!x|TNp!njsM5AC+<(8GTJ&& zZURjF6>P(VVej;`WN$e_B&srDAW?C!?E(FsfgCg{!MViwzw2!GUucHD17F=`>#*rI{rbpR=NTWHJC#!O3XsYQO2P@o*$FZKm;;k1n#$Kzt}oK|&f zfODZrnwjR9^u}c@aqB*hZ&sAM;MF@LE)Fw*H?>=-!BLNxl7B@oN5hP;HlXGhZwn~% zzLLdyz0TR**4k2|g>q=~9r^&eT$(1|YUScuJR?n0)8tYpj6**cwUO|b7E-gv&AXKWCO*1knAjv*yNNMG_(U*kO?^KVag`hfPV z1HF0VDYA^MavFz?i#alF!3nLX(h4v4a{OpPn#+}Gq9NOhlQ97oe@v1)Q9+6I-Jgdc zK@;PMJ=DO5*0o%t@KcPe!;GpUr2+lXAF*v~*m+Fl{n z8Qu_^lUoE{X^Zp01M38nSIM3z-l^>8w6F+|*JzC3cZw7e)Kvl<@GWvK4vEuRI$_%9 zSSXGSO}}*e_3BhCf3{ne_s5r}rip4T1&5ZADahi1tL`JQ_kWH@QCc8a57-2%D9r#EXL~f6XsLBTh#@~e~nJ?xr z=G{ur6ss9LT(9nVvKQz0uEC~d62bNY-DLtPN<|s^tN)t9S{Tx6{6D5WbAJ$((bj=- z6JX-6U>hb3d#9%*d&?0bQI!b;iHd`559s#{ { + const attributeName = attribute.nodeName.toLowerCase(); + if (allowedAttributeList.includes(attributeName)) { + if (uriAttributes.has(attributeName)) { + return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue)); + } + return true; } - return target; + + // Check if a regular expression validates the attribute. + return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName)); }; - return _extends.apply(this, arguments); -} - -/** - * -------------------------------------------------------------------------- - * Bootstrap util/sanitizer.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - * -------------------------------------------------------------------------- - */ -// js-docs-end allow-list - -const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']); - -/** - * A pattern that recognizes URLs that are safe wrt. XSS in URL navigation - * contexts. - * - * Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38 - */ -// eslint-disable-next-line unicorn/better-regex -const SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i; -const allowedAttribute = (attribute, allowedAttributeList) => { - const attributeName = attribute.nodeName.toLowerCase(); - if (allowedAttributeList.includes(attributeName)) { - if (uriAttributes.has(attributeName)) { - return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue)); + function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) { + if (!unsafeHtml.length) { + return unsafeHtml; } - return true; - } - - // Check if a regular expression validates the attribute. - return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName)); -}; -function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) { - if (!unsafeHtml.length) { - return unsafeHtml; - } - if (sanitizeFunction && typeof sanitizeFunction === 'function') { - return sanitizeFunction(unsafeHtml); - } - const domParser = new window.DOMParser(); - const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html'); - const elements = [].concat(...createdDocument.body.querySelectorAll('*')); - for (const element of elements) { - const elementName = element.nodeName.toLowerCase(); - if (!Object.keys(allowList).includes(elementName)) { - element.remove(); - continue; + if (sanitizeFunction && typeof sanitizeFunction === 'function') { + return sanitizeFunction(unsafeHtml); } - const attributeList = [].concat(...element.attributes); - const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []); - for (const attribute of attributeList) { - if (!allowedAttribute(attribute, allowedAttributes)) { - element.removeAttribute(attribute.nodeName); + const domParser = new window.DOMParser(); + const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html'); + const elements = [].concat(...createdDocument.body.querySelectorAll('*')); + for (const element of elements) { + const elementName = element.nodeName.toLowerCase(); + if (!Object.keys(allowList).includes(elementName)) { + element.remove(); + continue; + } + const attributeList = [].concat(...element.attributes); + const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []); + for (const attribute of attributeList) { + if (!allowedAttribute(attribute, allowedAttributes)) { + element.removeAttribute(attribute.nodeName); + } } } + return createdDocument.body.innerHTML; } - return createdDocument.body.innerHTML; -} - -const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; -const DATA_ATTRIBUTE_PATTERN = /^data-[\w-]*$/i; -const DefaultAllowlist = { - // Global attributes allowed on any supplied element below. - '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN, DATA_ATTRIBUTE_PATTERN], - a: ['target', 'href', 'title', 'rel'], - area: [], - b: [], - br: [], - col: [], - code: [], - div: [], - em: [], - hr: [], - h1: [], - h2: [], - h3: [], - h4: [], - h5: [], - h6: [], - i: [], - img: ['src', 'srcset', 'alt', 'title', 'width', 'height'], - li: [], - ol: [], - p: [], - pre: [], - s: [], - small: [], - span: [], - sub: [], - sup: [], - strong: [], - u: [], - ul: [], - button: ['type'], - input: ['accept', 'alt', 'autocomplete', 'autofocus', 'capture', 'checked', 'dirname', 'disabled', 'height', 'list', 'max', 'maxlength', 'min', 'minlength', 'multiple', 'type', 'name', 'pattern', 'placeholder', 'readonly', 'required', 'size', 'src', 'step', 'value', 'width', 'inputmode'], - select: ['name'], - textarea: ['name'], - option: ['value', 'selected'] -}; - -// Only define the Joomla namespace if not defined. -window.Joomla = window.Joomla || {}; -window.Joomla.Modal = window.Joomla.Modal || { + /** - * ***************************************************************** - * Modals should implement - * ***************************************************************** - * - * getCurrent Type Function Should return the modal element - * setCurrent Type Function Should set the modal element - * current Type {node} The modal element - * - * USAGE (assuming that exampleId is the modal id) - * To get the current modal element: - * Joomla.Modal.getCurrent(); // Returns node element, eg: document.getElementById('exampleId') - * To set the current modal element: - * Joomla.Modal.setCurrent(document.getElementById('exampleId')); - * - * ************************************************************* - * Joomla's UI modal uses `element.close();` to close the modal - * and `element.open();` to open the modal - * If you are using another modal make sure the same - * functionality is bound to the modal element - * @see media/legacy/bootstrap.init.js - * ************************************************************* + * @copyright (C) 2018 Open Source Matters, Inc. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ - current: '', - setCurrent: element => { - window.Joomla.Modal.current = element; - }, - getCurrent: () => window.Joomla.Modal.current -}; -(Joomla => { + const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; + const DATA_ATTRIBUTE_PATTERN = /^data-[\w-]*$/i; + const DefaultAllowlist = { + // Global attributes allowed on any supplied element below. + '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN, DATA_ATTRIBUTE_PATTERN], + a: ['target', 'href', 'title', 'rel'], + area: [], + b: [], + br: [], + col: [], + code: [], + div: [], + em: [], + hr: [], + h1: [], + h2: [], + h3: [], + h4: [], + h5: [], + h6: [], + i: [], + img: ['src', 'srcset', 'alt', 'title', 'width', 'height'], + li: [], + ol: [], + p: [], + pre: [], + s: [], + small: [], + span: [], + sub: [], + sup: [], + strong: [], + u: [], + ul: [], + button: ['type'], + input: ['accept', 'alt', 'autocomplete', 'autofocus', 'capture', 'checked', 'dirname', 'disabled', 'height', 'list', 'max', 'maxlength', 'min', 'minlength', 'multiple', 'type', 'name', 'pattern', 'placeholder', 'readonly', 'required', 'size', 'src', 'step', 'value', 'width', 'inputmode'], + select: ['name'], + textarea: ['name'], + option: ['value', 'selected'] + }; + + // Only define the Joomla namespace if not defined. + window.Joomla = window.Joomla || {}; + + // Only define editors if not defined + Joomla.editors = Joomla.editors || {}; + + // An object to hold each editor instance on page, only define if not defined. + Joomla.editors.instances = Joomla.editors.instances || { + /** + * ***************************************************************** + * All Editors MUST register, per instance, the following callbacks: + * ***************************************************************** + * + * getValue Type Function Should return the complete data from the editor + * Example: () => { return this.element.value; } + * setValue Type Function Should replace the complete data of the editor + * Example: (text) => { return this.element.value = text; } + * getSelection Type Function Should return the selected text from the editor + * Example: function () { return this.selectedText; } + * disable Type Function Toggles the editor into disabled mode. When the editor is + * active then everything should be usable. When inactive the + * editor should be unusable AND disabled for form validation + * Example: (bool) => { return this.disable = value; } + * replaceSelection Type Function Should replace the selected text of the editor + * If nothing selected, will insert the data at the cursor + * Example: + * (text) => { + * return insertAtCursor(this.element, text); + * } + * + * USAGE (assuming that jform_articletext is the textarea id) + * { + * To get the current editor value: + * Joomla.editors.instances['jform_articletext'].getValue(); + * To set the current editor value: + * Joomla.editors.instances['jform_articletext'].setValue('Joomla! rocks'); + * To replace(selection) or insert a value at the current editor cursor (replaces the J3 + * jInsertEditorText API): + * replaceSelection: + * Joomla.editors.instances['jform_articletext'].replaceSelection('Joomla! rocks') + * } + * + * ********************************************************* + * ANY INTERACTION WITH THE EDITORS SHOULD USE THE ABOVE API + * ********************************************************* + */ + }; + Joomla.Modal = Joomla.Modal || { + /** + * ***************************************************************** + * Modals should implement + * ***************************************************************** + * + * getCurrent Type Function Should return the modal element + * setCurrent Type Function Should set the modal element + * current Type {node} The modal element + * + * USAGE (assuming that exampleId is the modal id) + * To get the current modal element: + * Joomla.Modal.getCurrent(); // Returns node element, eg: document.getElementById('exampleId') + * To set the current modal element: + * Joomla.Modal.setCurrent(document.getElementById('exampleId')); + * + * ************************************************************* + * Joomla's UI modal uses `element.close();` to close the modal + * and `element.open();` to open the modal + * If you are using another modal make sure the same + * functionality is bound to the modal element + * @see media/legacy/bootstrap.init.js + * ************************************************************* + */ + current: '', + setCurrent: element => { + Joomla.Modal.current = element; + }, + getCurrent: () => Joomla.Modal.current + }; /** * Method to Extend Objects @@ -745,4 +796,5 @@ window.Joomla.Modal = window.Joomla.Modal || { } return msg; }; -})(Joomla); + +})(); diff --git a/media/system/js/core.min.js b/media/system/js/core.min.js index 9a5a98c131..0e7c25206f 100644 --- a/media/system/js/core.min.js +++ b/media/system/js/core.min.js @@ -1 +1,4 @@ -function _extends(){return _extends=Object.assign?Object.assign.bind():function(r){for(var a=1;a{const t=r.nodeName.toLowerCase();return a.includes(t)?uriAttributes.has(t)?!!SAFE_URL_PATTERN.test(r.nodeValue):!0:a.filter(e=>e instanceof RegExp).some(e=>e.test(t))};function sanitizeHtml(r,a,t){if(!r.length)return r;if(t&&typeof t=="function")return t(r);const s=new window.DOMParser().parseFromString(r,"text/html"),n=[].concat(...s.body.querySelectorAll("*"));for(const l of n){const i=l.nodeName.toLowerCase();if(!Object.keys(a).includes(i)){l.remove();continue}const o=[].concat(...l.attributes),u=[].concat(a["*"]||[],a[i]||[]);for(const c of o)allowedAttribute(c,u)||l.removeAttribute(c.nodeName)}return s.body.innerHTML}const ARIA_ATTRIBUTE_PATTERN=/^aria-[\w-]*$/i,DATA_ATTRIBUTE_PATTERN=/^data-[\w-]*$/i,DefaultAllowlist={"*":["class","dir","id","lang","role",ARIA_ATTRIBUTE_PATTERN,DATA_ATTRIBUTE_PATTERN],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[],button:["type"],input:["accept","alt","autocomplete","autofocus","capture","checked","dirname","disabled","height","list","max","maxlength","min","minlength","multiple","type","name","pattern","placeholder","readonly","required","size","src","step","value","width","inputmode"],select:["name"],textarea:["name"],option:["value","selected"]};window.Joomla=window.Joomla||{},window.Joomla.Modal=window.Joomla.Modal||{current:"",setCurrent:r=>{window.Joomla.Modal.current=r},getCurrent:()=>window.Joomla.Modal.current},(r=>{r.extend=(t,e)=>{let s=t;return t===null&&(s={}),[].slice.call(Object.keys(e)).forEach(n=>{s[n]=e[n]}),t},r.optionsStorage=r.optionsStorage||null,r.getOptions=(t,e)=>(r.optionsStorage||r.loadOptions(),r.optionsStorage[t]!==void 0?r.optionsStorage[t]:e),r.loadOptions=t=>{if(!t){const e=[].slice.call(document.querySelectorAll(".joomla-script-options.new"));let s=0;if(e.forEach(n=>{const l=n.text||n.textContent,i=JSON.parse(l);i&&(r.loadOptions(i),s+=1),n.className=n.className.replace(" new"," loaded")}),s)return}r.optionsStorage?t&&[].slice.call(Object.keys(t)).forEach(e=>{t[e]!==null&&typeof r.optionsStorage[e]=="object"&&typeof t[e]=="object"?r.optionsStorage[e]=r.extend(r.optionsStorage[e],t[e]):r.optionsStorage[e]=t[e]}):r.optionsStorage=t||{}},r.Text={strings:{},_:(t,e)=>{let s=t,n=e;const l=r.getOptions("joomla.jtext");return l&&(r.Text.load(l),r.loadOptions({"joomla.jtext":null})),n=n===void 0?s:n,s=s.toUpperCase(),r.Text.strings[s]!==void 0?r.Text.strings[s]:n},load:t=>([].slice.call(Object.keys(t)).forEach(e=>{r.Text.strings[e.toUpperCase()]=t[e]}),r.Text)},r.JText=r.Text,r.submitform=(t,e,s)=>{let n=e;const l=t;n||(n=document.getElementById("adminForm")),l&&(n.task.value=l),n.noValidate=!s,s?n.hasAttribute("novalidate")&&n.removeAttribute("novalidate"):n.setAttribute("novalidate","");const i=document.createElement("input");i.classList.add("hidden"),i.type="submit",n.appendChild(i).click(),n.removeChild(i)},r.submitbutton=(t,e,s)=>{let n=document.querySelector(e||"form.form-validate"),l=s;if(typeof e=="string"&&n===null&&(n=document.querySelector(`#${e}`)),n){if(l==null){const i=t.split(".");let o=n.getAttribute("data-cancel-task");o||(o=`${i[0]}.cancel`),l=t!==o}(!l||document.formvalidator.isValid(n))&&r.submitform(t,n)}else r.submitform(t)},r.checkAll=(t,e)=>{if(!t.form)return!1;const s=e||"cb",n=[].slice.call(t.form.elements);let l=0;return n.forEach(i=>{i.type===t.type&&i.id.indexOf(s)===0&&(i.checked=t.checked,l+=i.checked?1:0)}),t.form.boxchecked&&(t.form.boxchecked.value=l,t.form.boxchecked.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0}))),!0},r.isChecked=(t,e)=>{let s=e;if(typeof s>"u"?s=document.getElementById("adminForm"):typeof e=="string"&&(s=document.getElementById(e)),s.boxchecked.value=t?parseInt(s.boxchecked.value,10)+1:parseInt(s.boxchecked.value,10)-1,s.boxchecked.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0})),!s.elements["checkall-toggle"])return;let n=!0,l,i,o;for(l=0,o=s.elements.length;l{let l=n;typeof l>"u"?l=document.getElementById("adminForm"):typeof n=="string"&&(l=document.getElementById(n)),l.filter_order.value=t,l.filter_order_Dir.value=e,r.submitform(s,l)},r.listItemTask=(t,e,s=null)=>{let n=s;s!==null?n=document.getElementById(s):n=document.adminForm;const l=n[t];let i=0,o;if(!l)return!1;for(;o=n[`cb${i}`],!!o;)o.checked=!1,i+=1;return l.checked=!0,n.boxchecked.value=1,r.submitform(e,n),!1},r.replaceTokens=t=>{if(!/^[0-9A-F]{32}$/i.test(t))return;[].slice.call(document.getElementsByTagName("input")).forEach(s=>{s.type==="hidden"&&s.value==="1"&&s.name.length===32&&(s.name=t)})},r.request=t=>{const e=r.extend({url:"",method:"GET",data:null,perform:!0,promise:!1},t),s=(n,l)=>{const i=new XMLHttpRequest;if(i.open(e.method,e.url,!0),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.setRequestHeader("X-Ajax-Engine","Joomla!"),e.method!=="GET"){const o=r.getOptions("csrf.token","");o&&(!e.url.startsWith("http:")&&!e.url.startsWith("https:")||e.url.startsWith(window.location.origin))&&i.setRequestHeader("X-CSRF-Token",o),typeof e.data=="string"&&(!e.headers||!e.headers["Content-Type"])&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}if(e.headers&&[].slice.call(Object.keys(e.headers)).forEach(o=>{o==="Content-Type"&&e.headers["Content-Type"]==="false"||i.setRequestHeader(o,e.headers[o])}),i.onreadystatechange=()=>{i.readyState===4&&(i.status===200?e.promise?n.call(window,i):n.call(window,i.responseText,i):l.call(window,i),e.onComplete&&!e.promise&&e.onComplete.call(window,i))},e.perform){if(e.onBefore&&e.onBefore.call(window,i)===!1)return e.promise&&n.call(window,i),i;i.send(e.data)}return i};if(e.promise)return new Promise((n,l)=>{e.perform=!0,s(n,l)});try{return s(e.onSuccess||(()=>{}),e.onError||(()=>{}))}catch(n){return console.error(n),!1}};let a;r.enqueueRequest=t=>{if(!t.promise)throw new Error("Joomla.enqueueRequest supports only Joomla.request as Promise");return a?a=a.then(()=>r.request(t)):a=r.request(t),a},r.sanitizeHtml=(t,e,s)=>{const n=e==null?DefaultAllowlist:_extends({},DefaultAllowlist,e);return sanitizeHtml(t,n,s)},r.ajaxErrorsMessages=(t,e)=>{const s={};if(e==="parsererror"){const n=[];let l=t.responseText.trim();for(let i=l.length-1;i>=0;i--)n.unshift(["&#",l[i].charCodeAt(),";"].join(""));l=n.join(""),s.error=[r.Text._("JLIB_JS_AJAX_ERROR_PARSE").replace("%s",l)]}else e==="nocontent"?s.error=[r.Text._("JLIB_JS_AJAX_ERROR_NO_CONTENT")]:e==="timeout"?s.error=[r.Text._("JLIB_JS_AJAX_ERROR_TIMEOUT")]:e==="abort"?s.error=[r.Text._("JLIB_JS_AJAX_ERROR_CONNECTION_ABORT")]:t.responseJSON&&t.responseJSON.message?s.error=[`${r.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)} ${t.responseJSON.message}`]:t.statusText?s.error=[`${r.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)} ${t.statusText}`]:s.error=[r.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)];return s}})(Joomla); +(function(){"use strict";function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const o=t.nodeName.toLowerCase();return e.includes(o)?d.has(o)?!!f.test(t.nodeValue):!0:e.filter(r=>r instanceof RegExp).some(r=>r.test(o))};function J(t,e,o){if(!t.length)return t;if(o&&typeof o=="function")return o(t);const n=new window.DOMParser().parseFromString(t,"text/html"),l=[].concat(...n.body.querySelectorAll("*"));for(const a of l){const m=a.nodeName.toLowerCase();if(!Object.keys(e).includes(m)){a.remove();continue}const h=[].concat(...a.attributes),g=[].concat(e["*"]||[],e[m]||[]);for(const u of h)p(u,g)||a.removeAttribute(u.nodeName)}return n.body.innerHTML}/** + * @copyright (C) 2018 Open Source Matters, Inc. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */const c={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i,/^data-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[],button:["type"],input:["accept","alt","autocomplete","autofocus","capture","checked","dirname","disabled","height","list","max","maxlength","min","minlength","multiple","type","name","pattern","placeholder","readonly","required","size","src","step","value","width","inputmode"],select:["name"],textarea:["name"],option:["value","selected"]};window.Joomla=window.Joomla||{},Joomla.editors=Joomla.editors||{},Joomla.editors.instances=Joomla.editors.instances||{},Joomla.Modal=Joomla.Modal||{current:"",setCurrent:t=>{Joomla.Modal.current=t},getCurrent:()=>Joomla.Modal.current},Joomla.extend=(t,e)=>{let o=t;return t===null&&(o={}),[].slice.call(Object.keys(e)).forEach(r=>{o[r]=e[r]}),t},Joomla.optionsStorage=Joomla.optionsStorage||null,Joomla.getOptions=(t,e)=>(Joomla.optionsStorage||Joomla.loadOptions(),Joomla.optionsStorage[t]!==void 0?Joomla.optionsStorage[t]:e),Joomla.loadOptions=t=>{if(!t){const e=[].slice.call(document.querySelectorAll(".joomla-script-options.new"));let o=0;if(e.forEach(r=>{const n=r.text||r.textContent,l=JSON.parse(n);l&&(Joomla.loadOptions(l),o+=1),r.className=r.className.replace(" new"," loaded")}),o)return}Joomla.optionsStorage?t&&[].slice.call(Object.keys(t)).forEach(e=>{t[e]!==null&&typeof Joomla.optionsStorage[e]=="object"&&typeof t[e]=="object"?Joomla.optionsStorage[e]=Joomla.extend(Joomla.optionsStorage[e],t[e]):Joomla.optionsStorage[e]=t[e]}):Joomla.optionsStorage=t||{}},Joomla.Text={strings:{},_:(t,e)=>{let o=t,r=e;const n=Joomla.getOptions("joomla.jtext");return n&&(Joomla.Text.load(n),Joomla.loadOptions({"joomla.jtext":null})),r=r===void 0?o:r,o=o.toUpperCase(),Joomla.Text.strings[o]!==void 0?Joomla.Text.strings[o]:r},load:t=>([].slice.call(Object.keys(t)).forEach(e=>{Joomla.Text.strings[e.toUpperCase()]=t[e]}),Joomla.Text)},Joomla.JText=Joomla.Text,Joomla.submitform=(t,e,o)=>{let r=e;const n=t;r||(r=document.getElementById("adminForm")),n&&(r.task.value=n),r.noValidate=!o,o?r.hasAttribute("novalidate")&&r.removeAttribute("novalidate"):r.setAttribute("novalidate","");const l=document.createElement("input");l.classList.add("hidden"),l.type="submit",r.appendChild(l).click(),r.removeChild(l)},Joomla.submitbutton=(t,e,o)=>{let r=document.querySelector(e||"form.form-validate"),n=o;if(typeof e=="string"&&r===null&&(r=document.querySelector(`#${e}`)),r){if(n==null){const l=t.split(".");let a=r.getAttribute("data-cancel-task");a||(a=`${l[0]}.cancel`),n=t!==a}(!n||document.formvalidator.isValid(r))&&Joomla.submitform(t,r)}else Joomla.submitform(t)},Joomla.checkAll=(t,e)=>{if(!t.form)return!1;const o=e||"cb",r=[].slice.call(t.form.elements);let n=0;return r.forEach(l=>{l.type===t.type&&l.id.indexOf(o)===0&&(l.checked=t.checked,n+=l.checked?1:0)}),t.form.boxchecked&&(t.form.boxchecked.value=n,t.form.boxchecked.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0}))),!0},Joomla.isChecked=(t,e)=>{let o=e;if(typeof o>"u"?o=document.getElementById("adminForm"):typeof e=="string"&&(o=document.getElementById(e)),o.boxchecked.value=t?parseInt(o.boxchecked.value,10)+1:parseInt(o.boxchecked.value,10)-1,o.boxchecked.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0})),!o.elements["checkall-toggle"])return;let r=!0,n,l,a;for(n=0,a=o.elements.length;n{let n=r;typeof n>"u"?n=document.getElementById("adminForm"):typeof r=="string"&&(n=document.getElementById(r)),n.filter_order.value=t,n.filter_order_Dir.value=e,Joomla.submitform(o,n)},Joomla.listItemTask=(t,e,o=null)=>{let r=o;o!==null?r=document.getElementById(o):r=document.adminForm;const n=r[t];let l=0,a;if(!n)return!1;for(;a=r[`cb${l}`],!!a;)a.checked=!1,l+=1;return n.checked=!0,r.boxchecked.value=1,Joomla.submitform(e,r),!1},Joomla.replaceTokens=t=>{if(!/^[0-9A-F]{32}$/i.test(t))return;[].slice.call(document.getElementsByTagName("input")).forEach(o=>{o.type==="hidden"&&o.value==="1"&&o.name.length===32&&(o.name=t)})},Joomla.request=t=>{const e=Joomla.extend({url:"",method:"GET",data:null,perform:!0,promise:!1},t),o=(r,n)=>{const l=new XMLHttpRequest;if(l.open(e.method,e.url,!0),l.setRequestHeader("X-Requested-With","XMLHttpRequest"),l.setRequestHeader("X-Ajax-Engine","Joomla!"),e.method!=="GET"){const a=Joomla.getOptions("csrf.token","");a&&(!e.url.startsWith("http:")&&!e.url.startsWith("https:")||e.url.startsWith(window.location.origin))&&l.setRequestHeader("X-CSRF-Token",a),typeof e.data=="string"&&(!e.headers||!e.headers["Content-Type"])&&l.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}if(e.headers&&[].slice.call(Object.keys(e.headers)).forEach(a=>{a==="Content-Type"&&e.headers["Content-Type"]==="false"||l.setRequestHeader(a,e.headers[a])}),l.onreadystatechange=()=>{l.readyState===4&&(l.status===200?e.promise?r.call(window,l):r.call(window,l.responseText,l):n.call(window,l),e.onComplete&&!e.promise&&e.onComplete.call(window,l))},e.perform){if(e.onBefore&&e.onBefore.call(window,l)===!1)return e.promise&&r.call(window,l),l;l.send(e.data)}return l};if(e.promise)return new Promise((r,n)=>{e.perform=!0,o(r,n)});try{return o(e.onSuccess||(()=>{}),e.onError||(()=>{}))}catch(r){return console.error(r),!1}};let s;Joomla.enqueueRequest=t=>{if(!t.promise)throw new Error("Joomla.enqueueRequest supports only Joomla.request as Promise");return s?s=s.then(()=>Joomla.request(t)):s=Joomla.request(t),s},Joomla.sanitizeHtml=(t,e,o)=>{const r=e==null?c:i({},c,e);return J(t,r,o)},Joomla.ajaxErrorsMessages=(t,e)=>{const o={};if(e==="parsererror"){const r=[];let n=t.responseText.trim();for(let l=n.length-1;l>=0;l--)r.unshift(["&#",n[l].charCodeAt(),";"].join(""));n=r.join(""),o.error=[Joomla.Text._("JLIB_JS_AJAX_ERROR_PARSE").replace("%s",n)]}else e==="nocontent"?o.error=[Joomla.Text._("JLIB_JS_AJAX_ERROR_NO_CONTENT")]:e==="timeout"?o.error=[Joomla.Text._("JLIB_JS_AJAX_ERROR_TIMEOUT")]:e==="abort"?o.error=[Joomla.Text._("JLIB_JS_AJAX_ERROR_CONNECTION_ABORT")]:t.responseJSON&&t.responseJSON.message?o.error=[`${Joomla.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)} ${t.responseJSON.message}`]:t.statusText?o.error=[`${Joomla.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)} ${t.statusText}`]:o.error=[Joomla.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)];return o}})(); diff --git a/media/system/js/core.min.js.gz b/media/system/js/core.min.js.gz index 6bf8844d89bf1b4fe8b05fe09a7a85e7f9649d01..780f04d262b820e13743391f4e30a9a1abb5d7fa 100644 GIT binary patch literal 3242 zcmV;b3{~?ViwFP!000021GPD8a~n63-}5Vmh>rzG;D~Z|w{C}qbh1{7?Xo48r0k`N zN6X+$lN<{K7yzS3$ocPAjd_risO-Ax?hA-PccY)^Zh&-B=+x&%Q??|9gUETCr=AR& z^(d!oX~7p(N4dBde}mM=(z$%9kGH)-1sK$2gTrQNu0kcBvoQ zkuXC$Vr4C~FL@rz#X>z&Kg%6&Ik7S|+W9CG8t$Vj@N`JVGQFKzQ|OFvlI9)=Co>BZ z!b$F7j@$_+%IIkZE+w2SjPqa#C(h#MgUa=75-3KDPsG6&dffRY@1#p@zVHd7$H`Fk z{^+ zbU@jlRutk~r>e-nQNxZiv=UA_ok{G$d0Nr`Q>p@3(&;ADxxz5ae{Ev%IpQUwRDT^04`PrKJmAAQ`QqPHp2Y)d0b43_eVmOLZqf_Z=9LG8y zo9r?Ey#V`o1qxDc?1@s8>=DL7P*v(%2um} z;YqU_En3;zfUnJvYYq0@^{0>J!QS2v(O&dlsaZVQd^+<{L{C}tx_|he(ZvFEbY%*g zLi9;`57zPMy-wrk&CL6SOAZe1@9*Pp#>|zBjh!BatyG?Zb`V8T^vn6L(J!FEN)>%B z#wt&vk2UlTtixD&9T^)b>A?;n2M~RHe|mO)br$;v|3kEQP^p@VCD|j%kfcgFM>xrH zJXblML?!iL@KsOl#J{LS(^{DC=+vw$%>4CCuC{uIW)gz>Lo{2PvW80OPtSf>PM zQy1ir%5R8qpJ#rC(gAvejJOJvl?;n8*dT`s!(6HWaSN%#Z!xZZ0;==Y=qb*MFa*?b z;l0sl3Cvm}p6f;7lOd653X8QsvhXG~^M!(t?eKGA(gHn@%7rg1uBJ0cZy~F^qU9XI z%*n9|i?tG*sNCVtTs~A|l@@TG>uOxD6w2p|V2e7f*846(7$W*Y$rNTrWg){_keSiy zF-(6iavNB?{10f;uk)}VoZMlK+puxad~Pzdf(wZu8CKjz9P>#P49$vJV4g~b?KTw& zWMoth>Lm3coCmS>wOTDpUQJ`ja&N2?+n+ly;wJAt#a#n7sXm!ZDzW*oS}oJUTF^cr zggfx3^_Le%%T2_%Miai|(={4p;%FDzTF?g%I%}(uf>4W^qT_`Sx=^ayrA91E#)qTW zVRoph@^WwW08a@=orow>OHcDpF(1GlzRCS{5RqaBr zW*KX^#}ZcAzK?YYwoKWSQLNMtezmH8PmT7VJy+tx)x~*LOsQrAbk+`2D8|jcIAq+$ zAq8Vm5gYT^LO76=L?{m@5mG}&Sjo7l%X+!fSjWEGeK|1vMqq$ATKXZN^{cR|TZr90 zfRPZygsn)6>bI7UU!>fMZ~77%$L(11;w}g-Uw{jbXSWUQYk2Tt=|U^xl4Z$nk|(E% zTLEoP^ent7smt&;^e$-|KfU%RvItJ4dRJ`H<@Oc{+PGwlTVX{T?tfL~ zLz_y(wGKn`{FFR_C${7$0H!1Q?}xyy&0t%g#`K$lvDVffg0VM14Zs!SdG061&PCn9 z*5=&A^}b63L&>vrw4&Tb1Kv9SZc8^{T18fmqbIJF=>)I!s$1QIq-)p`Dy zJ0Hs|qhyw68E9;#V>~~CR0bm4;-v|6b~?*dMiq-wm8Z89RjWj80Ohu6tG45rad#&@ z3ab@CXQ21zy|uzz3xj#CKGPrssp5ciyLMf3UflQVkFS9lct$BB4&T zO2)>y3jskbW8LnvXr!K7R)TU6?SQR~96GTRrP_jA-M!xGE?UM>r z;m1%#hpP;rMZd`?wmpmr9au$%5I#)0T@~k9oa+o8E+*74Aw<91r7EtwMB$qm*ZZPf zK0ZwPSSo7fWAji0@Y?=#tvN~0vEwXv3+dC@*&RkU-W*R0=gqwOCh1J-DG0|%kz}J}XKxSYm`K?zkK-T;3Jlw^%w9FqaUvT0Mi+mw#na ziTq+?^J%WJxbIf!^y>2G-gPC7WW1>oF}i0fCv+g51uC~%t>;5h-{*SQ;XUUCK3hnf z;KO%b33%|(yT8Bhg+{Be3N*fS;q5J4Cu=T$c28@OHX>Y#qou?^-s0Qsz9=^0PNZ@` zR;wNIOTMO*BWxE`Y&1UoJUTBuR5eP_kg(#geue8oh`)p$1hEPygm~TWA46P+`LV6k zseHy2Hq=`Su?4p<+CjK0D3<6a1RP?cPwRKG5GwW7sOuW?go>3M;`-EuJ`{1^!o=8` zu9`og5<+wiS^KQtGJ2{6R|7Pm&S(`y?Gvynt2ct0ve^oc^yg}cHpjgc4|A&tt0fzF z`?zf1=~2$BB2B@$)rtnwmz6!vtTlGM#>y1i3u@bcjPP(81u-BZtuk^MDuWv|nM?m( zKmnHIh`zE(u(w>?OPCR9t49F<{W^zplK1JbMQ}e}5KZIZcaX&{C0D8d3kYp^ZDfR>Wr}UThf0x!ZjOJH=m%MHffbH$nke%JPb-jli8~c4boL-!tpPgR6zc{}+d3$jgwpzOcU*fvm z?eBPAIepFL>#OCzW^{4=?(FiZDSe#)SsA^7`O&N8ZdT=+1DGFuMae3B{r~^~ literal 3173 zcmV-r44U&FiwFP!000021Fbo0a~mnP-}hHYOjZRk!t%`SR&8sr%keljNhNX0*6dD| zuEs&#M-njt4bZVYQvdf`KzB>>Bb!^bUl0xFaNZBltkk)eMt82^&Vw!-CTk16wA&Sa zG5rF$XTmu-*C%^lY$|nuNj9sG!IrFN#^SHSb_72fil2p@mrKyzF$H?=7ejGyK-OX3 z^LB46Cc_2|I#PE$smZLY@y6e;fGvc(xYeJmS%LNUEEh^)Pl5D$*p6Ys{TL>ss(H5+ zZP;gGwNm%kFQlU_K~m*LJKrg-JoVnnY3adn4Y!>u@OX@-BEOkiQ|bayluHkYqJ@PS zqDXpJ28Iwt%IJ9kE=LrtjPqa-Mb3uLJ0m-lomT6PKN3jIv&3khT_DndyWLRrPFsXA@7T~ZaCwuY-6^F%c_aVc~gY!5Y z{V$|8&Bytp{199!W+L- zK?v%}TF!9S){a6NQx4?}`(7{T+{`+jbJU!H8W@i)872)RE8a?7m|OPC#fMMAI#ZnlSk+pQT7!Kv`tZKy@bvQS z>GkPoboutxucPxFFBevd{`h}y`;(V14ki8Nbo4Y_A^aX3%tWdDY2Z{z=lL4FMA;bS zN;rooDrAT>8DdijJx3H-qX5yT`FMuxgoPF%V3RMtbA$1YQBK{28v`MEtU{xPE1u?tc9Q` z*c4H;6nAM%0Uzd4r*XSdDlb=27j@FD&s_=c!3OY^5;-i4Dq{Y%APS?^eVqPLN*hT# z`6sl=*?CwYioS+Kwxi=H`O*|Y3oeFyHcr$gG-Qh849$vJg$$I9+hY<66lhWn>-6)^ zn57bY?`yMJS9EWMeK3Vk{E4;AW}TPTg7z6g)PX;%zbrpqKLO8bXl^Sy-$G-;kG}z3 zQ5?>*EEP;1t13TUD+t-tH-*D<&UL9&uZJC9SA>oy%qf{eD#g3G4G3W~W6wptz?vVg z-B?dJjP;}<)K}E9q&#=!jTLj?4;MC@K!{p42Y-=v8m{nTSj&_VMGc3^qvOYZ(&hZC zkws^4^2BBa0cYn7?)h;nMZU@F!1skMOdk7)C+Y+H5>?z!mAzk6V;XKl;Yd0iglYhL zDypjq*DSc&W|Mx;jP{^CmHge+#m7{_up&blnw~weC86$s9}%iq%#tB(^PM@f5aR@+ zPGE(iPQZo&k%~}P*U{>sc20b+_q>_?j+ucUuR{mcZJeYo*N^lK6V8!|r=V?7-&;O; z3aN2V{KO`WyuFu39f?mS<+*b}&HUD508K>$$AVc6Jb*C#Pbwq{>~ ztx(%ysc4;Wa5NEC5Bv+S_Yt$8v5JHqMDx~DU8bqyj(PLzYSpw6HN&jtckK3D`@vSG zD;mgVo*(1yH{*kIV4s6Vr8Orc=nE)gL#s8lmA+zpHQmaE|D+Wbo>SqKlj>!>@?p@ZEvFi4xP z^*$oKo_^Hf>;Yt&Iq*+!QiPiRQf@iUEeH=a(>T=+M20d&-FxXg6Geg1LKX#RM5tuJ z-#JPOLR5#l3FzW%Ayt7TVY!m|4Gy9uR-28g)oLo&kM#OQLm@BdH&gRKmYJz4b|u1vaxAb31!;`d*)V3dW;xKNzZT{EWD%M*z@J# z#-RGau!s!JW`hm?{9-M~gGt5G=I6kz?{aP`+*O-R%Tkc37Rgv9UGxR43F-BAeGq%9 zNd?M5XMZ_rHMT6LO0`ul=KXkfofNxA?ad;nGoPY#SJ;WB1kWIOf=d!BK4=nxZsSV^ z3dsvN_i@teNhS*>bpdx5GwcZGe9-G*$?A5B`({Sf0dJR2juqPOY<0s_)Hwt^iGH?;EE0?hdG;lA3s(Q+z-T-(oi}E9z%6R0jt{&am9s z9;*p$eJ&B2nmZKyF7&e9W^spluh(t;jI1^99u21!#7*^0mRpC_!5MrI^}-eq>{cf% zsvDNVx|a}mbV_3 zBjIjpaZ=K2ldv1Qy8StMzOFfv?QFK9wRKUC{UjP)1}n#B1GUXW!TdwR_4so>eX*9+ z=Lzk0&5)Q@_uV5Z5BO2ri)=RrR6mZ5qkUn4YC^k5LEgGy9GM%~X^9Vi9}oKfJng@p ztbh8kdT}V*r=8kgpJ|l0T5zxKM`9j&(zax7`wtgx3$3r#g|pXlHMg9jqxcydw|0BZ z`Ay4`gVp$*{>+(EdeGMfhtZ0_ug`C#JI z|nI;ewBqD>X|*4A+p&#+N&>}%H$%@W5&w4j0O5>Y0j=LU-w6e z8$)Q5{aLWgUch&OEh3iNY_{_;s_#qvQGCmIhRz-kMd5i^CI%1h`nR{Y{n#v(R)G$$ zJmHEIuWL1xZ{3JmpdFVs{CI7G=kC$%^`2!rz|MqnfHs>a_&0QmX(piqkj&`t>~ZhB z@Q`W`$FZ4Vas4W+bI$)3+ll~HI?nlzgTV=~+QUzD5+~V=%Fqw*EiemiWwe9XHX9sOUnPB< zTWjogjZ}GP8?bKwWeIU<6fg*YIAz}|7637{4D=r*lyJF|%u<8e@a-4Y+(xz|C0yr# z2Z$Y4u2#l+*9lK!of@W2ksaY0nYVXXaU!^2egQhN-saPg=`+E1zp04Vlbz@Mo$E*~?FFNKz$y?+Zl)zrl-FTRMoD7gCo&WSm+4@K*yXwewuxj6GyE^&H5PxV;U6{mkRl*i!_r{5=M@~ch$ifdks71;0>pLuMO`vGAJ=#8YmDB#fBWkC-PQH!yVKvU&o3`8F0VhG zUS6FevVFq&t3y$8iGqw|j=L?&50!^tOa|T(`21r1O&S-YH|LiR z)#mH;N2<=xusnXTews@4^C2vcKL@4~e4z8+C%rwpCHQ^%`!<0|8#Pr$aEf*^{LB9V L<#I2j>>U6AtQS3D diff --git a/media/system/js/fields/joomla-field-subform.js b/media/system/js/fields/joomla-field-subform.js index 34dd4352b5..9eb1b524d1 100644 --- a/media/system/js/fields/joomla-field-subform.js +++ b/media/system/js/fields/joomla-field-subform.js @@ -277,9 +277,12 @@ class JoomlaFieldSubform extends HTMLElement { // Set the id for fieldset and group label if (!countMulti) { // Look for
or
- let fieldset = $el.closest('.checkboxes'); + let fieldset = $el.closest('.checkboxes, fieldset'); // eslint-disable-next-line no-nested-ternary - fieldset = fieldset.nodeName === 'FIELDSET' ? fieldset : fieldset.parentElement.nodeName === 'FIELDSET' ? fieldset.parentElement : false; + if (fieldset) { + // eslint-disable-next-line no-nested-ternary + fieldset = fieldset.nodeName === 'FIELDSET' ? fieldset : fieldset.parentElement.nodeName === 'FIELDSET' ? fieldset.parentElement : false; + } if (fieldset) { const oldSetId = fieldset.id; fieldset.id = idNew; @@ -299,10 +302,17 @@ class JoomlaFieldSubform extends HTMLElement { // Set the id for fieldset and group label if (!countMulti) { - // Look for
or
- let fieldset = $el.closest('.radio'); - // eslint-disable-next-line no-nested-ternary - fieldset = fieldset.nodeName === 'FIELDSET' ? fieldset : fieldset.parentElement.nodeName === 'FIELDSET' ? fieldset.parentElement : false; + /** + * Look for one of: + * -
+ * -
+ * -
+ */ + let fieldset = $el.closest('.radio, .switcher, fieldset'); + if (fieldset) { + // eslint-disable-next-line no-nested-ternary + fieldset = fieldset.nodeName === 'FIELDSET' ? fieldset : fieldset.parentElement.nodeName === 'FIELDSET' ? fieldset.parentElement : false; + } if (fieldset) { const oldSetId = fieldset.id; fieldset.id = idNew; diff --git a/media/system/js/fields/joomla-field-subform.min.js b/media/system/js/fields/joomla-field-subform.min.js index e08300efe9..8c9e14e775 100644 --- a/media/system/js/fields/joomla-field-subform.min.js +++ b/media/system/js/fields/joomla-field-subform.min.js @@ -1,4 +1,4 @@ /** * @copyright (C) 2019 Open Source Matters, Inc. * @license GNU General Public License version 2 or later; see LICENSE.txt - */const KEYCODE={SPACE:"Space",ESC:"Escape",ENTER:"Enter"};function hasModifier(g){return g.ctrlKey||g.metaKey||g.shiftKey}class JoomlaFieldSubform extends HTMLElement{get buttonAdd(){return this.getAttribute("button-add")}get buttonRemove(){return this.getAttribute("button-remove")}get buttonMove(){return this.getAttribute("button-move")}get rowsContainer(){return this.getAttribute("rows-container")}get repeatableElement(){return this.getAttribute("repeatable-element")}get minimum(){return this.getAttribute("minimum")}get maximum(){return this.getAttribute("maximum")}get name(){return this.getAttribute("name")}set name(e){this.template=this.template.replace(new RegExp(` name="${this.name.replace(/[[\]]/g,"\\$&")}`,"g"),` name="${e}`),this.setAttribute("name",e)}constructor(){super();const e=this;if(this.containerWithRows=this,this.rowsContainer){const t=this.querySelectorAll(this.rowsContainer);Array.from(t).forEach(o=>{o.closest("joomla-field-subform")===this&&(this.containerWithRows=o)})}this.lastRowIndex=this.getRows().length-1,this.template="",this.prepareTemplate(),(this.buttonAdd||this.buttonRemove)&&(this.addEventListener("click",t=>{let o=null,a=null;if(e.buttonAdd&&(o=t.target.closest(e.buttonAdd)),e.buttonRemove&&(a=t.target.closest(e.buttonRemove)),o&&o.closest("joomla-field-subform")===e){let n=o.closest(e.repeatableElement);n=n&&n.closest("joomla-field-subform")===e?n:null,e.addRow(n),t.preventDefault()}else if(a&&a.closest("joomla-field-subform")===e){const n=a.closest(e.repeatableElement);e.removeRow(n),t.preventDefault()}}),this.addEventListener("keydown",t=>{if(t.code!==KEYCODE.SPACE)return;const o=e.buttonAdd&&t.target.matches(e.buttonAdd),a=e.buttonRemove&&t.target.matches(e.buttonRemove);if((o||a)&&t.target.closest("joomla-field-subform")===e){let n=t.target.closest(e.repeatableElement);n=n&&n.closest("joomla-field-subform")===e?n:null,a&&n?e.removeRow(n):o&&e.addRow(n),t.preventDefault()}})),this.buttonMove&&this.setUpDragSort()}getRows(){const e=Array.from(this.containerWithRows.children),t=[];return e.forEach(o=>{o.matches(this.repeatableElement)&&t.push(o)}),t}prepareTemplate(){const e=[].slice.call(this.children).filter(t=>t.classList.contains("subform-repeatable-template-section"));if(e[0]&&(this.template=e[0].innerHTML),!this.template)throw new Error("The row template is required for the subform element to work")}addRow(e){const t=this.getRows().length;if(t>=this.maximum)return null;let o;this.containerWithRows.nodeName==="TBODY"||this.containerWithRows.nodeName==="TABLE"?o=document.createElement("tbody"):o=document.createElement("div"),o.innerHTML=this.template;const a=o.children[0];return e?e.parentNode.insertBefore(a,e.nextSibling):this.containerWithRows.append(a),this.buttonMove&&(a.setAttribute("draggable","false"),a.setAttribute("aria-grabbed","false"),a.setAttribute("tabindex","0")),a.setAttribute("data-new","1"),this.fixUniqueAttributes(a,t),this.dispatchEvent(new CustomEvent("subform-row-add",{detail:{row:a},bubbles:!0})),a.dispatchEvent(new CustomEvent("joomla:updated",{bubbles:!0,cancelable:!0})),a}removeRow(e){this.getRows().length<=this.minimum||(this.dispatchEvent(new CustomEvent("subform-row-remove",{detail:{row:e},bubbles:!0})),e.dispatchEvent(new CustomEvent("joomla:removed",{bubbles:!0,cancelable:!0})),e.parentNode.removeChild(e))}fixUniqueAttributes(e,t){const o=t||0,a=e.getAttribute("data-group"),n=e.getAttribute("data-base-name"),p=Math.max(this.lastRowIndex,o),h=n+p;this.lastRowIndex=p+1,e.setAttribute("data-group",h);let r=e.querySelectorAll("[name]");const s={};r=[].slice.call(r).filter(i=>i.nodeName==="JOOMLA-FIELD-SUBFORM"?i.parentElement.closest("joomla-field-subform")===this:i.closest("joomla-field-subform")===this),r.forEach(i=>{const l=i,c=l.getAttribute("name"),E=l.getAttribute("aria-describedby"),u=c.replace(/(\[\]$)/g,"").replace(/(\]\[)/g,"__").replace(/\[/g,"_").replace(/\]/g,""),R=c.replace(`[${a}][`,`[${h}][`);let d=u.replace(a,h).replace(/\W/g,"_"),m=0;const v=l.id;if(l.type==="checkbox"&&c.match(/\[\]$/)){if(m=s[u]?s[u].length:0,!m){let b=l.closest(".checkboxes");if(b=b.nodeName==="FIELDSET"?b:b.parentElement.nodeName==="FIELDSET"?b.parentElement:!1,b){const w=b.id;b.id=d;const f=e.querySelector(`label[for="${w}"]`);f&&(f.setAttribute("for",d),f.id&&f.setAttribute("id",`${d}-lbl`))}}d+=m}else if(l.type==="radio"){if(m=s[u]?s[u].length:0,!m){let b=l.closest(".radio");if(b=b.nodeName==="FIELDSET"?b:b.parentElement.nodeName==="FIELDSET"?b.parentElement:!1,b){const w=b.id;b.id=d;const f=e.querySelector(`label[for="${w}"]`);f&&(f.setAttribute("for",d),f.id&&f.setAttribute("id",`${d}-lbl`))}}d+=m}s[u]?s[u].push(!0):s[u]=[!0],l.name=R,l.id&&(l.id=d),E&&l.setAttribute("aria-describedby",`${R}-desc`);const A=e.querySelector(`label[for="${v}"]`);A&&(A.setAttribute("for",d),A.id&&A.setAttribute("id",`${d}-lbl`))})}setUpDragSort(){const e=this;let t=null,o=!1;this.getRows().forEach(r=>{r.setAttribute("draggable","false"),r.setAttribute("aria-grabbed","false"),r.setAttribute("tabindex","0")});function a(r){return!r.form&&r.matches(e.buttonMove)?r:r.closest(e.buttonMove)}function n(r,s){let i=!1;if(r.parentNode===s.parentNode){for(let l=r;l;l=l.previousSibling)if(l===s){i=!0;break}}i?s.parentNode.insertBefore(r,s):s.parentNode.insertBefore(r,s.nextSibling)}this.addEventListener("touchstart",r=>{o=!0;const s=a(r.target),i=s?s.closest(e.repeatableElement):null;!i||i.closest("joomla-field-subform")!==e||(t?(i!==t&&n(t,i),t.setAttribute("draggable","false"),t.setAttribute("aria-grabbed","false"),t=null):(i.setAttribute("draggable","true"),i.setAttribute("aria-grabbed","true"),t=i),r.preventDefault())}),this.addEventListener("mousedown",({target:r})=>{if(o)return;const s=a(r),i=s?s.closest(e.repeatableElement):null;!i||i.closest("joomla-field-subform")!==e||(i.setAttribute("draggable","true"),i.setAttribute("aria-grabbed","true"),t=i)}),this.addEventListener("mouseup",()=>{t&&!o&&(t.setAttribute("draggable","false"),t.setAttribute("aria-grabbed","false"),t=null)}),this.addEventListener("keydown",r=>{if(r.code!==KEYCODE.ESC&&r.code!==KEYCODE.SPACE&&r.code!==KEYCODE.ENTER||r.target.form||!r.target.matches(e.repeatableElement))return;const s=r.target;if(!(!s||s.closest("joomla-field-subform")!==e)&&(r.code===KEYCODE.SPACE&&hasModifier(r)&&(s.getAttribute("aria-grabbed")==="true"?(s.setAttribute("draggable","false"),s.setAttribute("aria-grabbed","false"),t=null):(t&&(t.setAttribute("draggable","false"),t.setAttribute("aria-grabbed","false"),t=null),s.setAttribute("draggable","true"),s.setAttribute("aria-grabbed","true"),t=s),r.preventDefault()),r.code===KEYCODE.ESC&&t&&(t.setAttribute("draggable","false"),t.setAttribute("aria-grabbed","false"),t=null),r.code===KEYCODE.ENTER&&t)){if(t.setAttribute("draggable","false"),t.setAttribute("aria-grabbed","false"),s===t){t=null;return}n(t,s),r.preventDefault(),t=null}}),this.addEventListener("dragstart",({dataTransfer:r})=>{t&&(r.effectAllowed="move",r.setData("text",""))}),this.addEventListener("dragover",r=>{t&&r.preventDefault()}),this.addEventListener("dragenter",({target:r})=>{if(!t||r.parentElement.closest("joomla-field-subform")!==e)return;const s=r.closest(e.repeatableElement);!s||s.closest("joomla-field-subform")!==e||n(t,s)}),this.addEventListener("dragend",()=>{t&&(t.setAttribute("draggable","false"),t.setAttribute("aria-grabbed","false"),t=null)});const p=`${e.buttonMove}-up`,h=`${e.buttonMove}-down`;this.addEventListener("click",({target:r})=>{if(r.closest("joomla-field-subform")!==this)return;const s=r.closest(p),i=s?null:r.closest(h);if(!s&&!i)return;let l=(s||i).closest(e.repeatableElement);if(l=l&&l.closest("joomla-field-subform")===this?l:null,!l)return;const c=this.getRows(),E=c.indexOf(l);let u=0;s?(u=E-1,u=u<0?c.length-1:u):(u=E+1,u=u>c.length-1?0:u),n(l,c[u])})}}customElements.define("joomla-field-subform",JoomlaFieldSubform); + */const KEYCODE={SPACE:"Space",ESC:"Escape",ENTER:"Enter"};function hasModifier(g){return g.ctrlKey||g.metaKey||g.shiftKey}class JoomlaFieldSubform extends HTMLElement{get buttonAdd(){return this.getAttribute("button-add")}get buttonRemove(){return this.getAttribute("button-remove")}get buttonMove(){return this.getAttribute("button-move")}get rowsContainer(){return this.getAttribute("rows-container")}get repeatableElement(){return this.getAttribute("repeatable-element")}get minimum(){return this.getAttribute("minimum")}get maximum(){return this.getAttribute("maximum")}get name(){return this.getAttribute("name")}set name(e){this.template=this.template.replace(new RegExp(` name="${this.name.replace(/[[\]]/g,"\\$&")}`,"g"),` name="${e}`),this.setAttribute("name",e)}constructor(){super();const e=this;if(this.containerWithRows=this,this.rowsContainer){const t=this.querySelectorAll(this.rowsContainer);Array.from(t).forEach(o=>{o.closest("joomla-field-subform")===this&&(this.containerWithRows=o)})}this.lastRowIndex=this.getRows().length-1,this.template="",this.prepareTemplate(),(this.buttonAdd||this.buttonRemove)&&(this.addEventListener("click",t=>{let o=null,l=null;if(e.buttonAdd&&(o=t.target.closest(e.buttonAdd)),e.buttonRemove&&(l=t.target.closest(e.buttonRemove)),o&&o.closest("joomla-field-subform")===e){let n=o.closest(e.repeatableElement);n=n&&n.closest("joomla-field-subform")===e?n:null,e.addRow(n),t.preventDefault()}else if(l&&l.closest("joomla-field-subform")===e){const n=l.closest(e.repeatableElement);e.removeRow(n),t.preventDefault()}}),this.addEventListener("keydown",t=>{if(t.code!==KEYCODE.SPACE)return;const o=e.buttonAdd&&t.target.matches(e.buttonAdd),l=e.buttonRemove&&t.target.matches(e.buttonRemove);if((o||l)&&t.target.closest("joomla-field-subform")===e){let n=t.target.closest(e.repeatableElement);n=n&&n.closest("joomla-field-subform")===e?n:null,l&&n?e.removeRow(n):o&&e.addRow(n),t.preventDefault()}})),this.buttonMove&&this.setUpDragSort()}getRows(){const e=Array.from(this.containerWithRows.children),t=[];return e.forEach(o=>{o.matches(this.repeatableElement)&&t.push(o)}),t}prepareTemplate(){const e=[].slice.call(this.children).filter(t=>t.classList.contains("subform-repeatable-template-section"));if(e[0]&&(this.template=e[0].innerHTML),!this.template)throw new Error("The row template is required for the subform element to work")}addRow(e){const t=this.getRows().length;if(t>=this.maximum)return null;let o;this.containerWithRows.nodeName==="TBODY"||this.containerWithRows.nodeName==="TABLE"?o=document.createElement("tbody"):o=document.createElement("div"),o.innerHTML=this.template;const l=o.children[0];return e?e.parentNode.insertBefore(l,e.nextSibling):this.containerWithRows.append(l),this.buttonMove&&(l.setAttribute("draggable","false"),l.setAttribute("aria-grabbed","false"),l.setAttribute("tabindex","0")),l.setAttribute("data-new","1"),this.fixUniqueAttributes(l,t),this.dispatchEvent(new CustomEvent("subform-row-add",{detail:{row:l},bubbles:!0})),l.dispatchEvent(new CustomEvent("joomla:updated",{bubbles:!0,cancelable:!0})),l}removeRow(e){this.getRows().length<=this.minimum||(this.dispatchEvent(new CustomEvent("subform-row-remove",{detail:{row:e},bubbles:!0})),e.dispatchEvent(new CustomEvent("joomla:removed",{bubbles:!0,cancelable:!0})),e.parentNode.removeChild(e))}fixUniqueAttributes(e,t){const o=t||0,l=e.getAttribute("data-group"),n=e.getAttribute("data-base-name"),p=Math.max(this.lastRowIndex,o),h=n+p;this.lastRowIndex=p+1,e.setAttribute("data-group",h);let r=e.querySelectorAll("[name]");const s={};r=[].slice.call(r).filter(i=>i.nodeName==="JOOMLA-FIELD-SUBFORM"?i.parentElement.closest("joomla-field-subform")===this:i.closest("joomla-field-subform")===this),r.forEach(i=>{const a=i,c=a.getAttribute("name"),E=a.getAttribute("aria-describedby"),b=c.replace(/(\[\]$)/g,"").replace(/(\]\[)/g,"__").replace(/\[/g,"_").replace(/\]/g,""),R=c.replace(`[${l}][`,`[${h}][`);let d=b.replace(l,h).replace(/\W/g,"_"),m=0;const v=a.id;if(a.type==="checkbox"&&c.match(/\[\]$/)){if(m=s[b]?s[b].length:0,!m){let u=a.closest(".checkboxes, fieldset");if(u&&(u=u.nodeName==="FIELDSET"?u:u.parentElement.nodeName==="FIELDSET"?u.parentElement:!1),u){const w=u.id;u.id=d;const f=e.querySelector(`label[for="${w}"]`);f&&(f.setAttribute("for",d),f.id&&f.setAttribute("id",`${d}-lbl`))}}d+=m}else if(a.type==="radio"){if(m=s[b]?s[b].length:0,!m){let u=a.closest(".radio, .switcher, fieldset");if(u&&(u=u.nodeName==="FIELDSET"?u:u.parentElement.nodeName==="FIELDSET"?u.parentElement:!1),u){const w=u.id;u.id=d;const f=e.querySelector(`label[for="${w}"]`);f&&(f.setAttribute("for",d),f.id&&f.setAttribute("id",`${d}-lbl`))}}d+=m}s[b]?s[b].push(!0):s[b]=[!0],a.name=R,a.id&&(a.id=d),E&&a.setAttribute("aria-describedby",`${R}-desc`);const A=e.querySelector(`label[for="${v}"]`);A&&(A.setAttribute("for",d),A.id&&A.setAttribute("id",`${d}-lbl`))})}setUpDragSort(){const e=this;let t=null,o=!1;this.getRows().forEach(r=>{r.setAttribute("draggable","false"),r.setAttribute("aria-grabbed","false"),r.setAttribute("tabindex","0")});function l(r){return!r.form&&r.matches(e.buttonMove)?r:r.closest(e.buttonMove)}function n(r,s){let i=!1;if(r.parentNode===s.parentNode){for(let a=r;a;a=a.previousSibling)if(a===s){i=!0;break}}i?s.parentNode.insertBefore(r,s):s.parentNode.insertBefore(r,s.nextSibling)}this.addEventListener("touchstart",r=>{o=!0;const s=l(r.target),i=s?s.closest(e.repeatableElement):null;!i||i.closest("joomla-field-subform")!==e||(t?(i!==t&&n(t,i),t.setAttribute("draggable","false"),t.setAttribute("aria-grabbed","false"),t=null):(i.setAttribute("draggable","true"),i.setAttribute("aria-grabbed","true"),t=i),r.preventDefault())}),this.addEventListener("mousedown",({target:r})=>{if(o)return;const s=l(r),i=s?s.closest(e.repeatableElement):null;!i||i.closest("joomla-field-subform")!==e||(i.setAttribute("draggable","true"),i.setAttribute("aria-grabbed","true"),t=i)}),this.addEventListener("mouseup",()=>{t&&!o&&(t.setAttribute("draggable","false"),t.setAttribute("aria-grabbed","false"),t=null)}),this.addEventListener("keydown",r=>{if(r.code!==KEYCODE.ESC&&r.code!==KEYCODE.SPACE&&r.code!==KEYCODE.ENTER||r.target.form||!r.target.matches(e.repeatableElement))return;const s=r.target;if(!(!s||s.closest("joomla-field-subform")!==e)&&(r.code===KEYCODE.SPACE&&hasModifier(r)&&(s.getAttribute("aria-grabbed")==="true"?(s.setAttribute("draggable","false"),s.setAttribute("aria-grabbed","false"),t=null):(t&&(t.setAttribute("draggable","false"),t.setAttribute("aria-grabbed","false"),t=null),s.setAttribute("draggable","true"),s.setAttribute("aria-grabbed","true"),t=s),r.preventDefault()),r.code===KEYCODE.ESC&&t&&(t.setAttribute("draggable","false"),t.setAttribute("aria-grabbed","false"),t=null),r.code===KEYCODE.ENTER&&t)){if(t.setAttribute("draggable","false"),t.setAttribute("aria-grabbed","false"),s===t){t=null;return}n(t,s),r.preventDefault(),t=null}}),this.addEventListener("dragstart",({dataTransfer:r})=>{t&&(r.effectAllowed="move",r.setData("text",""))}),this.addEventListener("dragover",r=>{t&&r.preventDefault()}),this.addEventListener("dragenter",({target:r})=>{if(!t||r.parentElement.closest("joomla-field-subform")!==e)return;const s=r.closest(e.repeatableElement);!s||s.closest("joomla-field-subform")!==e||n(t,s)}),this.addEventListener("dragend",()=>{t&&(t.setAttribute("draggable","false"),t.setAttribute("aria-grabbed","false"),t=null)});const p=`${e.buttonMove}-up`,h=`${e.buttonMove}-down`;this.addEventListener("click",({target:r})=>{if(r.closest("joomla-field-subform")!==this)return;const s=r.closest(p),i=s?null:r.closest(h);if(!s&&!i)return;let a=(s||i).closest(e.repeatableElement);if(a=a&&a.closest("joomla-field-subform")===this?a:null,!a)return;const c=this.getRows(),E=c.indexOf(a);let b=0;s?(b=E-1,b=b<0?c.length-1:b):(b=E+1,b=b>c.length-1?0:b),n(a,c[b])})}}customElements.define("joomla-field-subform",JoomlaFieldSubform); diff --git a/media/system/js/fields/joomla-field-subform.min.js.gz b/media/system/js/fields/joomla-field-subform.min.js.gz index 1f990965102ed87dee714c59e82bb047ce2f0a51..19613450177019b34f86b377c3ea4cb2452c9bc8 100644 GIT binary patch delta 1447 zcmV;Y1z7s66TTC$t^$9l`_Eb&mIwPjmdpf(t09<$F;)l&p|EzZ@8fhoMJLbS{)^_TGHO#G?;*3yZEo^P{0TQ0429p9(4W3AF>ig+& za+YzIvGlN{cG22k|J6m6HQSE+3NNvoW~J+FY6Ovtp}|;HMglKaMMwz=RU%2Y=FWv@ z#@s|B&}+V=Dcf}BUi!+DHeRrt&r`BO`yGDW5h*{!y{WTX0}lZ-^weTx<==j58D3oo zY=C6uvy34SnFeLvLn0Mmi-H+En>!JvA{&zS9)0*^0$GgH9m#>ylb!@Te^Y9z-B{>} zO)rP5uG6{9wUOiUdl~d{>Ka)(i@|V_wr5IC+i5|=JPcFN?MAC`^1O0h2~+KS5_4lU zoh|uk#Ip!eYpD9PVhL7ttF{@yzgDqZwvO{T{$8!BCVO2m*i;OTRIEJhHO1EAuVlHj zaf*SEVwb;wnmUmsGxK@Nf7PYow(o~Z<`YC{wtG9|8k%JnOegG`n~}|Wyw#0SN$7}W z?TviJ#7VKQCLC5bmH`iAe z&5xgYS09>pU*3PbxxGeRQJJ%Xha)@Gwm6cIP_-yXf}K}>;7rhn6!D!C2JLNaxCDOzaN@&mb`L3$GnzZ(^+rlk9));p2igHh-au>djFZL*R z;Uu|uO*!{+vD$Ob)?Nl|IGA#Bm8@~r*{GK_gei7DQ%AHY>bMp~9c)nwvV5Jh$X-2v z&NLjNj(uNkO;NUqB3;#1Ta&WeDHg|NSW#Ujfw1a|1gn+0${5otpJbLug)K2>s>3^+ zaX0J;nd`dQvk7R~$V{+Cs}m~VUyDL?_1<>TO3*&Iz1B?@d!|?;^Jt_ER|Zk*9%-+y zD`bjQH4zdjnC|L>gQ1)CIt?+OzgpgZ8jOK$n7UXr7&E?~VMB$T0$&dfb6jwg;Yiw8 z95~ac+|r7}M^;pZ2^({pb1K>YL@<`QhVqdB&q_nKRYA)40=fP);H>>~%=|+w@QSv! z4Z~JL!D`Hx_j%N&+8m;xG|qM)b=ZX%(j;{ zom(?mtZ3kdp3n6$-m?#frCe-F-qoKRlqJ-=8o%0%wxuln*v0w?pXl#QGxJk?P4(-s ztB;Iby)%31mU&%}{3La@FS9Y``=)GMf8dSUju2#4UR=FD6c%Q8nxPW#z;mY+rK%Hn zW{0kO#WS6Nsu0b%NQESU$Xuj=Q{uDT^6q~Teli6y=Q#A9* zBOProTabP19R5LL+xqGVo4BEOuem2>eY9e)G-)F@Uo^DuH$=@_c3W6(&*y?1_Ll3s zxNX3X8_B!8eA905bvdJrS5DevQQ+Fqn*{T6@(o$5qq{g{z2+GWS@>(K8!dirYKNq4 zx8Av}^W{dj)eZ^GFsD&J9N1pGh|2e$QU@KxkcbTS2u`%Y%I%OJ)MY)ey|W7%K#XP*}Uy_c7nkQOQQA^!;Ou z3&e?-F}ZToR+5rV#xmc}jybTKwVk?P4Rb4}I3v_p3tJm~fQ09%!K8pxgC`QqeV-pE zXBl@H>Dlc!}jSD_v((BZy=S4aTZ661XlZLP|)e5=pW(cP>0L z<|Z0}Uh^g8Y}1*0=_^m#c)@Z$=VXQUJN&vMQhtbgxwBjY4*@iEZZWd*Z@;w+uPy{O zKr-`L#t?{1gEH?SkqR)U5M=Od?nIc1Y)IOB^x=~UWHIJDk^}RTp9DOAIW^U8EcC>t zm%~-p>0IX8$Z`3-40<_rjVztTV7N%zGbN{OUeGWP!xVJ8(JGugubfxHR6C!<+*nO# zOMV*hEP~V;sy?k)f>qtBZ3ghKRqU3n<9v?4SF5VYURMk@6@w!cD^Gh(v9i5 zhEeeug=anB)CTPSI(w!3q?QLzi1dl;S zN`w%HFNn~blkEj3B{Nlv9(BWZxZ&(Qbn8^@#u*Lk z44SggDr5g)aiw6g8Ljv+pI->JX$8{d+VCPYg<)a(Ns(y26IG`N+zSSh=rb6xjvHq9&>nF-ct zbwUOFYf*@<-rEIQ3EBs@*P6s)&v0sF9*wl&${=dpBklEd;p13UgC3!R>8?IF@3|4K z(-8Cdt5vJP7}!3ji$#Mmyv?)Bg>#|1|jj--vnfisQDEv-0wWJP6|uraqe zev!N<+3)LCR+UxjykbYyTWG|4<9OqOI+&u+`A`enZ*`^M||ih?f>s znpkbVwDj&SZQ}2Gf7!9_p77`MItLtX%;ycY{kXF2rA_D7OcpB|xS{8BeT;wi?0aA- z7u%9|^_K)?3H7dit~R6X6iYvLu|C2l`a9Fi{1jhP{d(-`BV$+Z%wD=>UKb=kNuBM> zY>fH7Df`hMc%!zH0hyH-SI-KCh1s2Es02LlifKiu>I9zIS?XT#Oedf!L^Cc@AxR)I z7ilV|5HnPct*%ag;D%#l;Msp5I{}cxH_0bZWf~ism|IVN2bsbB=C%WJ8^&hycMW1L z3Ab|j;Irq^$vvN!{&-EBcnPUL1x_o)ChYNKw%YL&&3y7mN88I5WFI?+f2Y{CzBI5DUJI1 k!1m%rR6gsJI_MyVL}ai>aJv1YG3mVdA7XxcNNFDc06pB>RsaA1 diff --git a/media/system/js/fields/modal-content-select-field.js b/media/system/js/fields/modal-content-select-field.js index 52735402ae..26d67e7402 100644 --- a/media/system/js/fields/modal-content-select-field.js +++ b/media/system/js/fields/modal-content-select-field.js @@ -112,19 +112,26 @@ const setupField = container => { const action = button.dataset.buttonAction; const dialogConfig = button.dataset.modalConfig ? JSON.parse(button.dataset.modalConfig) : {}; const keyName = container.dataset.keyName || 'id'; + const token = Joomla.getOptions('csrf.token', ''); // Handle requested action let handle; switch (action) { case 'select': case 'create': - handle = doSelect(inputValue, inputTitle, dialogConfig); - break; + { + const url = dialogConfig.src.indexOf('http') === 0 ? new URL(dialogConfig.src) : new URL(dialogConfig.src, window.location.origin); + url.searchParams.set(token, '1'); + dialogConfig.src = url.toString(); + handle = doSelect(inputValue, inputTitle, dialogConfig); + break; + } case 'edit': { // Update current value in the URL const url = dialogConfig.src.indexOf('http') === 0 ? new URL(dialogConfig.src) : new URL(dialogConfig.src, window.location.origin); url.searchParams.set(keyName, inputValue.value); + url.searchParams.set(token, '1'); dialogConfig.src = url.toString(); handle = doSelect(inputValue, inputTitle, dialogConfig); break; diff --git a/media/system/js/fields/modal-content-select-field.min.js b/media/system/js/fields/modal-content-select-field.min.js index 32485e8410..38a9ca5ff4 100644 --- a/media/system/js/fields/modal-content-select-field.min.js +++ b/media/system/js/fields/modal-content-select-field.min.js @@ -1,4 +1,4 @@ -import g from"joomla.dialog";/** +import f from"joomla.dialog";/** * @copyright (C) 2023 Open Source Matters, Inc. * @license GNU General Public License version 2 or later; see LICENSE.txt - */const m=(e,t,o)=>{const a=`${e.id||e.value||""}`,n=t.value!==a;t.value=a,o&&(o.value=e.title||t.value),n&&t.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0}))},w=(e,t,o)=>{window.JoomlaExpectingPostMessage=!0;const a=new g(o);return a.classList.add("joomla-dialog-content-select-field"),a.show(),new Promise(n=>{const d=s=>{s.origin===window.location.origin&&(s.data.messageType==="joomla:content-select"?(m(s.data,e,t),a.close()):s.data.messageType==="joomla:cancel"&&a.close())};a.addEventListener("joomla-dialog:close",()=>{delete window.JoomlaExpectingPostMessage,window.removeEventListener("message",d),a.destroy(),n()}),window.addEventListener("message",d)})},f=(e,t)=>{const o=!!e.value;t.querySelectorAll("[data-show-when-value]").forEach(a=>{a.dataset.showWhenValue?o?a.removeAttribute("hidden"):a.setAttribute("hidden",""):o?a.setAttribute("hidden",""):a.removeAttribute("hidden")})},v=e=>{const t=e?e.querySelector(".js-input-value"):null,o=e?e.querySelector(".js-input-title"):null;if(!e||!t)throw new Error("Incomplete markup of Content dialog field");e.addEventListener("change",()=>{f(t,e)}),e.addEventListener("click",a=>{const n=a.target.closest("[data-button-action]");if(!n)return;a.preventDefault();const d=n.dataset.buttonAction,s=n.dataset.modalConfig?JSON.parse(n.dataset.modalConfig):{},u=e.dataset.keyName||"id";let i;switch(d){case"select":case"create":i=w(t,o,s);break;case"edit":{const l=s.src.indexOf("http")===0?new URL(s.src):new URL(s.src,window.location.origin);l.searchParams.set(u,t.value),s.src=l.toString(),i=w(t,o,s);break}case"clear":i=(async()=>m({id:"",title:""},t,o))();break;default:throw new Error(`Unknown action ${d} for Modal select field`)}i.then(()=>{if(n.dataset.checkinUrl){const l=n.dataset.checkinUrl,c=l.indexOf("http")===0?new URL(l):new URL(l,window.location.origin);c.searchParams.set(u,t.value),c.searchParams.set("cid[]",t.value);const r=new FormData;r.append("id",t.value),r.append("cid[]",t.value),Joomla.request({url:c.toString(),method:"POST",promise:!0,data:r})}})})},h=e=>{e.querySelectorAll(".js-modal-content-select-field").forEach(t=>v(t))};document.addEventListener("DOMContentLoaded",()=>h(document)),document.addEventListener("joomla:updated",e=>h(e.target)); + */const w=(e,t,s)=>{const o=`${e.id||e.value||""}`,n=t.value!==o;t.value=o,s&&(s.value=e.title||t.value),n&&t.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0}))},h=(e,t,s)=>{window.JoomlaExpectingPostMessage=!0;const o=new f(s);return o.classList.add("joomla-dialog-content-select-field"),o.show(),new Promise(n=>{const i=a=>{a.origin===window.location.origin&&(a.data.messageType==="joomla:content-select"?(w(a.data,e,t),o.close()):a.data.messageType==="joomla:cancel"&&o.close())};o.addEventListener("joomla-dialog:close",()=>{delete window.JoomlaExpectingPostMessage,window.removeEventListener("message",i),o.destroy(),n()}),window.addEventListener("message",i)})},p=(e,t)=>{const s=!!e.value;t.querySelectorAll("[data-show-when-value]").forEach(o=>{o.dataset.showWhenValue?s?o.removeAttribute("hidden"):o.setAttribute("hidden",""):s?o.setAttribute("hidden",""):o.removeAttribute("hidden")})},v=e=>{const t=e?e.querySelector(".js-input-value"):null,s=e?e.querySelector(".js-input-title"):null;if(!e||!t)throw new Error("Incomplete markup of Content dialog field");e.addEventListener("change",()=>{p(t,e)}),e.addEventListener("click",o=>{const n=o.target.closest("[data-button-action]");if(!n)return;o.preventDefault();const i=n.dataset.buttonAction,a=n.dataset.modalConfig?JSON.parse(n.dataset.modalConfig):{},u=e.dataset.keyName||"id",m=Joomla.getOptions("csrf.token","");let l;switch(i){case"select":case"create":{const c=a.src.indexOf("http")===0?new URL(a.src):new URL(a.src,window.location.origin);c.searchParams.set(m,"1"),a.src=c.toString(),l=h(t,s,a);break}case"edit":{const c=a.src.indexOf("http")===0?new URL(a.src):new URL(a.src,window.location.origin);c.searchParams.set(u,t.value),c.searchParams.set(m,"1"),a.src=c.toString(),l=h(t,s,a);break}case"clear":l=(async()=>w({id:"",title:""},t,s))();break;default:throw new Error(`Unknown action ${i} for Modal select field`)}l.then(()=>{if(n.dataset.checkinUrl){const c=n.dataset.checkinUrl,r=c.indexOf("http")===0?new URL(c):new URL(c,window.location.origin);r.searchParams.set(u,t.value),r.searchParams.set("cid[]",t.value);const d=new FormData;d.append("id",t.value),d.append("cid[]",t.value),Joomla.request({url:r.toString(),method:"POST",promise:!0,data:d})}})})},g=e=>{e.querySelectorAll(".js-modal-content-select-field").forEach(t=>v(t))};document.addEventListener("DOMContentLoaded",()=>g(document)),document.addEventListener("joomla:updated",e=>g(e.target)); diff --git a/media/system/js/fields/modal-content-select-field.min.js.gz b/media/system/js/fields/modal-content-select-field.min.js.gz index 6f2aa9138ae56eca1b71a85b33813b351f662945..7d665350734641c4616bd3cad2fd8c0e44ed66aa 100644 GIT binary patch literal 1183 zcmV;Q1Yr9giwFP!000021HD#FZ`?Kzz2{eOiC{q*T-i-;QfW7E+#rF!P{-{d2w*NX zyJAd{3OVw|*wue8D9Ibg*|?XYH*@DhGw;otv8fv$kSxd|_?mw9zP2hWjk118i~YU5 z7i5q8u6=VK%(6m4*fA%s4qp9AE*fy;%C|uSIa7!bq9E^_&d6^SViWWI{ncufjTwDd z9`>oM(cmHwLde_mYw{Kx1ZBx(JGVxY)6sedAsX+p$0z4kCmDXl z7i4c=dl!+cBm;pWa(TEOe)00=D@|+^>gwbU95M$ha@)Utmo}~ZXxEA1EH1EVAb40 zJ~`+(??m;e)Rl3iUuExmfKI+PpwYPHrH^<9F{&lV$wBeZPx{`1MP3BJHaOxlZB>k? zCSs<_l8wyG2IgkkI|PTb2o^NX76xodx$s%6{EBgr(p?5$n+VKpVKY+6!*wFdERB;= zjwM>J6&mkG!*t42Rw`6kJrw%kz5yxaSVR8($LSGUjs5}zrXsZU5g6zB^J#kY=ydum zpeuapwud~mo`&a1>v``>1xpZ@U;%;rE7D^02vGYwc#?jsjtY}%FCk*^_X$JBJN^*) zV^xpBI^Kz`vsqyFrG;>R)#K&EYik+(n2?zzx@M~i+^qNfM0vLG;Y8_* zd3m_@J$@0e=k@Oj++WGD9?Qs0e>_IN_n0le{OvyYwGb% z!nQw@a0K7?#c1|9&WvkX9NM8gcdfM|KJVMhar7|pFc!u{wp3jLxZk_ZQs;~qcW;Nmi zgYy>AyP48SK%Xe@8*qG(apAKjK+63F7OJ(#c<~@bx8-(7@w(3-)FVUfOJ$F}TbSk1 z`>TudtWhBedY1#w*PUo3Y;Cu2f3E7Z7)?n1e7#sOnl1z7Qp$s)MBMeCr>ytj`FBsT zd-3o>XAxA;)ujrmj%iX^E$ATNe=V>T z+e7jnl&>wQKyxdZiuX>ZSzWQUDRW9iFO;0pu0JuHje$iu3|IbCF*n!l*7=nq!*r6D zYtxa159BP(4H=jnBy+<%n_&fx_3AK-M^mON(6`222g|px?y`y?pGW!;%0EXqJd5xS zE7hj__=#?PMunCAP5r}%`i(+Wl$mN8a3$;Iu+8`F=OadD-!<>$m2z-j8$?M8003NROrih) literal 1155 zcmV-}1bq7+iwFP!000021BF%FZreBzeeYM$L}8Ettpx3xv`n^0vqg*CuxWN5iUOgj zvBicWRdN(Ju=Vc?N{W-FZuZUeTr_jenHf_zJ|J0=MesHK=6!8dRvKmfk{0`Wd#}hI z`BVGmKA2^Ngs@{y-W73+CBpIeCeh7!nYJp%Qxh>$ zWywb7W&?9G?Hz){Sp*9jXA1+iq+F;hR({2}Na-$vuT2Ezwy>2l%ENWcd@xJnq?BWc z)@y~vyU{S6vY3?$RaOs$e!g!&N;%e$|NL=!#Ol#sfWTCQwmt&mJbyV&j~<;)9|O8V zrEYu3Q|n1Q&sxuWUn*FFxC9FbUGdX>n+W^4zu73jeZiKaQhsVHRuxo6Q6{R>7}GQu0X%DdMBkzHWNP zYZY$WhWG_J9>honb&zoq3fRHe!wC1%Suhlk2;S*wjlQKqZM$_+WvIduaL{VR2L|UY zqIWZ;(*S*?yl=qqVT=ovH33rY_pnf{MaGMVQFL2whZOJn3?e=;)V@^q*t>;U9(}sH zIL{gt(m?NW;Q6`}t%R-Z7Vghgofe}hX<-40DdNhYu2{*}T1BAa0O$Qf2T%w!H*&>L zcoBIq51?*~-U_8bnvZB$8M7F4W?TtBE*6ZYgFv~I^57`(b^Z4#>pgh>(^Kr;H@vV} z1Qm33se-Cw5-4lMc0Kp8(q`zdFc`OFTs$wb8(OfSLh692c<*%Lxn^rq=9G$FWI3f> zzn(dJ=&l@y$)Bt3=Gxslzj9z`Tyn?Zucn4!#jrQwv=ACH8|Wc@b53q#zk`KRSD&=Br5h0!nt@MdOT=tQz}fc VkV0Wx7@QZc{sSZWoqdG~003bUK2-n! diff --git a/media/system/js/fields/validate.js b/media/system/js/fields/validate.js index 4638e81840..01e947124d 100644 --- a/media/system/js/fields/validate.js +++ b/media/system/js/fields/validate.js @@ -1,728 +1,740 @@ -/** Highest positive signed 32-bit float value */ -const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -const base = 36; -const tMin = 1; -const tMax = 26; -const skew = 38; -const damp = 700; -const initialBias = 72; -const initialN = 128; // 0x80 -const delimiter = '-'; // '\x2D' - -/** Regular expressions */ -const regexPunycode = /^xn--/; -const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. -const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -const errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -const baseMinusTMin = base - tMin; -const floor = Math.floor; -const stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, callback) { - const result = []; - let length = array.length; - while (length--) { - result[length] = callback(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {String} A new string of characters returned by the callback - * function. - */ -function mapDomain(domain, callback) { - const parts = domain.split('@'); - let result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - domain = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - domain = domain.replace(regexSeparators, '\x2E'); - const labels = domain.split('.'); - const encoded = map(labels, callback).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - const output = []; - let counter = 0; - const length = string.length; - while (counter < length) { - const value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - const extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -const ucs2encode = codePoints => String.fromCodePoint(...codePoints); - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -const basicToDigit = function basicToDigit(codePoint) { - if (codePoint >= 0x30 && codePoint < 0x3A) { - return 26 + (codePoint - 0x30); - } - if (codePoint >= 0x41 && codePoint < 0x5B) { - return codePoint - 0x41; - } - if (codePoint >= 0x61 && codePoint < 0x7B) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -const digitToBasic = function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -const adapt = function adapt(delta, numPoints, firstTime) { - let k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for /* no initialization */ - (; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -const decode = function decode(input) { - // Don't use UCS-2. - const output = []; - const inputLength = input.length; - let i = 0; - let n = initialN; - let bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - let basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - for (let j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for /* no final expression */ - (let index = basic > 0 ? basic + 1 : 0; index < inputLength;) { - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - const oldi = i; - for /* no condition */ - (let w = 1, k = base;; k += base) { - if (index >= inputLength) { - error('invalid-input'); - } - const digit = basicToDigit(input.charCodeAt(index++)); - if (digit >= base) { - error('invalid-input'); - } - if (digit > floor((maxInt - i) / w)) { - error('overflow'); - } - i += digit * w; - const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (digit < t) { - break; - } - const baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - w *= baseMinusT; - } - const out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - } - return String.fromCodePoint(...output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -const encode = function encode(input) { - const output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - const inputLength = input.length; - - // Initialize the state. - let n = initialN; - let delta = 0; - let bias = initialBias; - - // Handle the basic code points. - for (const currentValue of input) { - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - const basicLength = output.length; - let handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - // All non-basic code points < n have been handled already. Find the next - // larger one: - let m = maxInt; - for (const currentValue of input) { - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - const handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - delta += (m - n) * handledCPCountPlusOne; - n = m; - for (const currentValue of input) { - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - if (currentValue === n) { - // Represent delta as a generalized variable-length integer. - let q = delta; - for /* no condition */ - (let k = base;; k += base) { - const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (q < t) { - break; - } - const qMinusT = q - t; - const baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); - q = floor(qMinusT / baseMinusT); - } - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); - delta = 0; - ++handledCPCount; - } - } - ++delta; - ++n; - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -const toUnicode = function toUnicode(input) { - return mapDomain(input, function (string) { - return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -const toASCII = function toASCII(input) { - return mapDomain(input, function (string) { - return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -const punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.3.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -/** - * @copyright (C) 2018 Open Source Matters, Inc. - * @license GNU General Public License version 2 or later; see LICENSE.txt - */ -class JFormValidator { - constructor() { - this.customValidators = {}; - this.handlers = []; - this.handlers = {}; - this.removeMarking = this.removeMarking.bind(this); - this.inputEmail = () => { - const input = document.createElement('input'); - input.setAttribute('type', 'email'); - return input.type !== 'text'; - }; - - // Default handlers - this.setHandler('username', value => { - const regex = /[<|>|"|'|%|;|(|)|&]/i; - return !regex.test(value); - }); - this.setHandler('password', value => { - const regex = /^\S[\S ]{2,98}\S$/; - return regex.test(value); - }); - this.setHandler('numeric', value => { - const regex = /^(\d|-)?(\d|,)*\.?\d*$/; - return regex.test(value); - }); - this.setHandler('email', value => { - const newValue = punycode.toASCII(value); - const regex = /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; - return regex.test(newValue); - }); - - // Attach all forms with a class 'form-validate' - const forms = [].slice.call(document.querySelectorAll('form')); - forms.forEach(form => { - if (form.classList.contains('form-validate')) { - this.attachToForm(form); - } - }); - } - get custom() { - return this.customValidators; - } - set custom(value) { - this.customValidators = value; - } - setHandler(name, func, en) { - const isEnabled = en === '' ? true : en; - this.handlers[name] = { - enabled: isEnabled, - exec: func - }; - } - - // eslint-disable-next-line class-methods-use-this - markValid(element) { - // Get a label - const label = element.form.querySelector(`label[for="${element.id}"]`); - let message; - if (element.classList.contains('required') || element.getAttribute('required')) { - if (label) { - message = label.querySelector('span.form-control-feedback'); - } - } - element.classList.remove('form-control-danger'); - element.classList.remove('invalid'); - element.classList.add('form-control-success'); - element.parentNode.classList.remove('has-danger'); - element.parentNode.classList.add('has-success'); - element.setAttribute('aria-invalid', 'false'); - - // Remove message - if (message) { - message.parentNode.removeChild(message); - } - - // Restore Label - if (label) { - label.classList.remove('invalid'); - } - } - - // eslint-disable-next-line class-methods-use-this - markInvalid(element, empty) { - // Get a label - const label = element.form.querySelector(`label[for="${element.id}"]`); - element.classList.remove('form-control-success'); - element.classList.remove('valid'); - element.classList.add('form-control-danger'); - element.classList.add('invalid'); - element.parentNode.classList.remove('has-success'); - element.parentNode.classList.add('has-danger'); - element.setAttribute('aria-invalid', 'true'); - - // Display custom message - let mesgCont; - const message = element.getAttribute('data-validation-text'); - if (label) { - mesgCont = label.querySelector('span.form-control-feedback'); - } - if (!mesgCont) { - const elMsg = document.createElement('span'); - elMsg.classList.add('form-control-feedback'); - if (empty && empty === 'checkbox') { - elMsg.innerHTML = message !== null ? Joomla.sanitizeHtml(message) : Joomla.sanitizeHtml(Joomla.Text._('JLIB_FORM_FIELD_REQUIRED_CHECK')); - } else if (empty && empty === 'value') { - elMsg.innerHTML = message !== null ? Joomla.sanitizeHtml(message) : Joomla.sanitizeHtml(Joomla.Text._('JLIB_FORM_FIELD_REQUIRED_VALUE')); - } else { - elMsg.innerHTML = message !== null ? Joomla.sanitizeHtml(message) : Joomla.sanitizeHtml(Joomla.Text._('JLIB_FORM_FIELD_INVALID_VALUE')); - } - if (label) { - label.appendChild(elMsg); - } - } - - // Mark the Label as well - if (label) { - label.classList.add('invalid'); - } - } - - // eslint-disable-next-line class-methods-use-this - removeMarking(element) { - // Get the associated label - let message; - const label = element.form.querySelector(`label[for="${element.id}"]`); - if (label) { - message = label.querySelector('span.form-control-feedback'); - } - element.classList.remove('form-control-danger'); - element.classList.remove('form-control-success'); - element.classList.remove('invalid'); - element.classList.add('valid'); - element.parentNode.classList.remove('has-danger'); - element.parentNode.classList.remove('has-success'); - - // Remove message - if (message) { - if (label) { - label.removeChild(message); - } - } - - // Restore Label - if (label) { - label.classList.remove('invalid'); - } - } - handleResponse(state, element, empty) { - const tagName = element.tagName.toLowerCase(); - - // Set the element and its label (if exists) invalid state - if (tagName !== 'button' && element.value !== undefined || tagName === 'fieldset') { - if (state === false) { - this.markInvalid(element, empty); - } else { - this.markValid(element); - } - } - } - validate(element) { - let tagName; - - // Ignore the element if its currently disabled, - // because are not submitted for the http-request. - // For those case return always true. - if (element.getAttribute('disabled') === 'disabled' || element.getAttribute('display') === 'none') { - this.handleResponse(true, element); - return true; - } - // If the field is required make sure it has a value - if (element.getAttribute('required') || element.classList.contains('required')) { - tagName = element.tagName.toLowerCase(); - if (tagName === 'fieldset' && (element.classList.contains('radio') || element.classList.contains('checkboxes'))) { - // No options are checked. - if (element.querySelector('input:checked') === null) { - this.handleResponse(false, element, 'checkbox'); - return false; - } - } else if (element.getAttribute('type') === 'checkbox' && element.checked !== true || tagName === 'select' && !element.value.length) { - this.handleResponse(false, element, 'checkbox'); - return false; - } else if (!element.value || element.classList.contains('placeholder')) { - // If element has class placeholder that means it is empty. - this.handleResponse(false, element, 'value'); - return false; - } - } - - // Only validate the field if the validate class is set - const handler = element.getAttribute('class') && element.getAttribute('class').match(/validate-([a-zA-Z0-9_-]+)/) ? element.getAttribute('class').match(/validate-([a-zA-Z0-9_-]+)/)[1] : ''; - if (element.getAttribute('pattern') && element.getAttribute('pattern') !== '') { - if (element.value.length) { - const isValid = new RegExp(`^${element.getAttribute('pattern')}$`).test(element.value); - this.handleResponse(isValid, element, 'empty'); - return isValid; - } - if (element.hasAttribute('required') || element.classList.contains('required')) { - this.handleResponse(false, element, 'empty'); - return false; - } - this.handleResponse(true, element); - return true; - } - if (handler === '') { - this.handleResponse(true, element); - return true; - } - - // Check the additional validation types - if (handler && handler !== 'none' && this.handlers[handler] && element.value) { - // Execute the validation handler and return result - if (this.handlers[handler].exec(element.value, element) !== true) { - this.handleResponse(false, element, 'invalid_value'); - return false; - } - } - - // Return validation state - this.handleResponse(true, element); - return true; - } - isValid(form) { - let valid = true; - let message; - let error; - let fields; - const invalid = []; - - // Validate form fields - if (form.nodeName === 'FORM') { - fields = [].slice.call(form.elements); - } else { - fields = [].slice.call(form.querySelectorAll('input, textarea, select, button, fieldset')); - } - fields.forEach(field => { - if (this.validate(field) === false) { - valid = false; - invalid.push(field); - } - }); - - // Run custom form validators if present - if (Object.keys(this.customValidators).length) { - Object.keys(this.customValidators).foreach(key => { - if (this.customValidators[key].exec() !== true) { - valid = false; - } - }); - } - if (!valid && invalid.length > 0) { - if (form.getAttribute('data-validation-text')) { - message = form.getAttribute('data-validation-text'); - } else { - message = Joomla.Text._('JLIB_FORM_CONTAINS_INVALID_FIELDS'); - } - error = { - error: [message] - }; - Joomla.renderMessages(error); - } - return valid; - } - attachToForm(form) { - let elements; - if (form.nodeName === 'FORM') { - elements = [].slice.call(form.elements); - } else { - elements = [].slice.call(form.querySelectorAll('input, textarea, select, button, fieldset')); - } - - // Iterate through the form object and attach the validate method to all input fields. - elements.forEach(element => { - const tagName = element.tagName.toLowerCase(); - if (['input', 'textarea', 'select', 'fieldset'].indexOf(tagName) > -1 && element.classList.contains('required')) { - element.setAttribute('required', ''); - } - - // Attach isValid method to submit button - if ((tagName === 'input' || tagName === 'button') && (element.getAttribute('type') === 'submit' || element.getAttribute('type') === 'image')) { - if (element.classList.contains('validate')) { - element.addEventListener('click', () => this.isValid(form)); - } - } else if (tagName !== 'button' && !(tagName === 'input' && element.getAttribute('type') === 'button')) { - // Attach validate method only to fields - if (tagName !== 'fieldset') { - element.addEventListener('blur', ({ - target - }) => this.validate(target)); - element.addEventListener('focus', ({ - target - }) => this.removeMarking(target)); - if (element.classList.contains('validate-email') && this.inputEmail) { - element.setAttribute('type', 'email'); - } - } - } - }); - } -} -const initialize = () => { - document.formvalidator = new JFormValidator(); - - // Cleanup - document.removeEventListener('DOMContentLoaded', initialize); -}; -document.addEventListener('DOMContentLoaded', initialize); +(function () { + 'use strict'; + + /** Highest positive signed 32-bit float value */ + const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + + /** Bootstring parameters */ + const base = 36; + const tMin = 1; + const tMax = 26; + const skew = 38; + const damp = 700; + const initialBias = 72; + const initialN = 128; // 0x80 + const delimiter = '-'; // '\x2D' + + /** Regular expressions */ + const regexPunycode = /^xn--/; + const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. + const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + + /** Error messages */ + const errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }; + + /** Convenience shortcuts */ + const baseMinusTMin = base - tMin; + const floor = Math.floor; + const stringFromCharCode = String.fromCharCode; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw new RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, callback) { + const result = []; + let length = array.length; + while (length--) { + result[length] = callback(array[length]); + } + return result; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {String} A new string of characters returned by the callback + * function. + */ + function mapDomain(domain, callback) { + const parts = domain.split('@'); + let result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + domain = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + domain = domain.replace(regexSeparators, '\x2E'); + const labels = domain.split('.'); + const encoded = map(labels, callback).join('.'); + return result + encoded; + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + const output = []; + let counter = 0; + const length = string.length; + while (counter < length) { + const value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + const extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { + // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + const ucs2encode = codePoints => String.fromCodePoint(...codePoints); + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + const basicToDigit = function basicToDigit(codePoint) { + if (codePoint >= 0x30 && codePoint < 0x3A) { + return 26 + (codePoint - 0x30); + } + if (codePoint >= 0x41 && codePoint < 0x5B) { + return codePoint - 0x41; + } + if (codePoint >= 0x61 && codePoint < 0x7B) { + return codePoint - 0x61; + } + return base; + }; + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + const digitToBasic = function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + }; + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + const adapt = function adapt(delta, numPoints, firstTime) { + let k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for /* no initialization */ + (; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + }; + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + const decode = function decode(input) { + // Don't use UCS-2. + const output = []; + const inputLength = input.length; + let i = 0; + let n = initialN; + let bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + let basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + for (let j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for /* no final expression */ + (let index = basic > 0 ? basic + 1 : 0; index < inputLength;) { + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + const oldi = i; + for /* no condition */ + (let w = 1, k = base;; k += base) { + if (index >= inputLength) { + error('invalid-input'); + } + const digit = basicToDigit(input.charCodeAt(index++)); + if (digit >= base) { + error('invalid-input'); + } + if (digit > floor((maxInt - i) / w)) { + error('overflow'); + } + i += digit * w; + const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (digit < t) { + break; + } + const baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + w *= baseMinusT; + } + const out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + } + return String.fromCodePoint(...output); + }; + + /** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + const encode = function encode(input) { + const output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + const inputLength = input.length; + + // Initialize the state. + let n = initialN; + let delta = 0; + let bias = initialBias; + + // Handle the basic code points. + for (const currentValue of input) { + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + const basicLength = output.length; + let handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + // All non-basic code points < n have been handled already. Find the next + // larger one: + let m = maxInt; + for (const currentValue of input) { + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + const handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + delta += (m - n) * handledCPCountPlusOne; + n = m; + for (const currentValue of input) { + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + if (currentValue === n) { + // Represent delta as a generalized variable-length integer. + let q = delta; + for /* no condition */ + (let k = base;; k += base) { + const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (q < t) { + break; + } + const qMinusT = q - t; + const baseMinusT = base - t; + output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); + q = floor(qMinusT / baseMinusT); + } + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); + delta = 0; + ++handledCPCount; + } + } + ++delta; + ++n; + } + return output.join(''); + }; + + /** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + const toUnicode = function toUnicode(input) { + return mapDomain(input, function (string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); + }; + + /** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ + const toASCII = function toASCII(input) { + return mapDomain(input, function (string) { + return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; + }); + }; + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + const punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.3.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** + * @copyright (C) 2018 Open Source Matters, Inc. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + class JFormValidator { + constructor() { + this.customValidators = {}; + this.handlers = []; + this.handlers = {}; + this.removeMarking = this.removeMarking.bind(this); + this.inputEmail = () => { + const input = document.createElement('input'); + input.setAttribute('type', 'email'); + return input.type !== 'text'; + }; + + // Default handlers + this.setHandler('username', value => { + const regex = /[<|>|"|'|%|;|(|)|&]/i; + return !regex.test(value); + }); + this.setHandler('password', value => { + const regex = /^\S[\S ]{2,98}\S$/; + return regex.test(value); + }); + this.setHandler('numeric', value => { + const regex = /^(\d|-)?(\d|,)*\.?\d*$/; + return regex.test(value); + }); + this.setHandler('email', value => { + const newValue = punycode.toASCII(value); + const regex = /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; + return regex.test(newValue); + }); + + // Attach all forms with a class 'form-validate' + const forms = [].slice.call(document.querySelectorAll('form')); + forms.forEach(form => { + if (form.classList.contains('form-validate')) { + this.attachToForm(form); + } + }); + } + get custom() { + return this.customValidators; + } + set custom(value) { + this.customValidators = value; + } + setHandler(name, func, en) { + const isEnabled = en === '' ? true : en; + this.handlers[name] = { + enabled: isEnabled, + exec: func + }; + } + + // eslint-disable-next-line class-methods-use-this + markValid(element) { + // Get a label + const label = element.form.querySelector(`label[for="${element.id}"]`); + let message; + if (element.classList.contains('required') || element.getAttribute('required')) { + if (label) { + message = label.querySelector('span.form-control-feedback'); + } + } + element.classList.remove('form-control-danger'); + element.classList.remove('invalid'); + element.classList.add('form-control-success'); + element.parentNode.classList.remove('has-danger'); + element.parentNode.classList.add('has-success'); + element.setAttribute('aria-invalid', 'false'); + + // Remove message + if (message) { + message.parentNode.removeChild(message); + } + + // Restore Label + if (label) { + label.classList.remove('invalid'); + } + } + + // eslint-disable-next-line class-methods-use-this + markInvalid(element, empty) { + // Get a label + const label = element.form.querySelector(`label[for="${element.id}"]`); + element.classList.remove('form-control-success'); + element.classList.remove('valid'); + element.classList.add('form-control-danger'); + element.classList.add('invalid'); + element.parentNode.classList.remove('has-success'); + element.parentNode.classList.add('has-danger'); + element.setAttribute('aria-invalid', 'true'); + + // Display custom message + let mesgCont; + const message = element.getAttribute('data-validation-text'); + if (label) { + mesgCont = label.querySelector('span.form-control-feedback'); + } + if (!mesgCont) { + const elMsg = document.createElement('span'); + elMsg.classList.add('form-control-feedback'); + if (empty && empty === 'checkbox') { + elMsg.innerHTML = message !== null ? Joomla.sanitizeHtml(message) : Joomla.sanitizeHtml(Joomla.Text._('JLIB_FORM_FIELD_REQUIRED_CHECK')); + } else if (empty && empty === 'value') { + elMsg.innerHTML = message !== null ? Joomla.sanitizeHtml(message) : Joomla.sanitizeHtml(Joomla.Text._('JLIB_FORM_FIELD_REQUIRED_VALUE')); + } else { + elMsg.innerHTML = message !== null ? Joomla.sanitizeHtml(message) : Joomla.sanitizeHtml(Joomla.Text._('JLIB_FORM_FIELD_INVALID_VALUE')); + } + if (label) { + label.appendChild(elMsg); + } + } + + // Mark the Label as well + if (label) { + label.classList.add('invalid'); + } + } + + // eslint-disable-next-line class-methods-use-this + removeMarking(element) { + // Get the associated label + let message; + const label = element.form.querySelector(`label[for="${element.id}"]`); + if (label) { + message = label.querySelector('span.form-control-feedback'); + } + element.classList.remove('form-control-danger'); + element.classList.remove('form-control-success'); + element.classList.remove('invalid'); + element.classList.add('valid'); + element.parentNode.classList.remove('has-danger'); + element.parentNode.classList.remove('has-success'); + + // Remove message + if (message) { + if (label) { + label.removeChild(message); + } + } + + // Restore Label + if (label) { + label.classList.remove('invalid'); + } + } + handleResponse(state, element, empty) { + const tagName = element.tagName.toLowerCase(); + + // Set the element and its label (if exists) invalid state + if (tagName !== 'button' && element.value !== undefined || tagName === 'fieldset') { + if (state === false) { + this.markInvalid(element, empty); + } else { + this.markValid(element); + } + } + } + validate(element) { + let tagName; + + // Ignore the element if its currently disabled, + // because are not submitted for the http-request. + // For those case return always true. + if (element.getAttribute('disabled') === 'disabled' || element.getAttribute('display') === 'none') { + this.handleResponse(true, element); + return true; + } + // If the field is required make sure it has a value + if (element.getAttribute('required') || element.classList.contains('required')) { + tagName = element.tagName.toLowerCase(); + if (tagName === 'fieldset' && (element.classList.contains('radio') || element.classList.contains('checkboxes'))) { + // No options are checked. + if (element.querySelector('input:checked') === null) { + this.handleResponse(false, element, 'checkbox'); + return false; + } + } else if (element.getAttribute('type') === 'checkbox' && element.checked !== true || tagName === 'select' && !element.value.length) { + this.handleResponse(false, element, 'checkbox'); + return false; + } else if (!element.value || element.classList.contains('placeholder')) { + // If element has class placeholder that means it is empty. + this.handleResponse(false, element, 'value'); + return false; + } + } + + // Only validate the field if the validate class is set + const handler = element.getAttribute('class') && element.getAttribute('class').match(/validate-([a-zA-Z0-9_-]+)/) ? element.getAttribute('class').match(/validate-([a-zA-Z0-9_-]+)/)[1] : ''; + if (element.getAttribute('pattern') && element.getAttribute('pattern') !== '') { + if (element.value.length) { + const isValid = new RegExp(`^${element.getAttribute('pattern')}$`).test(element.value); + this.handleResponse(isValid, element, 'empty'); + return isValid; + } + if (element.hasAttribute('required') || element.classList.contains('required')) { + this.handleResponse(false, element, 'empty'); + return false; + } + this.handleResponse(true, element); + return true; + } + if (handler === '') { + this.handleResponse(true, element); + return true; + } + + // Check the additional validation types + if (handler && handler !== 'none' && this.handlers[handler] && element.value) { + // Execute the validation handler and return result + if (this.handlers[handler].exec(element.value, element) !== true) { + this.handleResponse(false, element, 'invalid_value'); + return false; + } + } + + // Return validation state + this.handleResponse(true, element); + return true; + } + isValid(form) { + let valid = true; + let message; + let error; + let fields; + const invalid = []; + + // Validate form fields + if (form.nodeName === 'FORM') { + fields = [].slice.call(form.elements); + } else { + fields = [].slice.call(form.querySelectorAll('input, textarea, select, button, fieldset')); + } + fields.forEach(field => { + if (this.validate(field) === false) { + valid = false; + invalid.push(field); + } + }); + + // Run custom form validators if present + if (Object.keys(this.customValidators).length) { + Object.keys(this.customValidators).foreach(key => { + if (this.customValidators[key].exec() !== true) { + valid = false; + } + }); + } + if (!valid && invalid.length > 0) { + if (form.getAttribute('data-validation-text')) { + message = form.getAttribute('data-validation-text'); + } else { + message = Joomla.Text._('JLIB_FORM_CONTAINS_INVALID_FIELDS'); + } + error = { + error: [message] + }; + Joomla.renderMessages(error); + } + return valid; + } + attachToForm(form) { + let elements; + if (form.nodeName === 'FORM') { + elements = [].slice.call(form.elements); + } else { + elements = [].slice.call(form.querySelectorAll('input, textarea, select, button, fieldset')); + } + + // Iterate through the form object and attach the validate method to all input fields. + elements.forEach(element => { + const tagName = element.tagName.toLowerCase(); + if (['input', 'textarea', 'select', 'fieldset'].indexOf(tagName) > -1 && element.classList.contains('required')) { + element.setAttribute('required', ''); + } + + // Attach isValid method to submit button + if ((tagName === 'input' || tagName === 'button') && (element.getAttribute('type') === 'submit' || element.getAttribute('type') === 'image')) { + if (element.classList.contains('validate')) { + element.addEventListener('click', () => this.isValid(form)); + } + } else if (tagName !== 'button' && !(tagName === 'input' && element.getAttribute('type') === 'button')) { + // Attach validate method only to fields + if (tagName !== 'fieldset') { + element.addEventListener('blur', ({ + target + }) => this.validate(target)); + element.addEventListener('focus', ({ + target + }) => this.removeMarking(target)); + if (element.classList.contains('validate-email') && this.inputEmail) { + element.setAttribute('type', 'email'); + } + } + } + }); + } + } + const initialize = () => { + document.formvalidator = new JFormValidator(); + + // Cleanup + document.removeEventListener('DOMContentLoaded', initialize); + }; + document.addEventListener('DOMContentLoaded', initialize); + + /** + * Expose the classes to the global scope + * These will be removed in Joomla! 6.0 + */ + window.JFormValidator = JFormValidator; + window.punycode = punycode; + +})(); diff --git a/media/system/js/fields/validate.min.js b/media/system/js/fields/validate.min.js index 61731a7b8c..623cc86714 100644 --- a/media/system/js/fields/validate.min.js +++ b/media/system/js/fields/validate.min.js @@ -1,4 +1,4 @@ -const maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\0-\x7F]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=35,floor=Math.floor,stringFromCharCode=String.fromCharCode;function error(o){throw new RangeError(errors[o])}function map(o,t){const s=[];let e=o.length;for(;e--;)s[e]=t(o[e]);return s}function mapDomain(o,t){const s=o.split("@");let e="";s.length>1&&(e=s[0]+"@",o=s[1]),o=o.replace(regexSeparators,".");const i=o.split("."),a=map(i,t).join(".");return e+a}function ucs2decode(o){const t=[];let s=0;const e=o.length;for(;s=55296&&i<=56319&&sString.fromCodePoint(...o),basicToDigit=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:36},digitToBasic=function(t,s){return t+22+75*(t<26)-((s!=0)<<5)},adapt=function(t,s,e){let i=0;for(t=e?floor(t/700):t>>1,t+=floor(t/s);t>baseMinusTMin*26>>1;i+=36)t=floor(t/baseMinusTMin);return floor(i+(baseMinusTMin+1)*t/(t+38))},decode=function(t){const s=[],e=t.length;let i=0,a=128,r=72,n=t.lastIndexOf(delimiter);n<0&&(n=0);for(let c=0;c=128&&error("not-basic"),s.push(t.charCodeAt(c));for(let c=n>0?n+1:0;c=e&&error("invalid-input");const f=basicToDigit(t.charCodeAt(c++));f>=36&&error("invalid-input"),f>floor((2147483647-i)/u)&&error("overflow"),i+=f*u;const b=d<=r?1:d>=r+26?26:d-r;if(ffloor(2147483647/g)&&error("overflow"),u*=g}const h=s.length+1;r=adapt(i-l,h,l==0),floor(i/h)>2147483647-a&&error("overflow"),a+=floor(i/h),i%=h,s.splice(i++,0,a)}return String.fromCodePoint(...s)},encode=function(t){const s=[];t=ucs2decode(t);const e=t.length;let i=128,a=0,r=72;for(const l of t)l<128&&s.push(stringFromCharCode(l));const n=s.length;let c=n;for(n&&s.push(delimiter);c=i&&ufloor((2147483647-a)/h)&&error("overflow"),a+=(l-i)*h,i=l;for(const u of t)if(u2147483647&&error("overflow"),u===i){let d=a;for(let f=36;;f+=36){const b=f<=r?1:f>=r+26?26:f-r;if(d= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=35,d=Math.floor,L=String.fromCharCode;function b(o){throw new RangeError(V[o])}function q(o,t){const s=[];let e=o.length;for(;e--;)s[e]=t(o[e]);return s}function I(o,t){const s=o.split("@");let e="";s.length>1&&(e=s[0]+"@",o=s[1]),o=o.replace(y,".");const i=o.split("."),a=q(i,t).join(".");return e+a}function m(o){const t=[];let s=0;const e=o.length;for(;s=55296&&i<=56319&&sString.fromCodePoint(...o),J=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:36},C=function(t,s){return t+22+75*(t<26)-((s!=0)<<5)},M=function(t,s,e){let i=0;for(t=e?d(t/700):t>>1,t+=d(t/s);t>x*26>>1;i+=36)t=d(t/x);return d(i+(x+1)*t/(t+38))},k=function(t){const s=[],e=t.length;let i=0,a=128,r=72,n=t.lastIndexOf(A);n<0&&(n=0);for(let c=0;c=128&&b("not-basic"),s.push(t.charCodeAt(c));for(let c=n>0?n+1:0;c=e&&b("invalid-input");const h=J(t.charCodeAt(c++));h>=36&&b("invalid-input"),h>d((2147483647-i)/u)&&b("overflow"),i+=h*u;const v=f<=r?1:f>=r+26?26:f-r;if(hd(2147483647/p)&&b("overflow"),u*=p}const g=s.length+1;r=M(i-l,g,l==0),d(i/g)>2147483647-a&&b("overflow"),a+=d(i/g),i%=g,s.splice(i++,0,a)}return String.fromCodePoint(...s)},E=function(t){const s=[];t=m(t);const e=t.length;let i=128,a=0,r=72;for(const l of t)l<128&&s.push(L(l));const n=s.length;let c=n;for(n&&s.push(A);c=i&&ud((2147483647-a)/g)&&b("overflow"),a+=(l-i)*g,i=l;for(const u of t)if(u2147483647&&b("overflow"),u===i){let f=a;for(let h=36;;h+=36){const v=h<=r?1:h>=r+26?26:h-r;if(f * @license GNU General Public License version 2 or later; see LICENSE.txt - */class JFormValidator{constructor(){this.customValidators={},this.handlers=[],this.handlers={},this.removeMarking=this.removeMarking.bind(this),this.inputEmail=()=>{const s=document.createElement("input");return s.setAttribute("type","email"),s.type!=="text"},this.setHandler("username",s=>!/[<|>|"|'|%|;|(|)|&]/i.test(s)),this.setHandler("password",s=>/^\S[\S ]{2,98}\S$/.test(s)),this.setHandler("numeric",s=>/^(\d|-)?(\d|,)*\.?\d*$/.test(s)),this.setHandler("email",s=>{const e=punycode.toASCII(s);return/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(e)}),[].slice.call(document.querySelectorAll("form")).forEach(s=>{s.classList.contains("form-validate")&&this.attachToForm(s)})}get custom(){return this.customValidators}set custom(t){this.customValidators=t}setHandler(t,s,e){const i=e===""?!0:e;this.handlers[t]={enabled:i,exec:s}}markValid(t){const s=t.form.querySelector(`label[for="${t.id}"]`);let e;(t.classList.contains("required")||t.getAttribute("required"))&&s&&(e=s.querySelector("span.form-control-feedback")),t.classList.remove("form-control-danger"),t.classList.remove("invalid"),t.classList.add("form-control-success"),t.parentNode.classList.remove("has-danger"),t.parentNode.classList.add("has-success"),t.setAttribute("aria-invalid","false"),e&&e.parentNode.removeChild(e),s&&s.classList.remove("invalid")}markInvalid(t,s){const e=t.form.querySelector(`label[for="${t.id}"]`);t.classList.remove("form-control-success"),t.classList.remove("valid"),t.classList.add("form-control-danger"),t.classList.add("invalid"),t.parentNode.classList.remove("has-success"),t.parentNode.classList.add("has-danger"),t.setAttribute("aria-invalid","true");let i;const a=t.getAttribute("data-validation-text");if(e&&(i=e.querySelector("span.form-control-feedback")),!i){const r=document.createElement("span");r.classList.add("form-control-feedback"),s&&s==="checkbox"?r.innerHTML=a!==null?Joomla.sanitizeHtml(a):Joomla.sanitizeHtml(Joomla.Text._("JLIB_FORM_FIELD_REQUIRED_CHECK")):s&&s==="value"?r.innerHTML=a!==null?Joomla.sanitizeHtml(a):Joomla.sanitizeHtml(Joomla.Text._("JLIB_FORM_FIELD_REQUIRED_VALUE")):r.innerHTML=a!==null?Joomla.sanitizeHtml(a):Joomla.sanitizeHtml(Joomla.Text._("JLIB_FORM_FIELD_INVALID_VALUE")),e&&e.appendChild(r)}e&&e.classList.add("invalid")}removeMarking(t){let s;const e=t.form.querySelector(`label[for="${t.id}"]`);e&&(s=e.querySelector("span.form-control-feedback")),t.classList.remove("form-control-danger"),t.classList.remove("form-control-success"),t.classList.remove("invalid"),t.classList.add("valid"),t.parentNode.classList.remove("has-danger"),t.parentNode.classList.remove("has-success"),s&&e&&e.removeChild(s),e&&e.classList.remove("invalid")}handleResponse(t,s,e){const i=s.tagName.toLowerCase();(i!=="button"&&s.value!==void 0||i==="fieldset")&&(t===!1?this.markInvalid(s,e):this.markValid(s))}validate(t){let s;if(t.getAttribute("disabled")==="disabled"||t.getAttribute("display")==="none")return this.handleResponse(!0,t),!0;if(t.getAttribute("required")||t.classList.contains("required"))if(s=t.tagName.toLowerCase(),s==="fieldset"&&(t.classList.contains("radio")||t.classList.contains("checkboxes"))){if(t.querySelector("input:checked")===null)return this.handleResponse(!1,t,"checkbox"),!1}else{if(t.getAttribute("type")==="checkbox"&&t.checked!==!0||s==="select"&&!t.value.length)return this.handleResponse(!1,t,"checkbox"),!1;if(!t.value||t.classList.contains("placeholder"))return this.handleResponse(!1,t,"value"),!1}const e=t.getAttribute("class")&&t.getAttribute("class").match(/validate-([a-zA-Z0-9_-]+)/)?t.getAttribute("class").match(/validate-([a-zA-Z0-9_-]+)/)[1]:"";if(t.getAttribute("pattern")&&t.getAttribute("pattern")!==""){if(t.value.length){const i=new RegExp(`^${t.getAttribute("pattern")}$`).test(t.value);return this.handleResponse(i,t,"empty"),i}return t.hasAttribute("required")||t.classList.contains("required")?(this.handleResponse(!1,t,"empty"),!1):(this.handleResponse(!0,t),!0)}return e===""?(this.handleResponse(!0,t),!0):e&&e!=="none"&&this.handlers[e]&&t.value&&this.handlers[e].exec(t.value,t)!==!0?(this.handleResponse(!1,t,"invalid_value"),!1):(this.handleResponse(!0,t),!0)}isValid(t){let s=!0,e,i,a;const r=[];return t.nodeName==="FORM"?a=[].slice.call(t.elements):a=[].slice.call(t.querySelectorAll("input, textarea, select, button, fieldset")),a.forEach(n=>{this.validate(n)===!1&&(s=!1,r.push(n))}),Object.keys(this.customValidators).length&&Object.keys(this.customValidators).foreach(n=>{this.customValidators[n].exec()!==!0&&(s=!1)}),!s&&r.length>0&&(t.getAttribute("data-validation-text")?e=t.getAttribute("data-validation-text"):e=Joomla.Text._("JLIB_FORM_CONTAINS_INVALID_FIELDS"),i={error:[e]},Joomla.renderMessages(i)),s}attachToForm(t){let s;t.nodeName==="FORM"?s=[].slice.call(t.elements):s=[].slice.call(t.querySelectorAll("input, textarea, select, button, fieldset")),s.forEach(e=>{const i=e.tagName.toLowerCase();["input","textarea","select","fieldset"].indexOf(i)>-1&&e.classList.contains("required")&&e.setAttribute("required",""),(i==="input"||i==="button")&&(e.getAttribute("type")==="submit"||e.getAttribute("type")==="image")?e.classList.contains("validate")&&e.addEventListener("click",()=>this.isValid(t)):i!=="button"&&!(i==="input"&&e.getAttribute("type")==="button")&&i!=="fieldset"&&(e.addEventListener("blur",({target:a})=>this.validate(a)),e.addEventListener("focus",({target:a})=>this.removeMarking(a)),e.classList.contains("validate-email")&&this.inputEmail&&e.setAttribute("type","email"))})}}const initialize=()=>{document.formvalidator=new JFormValidator,document.removeEventListener("DOMContentLoaded",initialize)};document.addEventListener("DOMContentLoaded",initialize); + */class F{constructor(){this.customValidators={},this.handlers=[],this.handlers={},this.removeMarking=this.removeMarking.bind(this),this.inputEmail=()=>{const s=document.createElement("input");return s.setAttribute("type","email"),s.type!=="text"},this.setHandler("username",s=>!/[<|>|"|'|%|;|(|)|&]/i.test(s)),this.setHandler("password",s=>/^\S[\S ]{2,98}\S$/.test(s)),this.setHandler("numeric",s=>/^(\d|-)?(\d|,)*\.?\d*$/.test(s)),this.setHandler("email",s=>{const e=w.toASCII(s);return/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(e)}),[].slice.call(document.querySelectorAll("form")).forEach(s=>{s.classList.contains("form-validate")&&this.attachToForm(s)})}get custom(){return this.customValidators}set custom(t){this.customValidators=t}setHandler(t,s,e){const i=e===""?!0:e;this.handlers[t]={enabled:i,exec:s}}markValid(t){const s=t.form.querySelector(`label[for="${t.id}"]`);let e;(t.classList.contains("required")||t.getAttribute("required"))&&s&&(e=s.querySelector("span.form-control-feedback")),t.classList.remove("form-control-danger"),t.classList.remove("invalid"),t.classList.add("form-control-success"),t.parentNode.classList.remove("has-danger"),t.parentNode.classList.add("has-success"),t.setAttribute("aria-invalid","false"),e&&e.parentNode.removeChild(e),s&&s.classList.remove("invalid")}markInvalid(t,s){const e=t.form.querySelector(`label[for="${t.id}"]`);t.classList.remove("form-control-success"),t.classList.remove("valid"),t.classList.add("form-control-danger"),t.classList.add("invalid"),t.parentNode.classList.remove("has-success"),t.parentNode.classList.add("has-danger"),t.setAttribute("aria-invalid","true");let i;const a=t.getAttribute("data-validation-text");if(e&&(i=e.querySelector("span.form-control-feedback")),!i){const r=document.createElement("span");r.classList.add("form-control-feedback"),s&&s==="checkbox"?r.innerHTML=a!==null?Joomla.sanitizeHtml(a):Joomla.sanitizeHtml(Joomla.Text._("JLIB_FORM_FIELD_REQUIRED_CHECK")):s&&s==="value"?r.innerHTML=a!==null?Joomla.sanitizeHtml(a):Joomla.sanitizeHtml(Joomla.Text._("JLIB_FORM_FIELD_REQUIRED_VALUE")):r.innerHTML=a!==null?Joomla.sanitizeHtml(a):Joomla.sanitizeHtml(Joomla.Text._("JLIB_FORM_FIELD_INVALID_VALUE")),e&&e.appendChild(r)}e&&e.classList.add("invalid")}removeMarking(t){let s;const e=t.form.querySelector(`label[for="${t.id}"]`);e&&(s=e.querySelector("span.form-control-feedback")),t.classList.remove("form-control-danger"),t.classList.remove("form-control-success"),t.classList.remove("invalid"),t.classList.add("valid"),t.parentNode.classList.remove("has-danger"),t.parentNode.classList.remove("has-success"),s&&e&&e.removeChild(s),e&&e.classList.remove("invalid")}handleResponse(t,s,e){const i=s.tagName.toLowerCase();(i!=="button"&&s.value!==void 0||i==="fieldset")&&(t===!1?this.markInvalid(s,e):this.markValid(s))}validate(t){let s;if(t.getAttribute("disabled")==="disabled"||t.getAttribute("display")==="none")return this.handleResponse(!0,t),!0;if(t.getAttribute("required")||t.classList.contains("required"))if(s=t.tagName.toLowerCase(),s==="fieldset"&&(t.classList.contains("radio")||t.classList.contains("checkboxes"))){if(t.querySelector("input:checked")===null)return this.handleResponse(!1,t,"checkbox"),!1}else{if(t.getAttribute("type")==="checkbox"&&t.checked!==!0||s==="select"&&!t.value.length)return this.handleResponse(!1,t,"checkbox"),!1;if(!t.value||t.classList.contains("placeholder"))return this.handleResponse(!1,t,"value"),!1}const e=t.getAttribute("class")&&t.getAttribute("class").match(/validate-([a-zA-Z0-9_-]+)/)?t.getAttribute("class").match(/validate-([a-zA-Z0-9_-]+)/)[1]:"";if(t.getAttribute("pattern")&&t.getAttribute("pattern")!==""){if(t.value.length){const i=new RegExp(`^${t.getAttribute("pattern")}$`).test(t.value);return this.handleResponse(i,t,"empty"),i}return t.hasAttribute("required")||t.classList.contains("required")?(this.handleResponse(!1,t,"empty"),!1):(this.handleResponse(!0,t),!0)}return e===""?(this.handleResponse(!0,t),!0):e&&e!=="none"&&this.handlers[e]&&t.value&&this.handlers[e].exec(t.value,t)!==!0?(this.handleResponse(!1,t,"invalid_value"),!1):(this.handleResponse(!0,t),!0)}isValid(t){let s=!0,e,i,a;const r=[];return t.nodeName==="FORM"?a=[].slice.call(t.elements):a=[].slice.call(t.querySelectorAll("input, textarea, select, button, fieldset")),a.forEach(n=>{this.validate(n)===!1&&(s=!1,r.push(n))}),Object.keys(this.customValidators).length&&Object.keys(this.customValidators).foreach(n=>{this.customValidators[n].exec()!==!0&&(s=!1)}),!s&&r.length>0&&(t.getAttribute("data-validation-text")?e=t.getAttribute("data-validation-text"):e=Joomla.Text._("JLIB_FORM_CONTAINS_INVALID_FIELDS"),i={error:[e]},Joomla.renderMessages(i)),s}attachToForm(t){let s;t.nodeName==="FORM"?s=[].slice.call(t.elements):s=[].slice.call(t.querySelectorAll("input, textarea, select, button, fieldset")),s.forEach(e=>{const i=e.tagName.toLowerCase();["input","textarea","select","fieldset"].indexOf(i)>-1&&e.classList.contains("required")&&e.setAttribute("required",""),(i==="input"||i==="button")&&(e.getAttribute("type")==="submit"||e.getAttribute("type")==="image")?e.classList.contains("validate")&&e.addEventListener("click",()=>this.isValid(t)):i!=="button"&&!(i==="input"&&e.getAttribute("type")==="button")&&i!=="fieldset"&&(e.addEventListener("blur",({target:a})=>this.validate(a)),e.addEventListener("focus",({target:a})=>this.removeMarking(a)),e.classList.contains("validate-email")&&this.inputEmail&&e.setAttribute("type","email"))})}}const S=()=>{document.formvalidator=new F,document.removeEventListener("DOMContentLoaded",S)};document.addEventListener("DOMContentLoaded",S),window.JFormValidator=F,window.punycode=w})(); diff --git a/media/system/js/fields/validate.min.js.gz b/media/system/js/fields/validate.min.js.gz index 9995fa0356c75c81d6e54747aa1eb40fb664382f..79b504765e86a80d92593af575e138ddd5ecabeb 100644 GIT binary patch literal 3112 zcmV+@4A=7?iwFP!000021HD<>dK)*AzRy!Mdy`&3jcy)f(K1Pp(I`|RuO!b{jxUCy zWvCk@5j6n@K zA4g&gvx@L{AdrU3+|siZFQCl{(uGUuOmXl^sfe8APhqR(OX)68$F9 zJ~j&qc6I-5r`7KFn_cGP-8R&AaIi!V$%~^n0NI zBDmSwM-snoA#Qew(#Jfeckd?P0Cst=;dy}L2DF-*LyRhjY--1v(hE>QzQh$c7&i~1$Z z*0v}4mVpyNQxsv0Ikdj={V4N&f_$Hq$WTRvabbpT@$!aB#RTuTt#CJNx+slQtFw%$ zDd(LzqTGJ?kfCDfx?CC}Ee_5PkB>WB67ez6s9Ij-()XdJN&^K4uIXo7e+U%ps0?OE zi(fgjjK7}US;g)es8HEJcm+c(PQ)#hheS~TbM{%czO(b4v*Y|2iN(ES)0uW0a0s1N zqq* z`_=iGawY8#!YEZ*%s-mEMzoL$FEeB}W`xHHm9_+IE|e6K&czKqCGwi_DSo;XUNIg6 zvkvnEHg68+ge4e2+^@1jETVKyxeg;qiKfGZnr|lG=IOZtm!kSWYss!sO@XWL7t}>A zH4JUZFbg$|T}|&y8)#)Js(;B92c`vHvzu5!xYCdV6fq37A#60J!z`yh^loC5_jm`zPOx8MY;c4-@8 zGqs}B&!JjpYxXSKsj_vY7-QER)EXVy-9Y+CkMWXna+T1y!w|irQAcIjoXBg-dcDGF zbM^VAWx(fzT+w7S5fZ!KFLlV`%pHF&8vL$lHntc@(%(}iY3#y>2OUl~Aivs!o~QDm z;E_yMEeN;D1cs*+Nid-_z9P}JYp}H@GmqB7B_(leh9Bu}rz|?4N4q4BA2CsBWCuM% zw;+;oeI{bMh2e~-b%|SPEqg<_&UG^t5XneTDu>(&NfdPUg-Dq$ z;e|_DPZz^w-nOs0mv8X)7frr?ucxG6XYs9Wvt;W&`=T$t=(x%mYXV>Ng_bETW?I%Q z=f20dj)^8^Qec7yHiO#{l6oFsn0_0`YpisYe73k44yLxeXw?-{3l@_oq8W{@uf&}@ zkRjuo%3nU5o?ueLn5RiHc$?R8ML5&!5BiIqCxF1tw&h~&1HIGXC2-%K9RKC==-vC% z%cJAr$xoN>hkyI^`2Fyw%fnxWhyUf8W}{Hyh9oKd_sRcwaPsTW$p04$JU;t)aB{qo zmxnJ|EGUojn3XWIYtJD(+vq<`dbUp(-9Ht!26^gRk@tT~uiuarUdY7X5bj?}z1vfR z@;vK?^>nHVcfFKO^Sb(;s)gW+J}$#5)MR=_=5({i?gD0dx~o)c!CjNFE&OX3-v|~v zjfV$jVq(H*5-X}rM*%d(xYiulV!ockjl52^n%8gzVOF*yE5xt~c#@--vYmhnjlAmH z(;^)+wMfW)PR9kOE?nim@pJ#7-%~f97yrz|6d*kgJ z;hgAb2I?hl1F&l1FHIL;hl4+VbkrPoTz4BD7j}N-+cc}TOt88IHZ}}j1-gA=r_U0<1%AgI$!8}^XOK+_=Yp0{$xZA!1GQl1=X77?fHeU zt{%;bDdT10j>)05GHn#IQ8kXxv9Y@~#nY|Oj3=d~kcKuGUb;e&moHa%{Nh!Zs^*^j zw}Dy%QN$4GmfhB9T=^*EBBmx4nTwk;?+ysw94K{2^L9+Z&eOf8Q>INW$T8g^k(3}O zk8BYaY_T{9`N!r^8D^;n&o0#EY%gKp|QnmHy=HQT@ zf5|#Q@#={@<&hxGfhjL5h-N*^vaPspGWn+D=cL_Q#Qx z1R@~`4F#wGXgig8o^u;}dwV7O0Q`_-%TChWbN<*CFqj$4yz>P)7F=m(L2ggE#_iU# z!)HhPoo9z=LKMaO9i-10$1SAK$t`Yokorh(@ct1>$YO~PqX;q1G$ZK`j3|8Au0CGi zR{IDgG-V5>sl;yJB1vcT_Lq!*ibXrFd>S?Zr43cQ#vDQd3J!E==Lab02kUJjwN!; zHJqhjTtgSRj9-(KC4oI)7!;oi25xTcdCqvI-Wr4MAE0R}gv94W&qMnsQd%-TdnLu< zcuwT8G18@73a1-uy=lf{%>;Msm4SdOJ(uFf;q=CNL->rI*!997BQb_~ePThDKp+iQ zv30t_qj4{#+M!s4DdjUg?@fgSJsJc(s77>*H4q~@hCNAjCb^@wc)b)0!uU2v5vpa% zG;qInVaeNdd#YqVXn7u>SdF5w?|$zhfz_xrhDcx$O1ex*Ou;>`BR6zmuVByC>_ZnK zg3W~((lGp8Fm4wsO{q`Tx@NIzC)D`Mn5*EWtII1KmF(}ELG@{`A~&Mr(giOxP`(d) zYzo)_9~`uwcRY{v@j++5_1yDRpH`>Hj#Gemoo5HFHpJ#YI~wY6nW;GdfO)N`y$}2S zRs?-Oicfy$;9$Q4yPzav5UC)5IZYLH>b1PQw$2N|=EjuUKofYd2_uovUkqkJ7={8O z3+1=sC7UsgD}wl0O~cOhav zp6+F(IiSdgMQN->TgD#6p7!@^nS1$|ky)0_OWDLZpuH z$6{H*9F-Bj8;U)RH}ar{b<(>BPy1!1@a78y3vGeh|db~*#I-o%lfJ3ffQ$zs5y@PRxb_M4$u(ToWn<~4$^?Z zy*XkyeJG1fLDpxU=lf*CgF9h?F=mDO2_|*eOl`jI&V+j}#|f{8!-?ixi9LX?z{nl-Os{)NYr;%J3tg61g37;|U=;rns!`vmzutH7wr z!t25uY4Iy(5AatKuDb<|>g{zI*lGiR`20aZ#_R(im*TQWiUBgk1b)vbE{Z3S`SH)l2U0)Q77RB9|J5wtSj}2F9+Yx2BJ`G8NT7 z6^a8lQ&e)Ype|B)&}feOcY{0k?mzFoyX)P7J9y`fo2&vCe0Y3Gl)4czvB#V5t}aJc zm(F$Uh2Y**IJ`>so;+S$(Hve?rC?cyV1Z4b zDmyjbjY#n4i{S53@H}k%$G6{k|MSoP-t(Jy`0o9O)m{FNVC;XtCJDwq7{N17*2&eA@Lj-ja6u|c*c|tW5G3H zToshTbpbo-LeI08CR&qt{#F>+0tIuJ&rChC7zOKAbQf@QwWidMfm`PrW-Z&)YHFYu zW7i!vqAu-i0e+;%cttsxq%`R=L~m)_Re8Q3@}p(FS-iEm`eNHM;6q9#G#yQa#O}8% z9kL{M#~;d}t7jUn9R`y0kBmv0xbW^yhqEo@ulJzmsbWyOC(~6+!mToa;VDHLOesw! zB>w0ch;7I$g0^%?MVy%VRJyw<%MS3~E=iJmOjH)zf!)w8iKJX#7|1?kI45dT;!ax2 z-Vknb-OdO^G7?nEA$LkrMO}zY1H8$zka|34X#yxj%CtF8T+({Fd?YAFqIEy^72f`= z$v5xyko3zezSC`%Y}03-^~Gl$S36@v;FG@4GNa`?1M5{I_kCO^M3X8hFu?YAwqi%AsmoW>s~;?^C?ka14sPjAo9Flk`Svosz4 zT-0_&%p=>M^e4SY0fF6J%jMczdaJ|t!2S8`^oRGaUcWhi|LXMQ?B)A6Cx83(^v%i3 z_s2h-9RHVVdZ|){Ym#R4-zWdK7iYho82SHVfu|S0y*N8v%PYc{ESHogMa)W=+qK6K zo^Q1wCOzBNquyT%TZ26HwaELwrPr^>3QuI>uL$?grQY4CL3y5a!)7{FrMsR=r$t?T zL)B7nMemnk6>2iOAPc%ZLi7MLt=%NkT5#87YzzMe#@B)+PIPz2OiWA}O%p}6=_r84 z7&lr&Tg*3exRKYbSBo01Ak3?FWQ`a$1rKr*Q??Uup^;aAdRU|rrj{xBRM2t3sS7vz zmwQ%dL`Xx_h<1tGZUvrh7R)Sc+K`<_L~6@M#zec>k%WoIrB%6)Di=byvKrqD58JwT zEn#UYlO>)sKnrQKPOA_#TK461wZkB`^M_k$*z?T0l@-^(xDnmm*}E#Mk?VO4T>z$h z=lDuZj8`fSk6FdOiO)rvm`M6O{~~+aYp(Os_BE{(+Z*rR2p2@hbI`1C8-R5a|K4=* zO*s7PM@Ox3*L8Q{acO5-zDu)u%LJ=iVq?qjb)egCLFnw{b_qVbGa2_0PWiVVU@?o7 zoa%vamvNb~EnO`2C-c}?KemT+qW)q;4Z-71tOPY$=Gp&=u&y5k%PHe&;;zY|jVf)F zvr#>c(6O<*HO0fN(2OUQrI3a;7@oR9nU~+M@%Y)RFjdbz#n&>82vNik=~dmnZ>dsfSUH z2gO)e=Xnlog|HRA(L%C#d*jf|yssy}(^!We=_dtt4wJA%wC8;R=~PI%rNe!a5iea= zc&t>(DAG`#C#!GeBAc_nq-!41FKn;76hGRL9lySK`{MNCvTn+3i*{*33$N_!YIj7( zIVu@Q$`dNjsZwM{6<`n|m2b`Tb!FX!3-tsp)c-dwRE-N-KdYDtV|Vv4Dj%beTXA<$ zRb0@zqK-pWem}(EAZTrOLc5ZSp-{VvJ#t-$fbD7u*=37Uwm_!Ap^w%@l}#4R9C@6C zEy#=-oa|I_^J#{fhVtZ^a&3srv!tmbEdJ;s^Nv@%?bSH}cDFmV#^xOiv&R%#U(7Pt zY*Th=FiA7%BCyg#&ZzE^yi%nOZ(@dr9Ve$E&eYDM+k-=K{weDO<>OncIma=HDSi)zY3?R&R;`TG1=aBbEENerOYl3?De V4?ncelP7!M{4dN;n23lX000^sQn~;D diff --git a/media/system/js/multiselect.js b/media/system/js/multiselect.js index 0a754065ea..b7dfebffa9 100644 --- a/media/system/js/multiselect.js +++ b/media/system/js/multiselect.js @@ -48,8 +48,8 @@ class JMultiSelect { target, shiftKey }) { - // Do not interfere with links, buttons, inputs - if (target.tagName && (target.tagName === 'A' || target.tagName === 'BUTTON' || target.tagName === 'SELECT' || target.tagName === 'TEXTAREA' || target.tagName === 'INPUT' && !target.matches(this.boxSelector))) { + // Do not interfere with links, buttons, inputs and other interactive elements + if (target.closest('a, button, input, select, textarea, details, dialog, audio, video')) { return; } diff --git a/media/system/js/multiselect.min.js b/media/system/js/multiselect.min.js index c81609901c..1425791439 100644 --- a/media/system/js/multiselect.min.js +++ b/media/system/js/multiselect.min.js @@ -1,4 +1,4 @@ /** * @copyright (C) 2018 Open Source Matters, Inc. * @license GNU General Public License version 2 or later; see LICENSE.txt - */class JMultiSelect{constructor(e){this.tableEl=e,this.formEl=e.closest("form"),this.rowSelector='tr[class^="row"]',this.boxSelector='input[type="checkbox"][name="cid[]"]',this.checkallToggle=this.tableEl.querySelector('[name="checkall-toggle"]'),this.prevRow=null,this.tableEl.addEventListener("click",c=>{c.target.closest(this.rowSelector)&&this.onRowClick(c)}),this.checkallToggle&&this.checkallToggle.addEventListener("click",({target:c})=>{const t=c.checked;this.getRows().forEach(o=>{this.changeBg(o,t)})})}getRows(){return Array.from(this.tableEl.querySelectorAll(this.rowSelector))}changeBg(e,c){e.classList.toggle("row-selected",c)}onRowClick({target:e,shiftKey:c}){if(e.tagName&&(e.tagName==="A"||e.tagName==="BUTTON"||e.tagName==="SELECT"||e.tagName==="TEXTAREA"||e.tagName==="INPUT"&&!e.matches(this.boxSelector)))return;const t=e.closest(this.rowSelector),o=e.matches(this.boxSelector)?e:t.querySelector(this.boxSelector);if(!o)return;const s=o!==e?!o.checked:o.checked;if(s!==o.checked&&(o.checked=s,Joomla.isChecked(s,this.formEl)),this.changeBg(t,s),c&&this.prevRow){document.getSelection().removeAllRanges();const r=this.getRows(),l=r.indexOf(this.prevRow),i=r.indexOf(t);l>=0&&i>=0&&Math.abs(l-i)>1&&(l{if(n===t)return;const a=n.querySelector(this.boxSelector);a&&a.checked!==s&&(a.checked=s,this.changeBg(n,s),Joomla.isChecked(s,this.formEl))})}this.prevRow=t}}const onBoot=h=>{let e="#adminForm";const c=window.Joomla?Joomla.getOptions("js-multiselect",{}).formName:"";if(c){const t=c[0];e=t!=="."&&t!=="#"?`#${c}`:c}h.querySelectorAll(e).forEach(t=>{t&&!("multiselect"in t.dataset)&&(t.dataset.multiselect="",new JMultiSelect(t))})};onBoot(document),document.addEventListener("joomla:updated",({target:h})=>onBoot(h)); + */class JMultiSelect{constructor(t){this.tableEl=t,this.formEl=t.closest("form"),this.rowSelector='tr[class^="row"]',this.boxSelector='input[type="checkbox"][name="cid[]"]',this.checkallToggle=this.tableEl.querySelector('[name="checkall-toggle"]'),this.prevRow=null,this.tableEl.addEventListener("click",c=>{c.target.closest(this.rowSelector)&&this.onRowClick(c)}),this.checkallToggle&&this.checkallToggle.addEventListener("click",({target:c})=>{const e=c.checked;this.getRows().forEach(o=>{this.changeBg(o,e)})})}getRows(){return Array.from(this.tableEl.querySelectorAll(this.rowSelector))}changeBg(t,c){t.classList.toggle("row-selected",c)}onRowClick({target:t,shiftKey:c}){if(t.closest("a, button, input, select, textarea, details, dialog, audio, video"))return;const e=t.closest(this.rowSelector),o=t.matches(this.boxSelector)?t:e.querySelector(this.boxSelector);if(!o)return;const s=o!==t?!o.checked:o.checked;if(s!==o.checked&&(o.checked=s,Joomla.isChecked(s,this.formEl)),this.changeBg(e,s),c&&this.prevRow){document.getSelection().removeAllRanges();const h=this.getRows(),l=h.indexOf(this.prevRow),i=h.indexOf(e);l>=0&&i>=0&&Math.abs(l-i)>1&&(l{if(n===e)return;const a=n.querySelector(this.boxSelector);a&&a.checked!==s&&(a.checked=s,this.changeBg(n,s),Joomla.isChecked(s,this.formEl))})}this.prevRow=e}}const onBoot=r=>{let t="#adminForm";const c=window.Joomla?Joomla.getOptions("js-multiselect",{}).formName:"";if(c){const e=c[0];t=e!=="."&&e!=="#"?`#${c}`:c}r.querySelectorAll(t).forEach(e=>{e&&!("multiselect"in e.dataset)&&(e.dataset.multiselect="",new JMultiSelect(e))})};onBoot(document),document.addEventListener("joomla:updated",({target:r})=>onBoot(r)); diff --git a/media/system/js/multiselect.min.js.gz b/media/system/js/multiselect.min.js.gz index a7372a31f12a4fa95a2a52e889c9d992cd64c62a..c45e320228fb2903deb4269eeb21c820118c69b0 100644 GIT binary patch literal 915 zcmV;E18n>siwFP!000021BF#>Puw^V{?4!PhEuSq3D8f~ZoM2uT-6>g72JJ7oa%LE zH*Ot!&z=xal>dHml3jM8y(Us*kLUH7$CJbT{T;GTephb!8C^JQgF-+}>!jdC`i zuM|2@ku_N8kfEFzI5z@$x1Bp*#$Be23lNYdQIfF!)VsQO<-FKKf7iwMMJCo#oZ%A|L;o-*B!dAxcEk`oX&mX|zg$@|erHL|HeNVU&(?(?|{Q{nAe_1n2 z(@x~kJZ<{WW7V>lNo*7Wp?U|9PdaZ4z#CTw%3_<&r7EZs z(`E=H?E*e5sN=xe_^y>34_J9iPQ8~;+1$I5{v6y>V_uid+O>P+iZu}-8A7Zg>#?Vi z0tcZpfIQ)fwHqLJ;y)cDc0HOIo;rynokC;QOCWawjk=C8`1feaTyPf@63=x>q_AJ*OkL9Wn?v z5&};~Zq>N)dKLAl$!VYq{u>?Xw-21=9rCFTg}azWA;p8E2fbNRtN#xXi8y!*#w!Uas}c@ zh>)gKZh*RtnT?qJ3g?!!TSElewok{|56+?RV%iu$f+E?Kd8zFmaX=0!D^Y8kyE^Nm zoD9JhfY-~|ia?WZ;h>B&xo3C6o3_KEypko1lO)navF8bJcXU5N0V5%jEJ@RDv74NH z-Tkdm?boqt{SPkiGrAzA4W#LaCYwREC6MJ3WdLMpO4plgLrWwHw@`2WLMU_qO?oWo pif)XriT8TM^}o4swajHV8`k5%$5}Uc@{CP({sWG#w5?SK000tP!2HPPVXC^}e%QlfB`})3o?(xa~?(P=ZC4VS4fAV@-AR&aEaPt1(@ON@K z2TQKq!Yd%>5)phz$*ENt`A{IvLw|pNxm;%7otqh%IX@lNxr|m|1CaRnd~riQg9R@Q z`MS6_T9LE%_yK&-&XV`Ud154jACLe*&Q4E87uTZ{+D1UZ?{gr>WxA8c3_lK^h7@!9U?C-m}yb1{uofg`7c>Jgi?26hnj}5QW)f8afxV(S3UzhVLi85G6>fb0*-oaHT{0KivFP|L}y46)~!WIzciAf!%1UeVf|V2j;if6 zF%3LbEmzxD!^_;M#SAP)zBQd{XBp2t%-jPU8*>%I1LJMOUTm^6HNt1w=J0qqVH>Ga zy?(+6W+)DlMAyIP5{pdU2WIv(A08$NGavMk&q9<%W>Wp`koQ+xotk%t{P`VNF^qJw zLI~VMQwsabA;=_=D-e4^gd|~d4b)A{Y{cwWI9I&dP$I0VrX6QLI)|bV!_oi}5OiDS zGi^Ubm2F#AVySKJmRVEfs4X@Hyqw2T1V+Dyy;&6Y=Ec#ptZFP~k?DO(BTW>4mXX_o zy8#I72|+WOB=usO9(~*XtyI;wzN(7XDge*uVpN$V=`p%qR9k{sE>Q+Ro+PZ>WNTi6 z($vCo<9~=@4bY&$g01Mr(~fwrb+Y-d>@ViItOcgilp+ddo2lS@u=OttwmGw!2LJ$e C*2eSz diff --git a/media/system/js/showon.js b/media/system/js/showon.js index 1e8bfaedc8..043b1998bf 100644 --- a/media/system/js/showon.js +++ b/media/system/js/showon.js @@ -144,7 +144,7 @@ class Showon { itemval = Array.from(originField.querySelectorAll('option:checked')).map(el => el.value); } else { // Select lists, text-area etc. Note that multiple-select list returns - // an Array here s0 we can always treat 'itemval' as an array + // an Array here so we can always treat 'itemval' as an array itemval = document.getElementById(originId).value; // A multi-select