diff --git a/CHANGELOG.md b/CHANGELOG.md index f45b46335..efea1c932 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ * Fixed typo in `modular.yaml` causing media to be ignored [#1725](https://github.com/getgrav/grav/issues/1725) * Reverted `case_insensitive_urls` option as it was causing issues with taxonomy [#1733](https://github.com/getgrav/grav/pull/1733) * Removed an extra `/` in `CompileFile.php` [#1693](https://github.com/getgrav/grav/pull/1693) - * Uri: Encode user and password to prevent issues in browsers + * Uri::Encode user and password to prevent issues in browsers * Fixed "Invalid AJAX response" When using Built-in PHP Webserver in Windows [#1258](https://github.com/getgrav/grav-plugin-admin/issues/1258) * Remove support for `config.user`, it was broken and bad practise * Make sure that `clean cache` uses valid path [#1745](https://github.com/getgrav/grav/pull/1745) diff --git a/system/blueprints/config/system.yaml b/system/blueprints/config/system.yaml index ed1025dc5..d5e5cccf6 100644 --- a/system/blueprints/config/system.yaml +++ b/system/blueprints/config/system.yaml @@ -1131,6 +1131,16 @@ form: label: PLUGIN_ADMIN.PWD_REGEX help: PLUGIN_ADMIN.PWD_REGEX_HELP + intl_enabled: + type: toggle + label: PLUGIN_ADMIN.INTL_ENABLED + highlight: 1 + help: PLUGIN_ADMIN.INTL_ENABLED_HELP + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool wrapped_site: type: toggle diff --git a/system/config/system.yaml b/system/config/system.yaml index 952555c13..72c6bc2ff 100644 --- a/system/config/system.yaml +++ b/system/config/system.yaml @@ -9,6 +9,7 @@ force_lowercase_urls: true # If you want to support mixed custom_base_url: '' # Set the base_url manually, e.g. http://yoursite.com/yourpath username_regex: '^[a-z0-9_-]{3,16}$' # Only lowercase chars, digits, dashes, underscores. 3 - 16 chars pwd_regex: '(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}' # At least one number, one uppercase and lowercase letter, and be at least 8+ chars +intl_enabled: true # Special logic for PHP International Extension (mod_intl) languages: supported: [] # List of languages supported. eg: [en, fr, de] diff --git a/system/src/Grav/Common/Page/Pages.php b/system/src/Grav/Common/Page/Pages.php index 83148b637..10911efff 100644 --- a/system/src/Grav/Common/Page/Pages.php +++ b/system/src/Grav/Common/Page/Pages.php @@ -1255,7 +1255,7 @@ class Pages $list = $this->arrayShuffle($list); } else { // else just sort the list according to specified key - if (extension_loaded('intl')) { + if (extension_loaded('intl') && $this->grav['config']->get('system.intl_enabled')) { $locale = setlocale(LC_COLLATE, 0); //`setlocale` with a 0 param returns the current locale set $col = Collator::create($locale); if ($col) {