mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fixed wrong ordering in page collections if intl extension has been enabled [#3167]
This commit is contained in:
parent
72b1a18744
commit
76e887e3fb
|
|
@ -12,6 +12,7 @@
|
|||
* Fixed saving page in expert mode [#3174](https://github.com/getgrav/grav/issues/3174)
|
||||
* Fixed exception in `$flexPage->frontmatter()` method when setting value
|
||||
* Fixed `onBlueprintCreated` event being called multiple times in `Flex Pages` [grav-plugin-flex-objects#97](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/97)
|
||||
* Fixed wrong ordering in page collections if `intl` extension has been enabled [#3167](https://github.com/getgrav/grav/issues/3167)
|
||||
|
||||
# v1.7.3
|
||||
## 01/21/2021
|
||||
|
|
|
|||
|
|
@ -362,6 +362,7 @@ class PageCollection extends FlexPageCollection implements PageCollectionInterfa
|
|||
$locale = setlocale(LC_COLLATE, '0'); //`setlocale` with a '0' param returns the current locale set
|
||||
$col = Collator::create($locale);
|
||||
if ($col) {
|
||||
$col->setAttribute(Collator::NUMERIC_COLLATION, Collator::ON);
|
||||
if (($sort_flags & SORT_NATURAL) === SORT_NATURAL) {
|
||||
$list = preg_replace_callback('~([0-9]+)\.~', static function ($number) {
|
||||
return sprintf('%032d.', $number[0]);
|
||||
|
|
|
|||
|
|
@ -1955,6 +1955,7 @@ class Pages
|
|||
$locale = setlocale(LC_COLLATE, '0'); //`setlocale` with a '0' param returns the current locale set
|
||||
$col = Collator::create($locale);
|
||||
if ($col) {
|
||||
$col->setAttribute(Collator::NUMERIC_COLLATION, Collator::ON);
|
||||
if (($sort_flags & SORT_NATURAL) === SORT_NATURAL) {
|
||||
$list = preg_replace_callback('~([0-9]+)\.~', static function ($number) {
|
||||
return sprintf('%032d.', $number[0]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user