mirror of
https://github.com/getgrav/grav.git
synced 2026-02-28 09:31:32 +01:00
Fixed Page ordering to be natural and case insensitive
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
* Fixed `|safe_email` filter to return safe and escaped UTF-8 HTML [#3072](https://github.com/getgrav/grav/issues/3072)
|
||||
* Fixed exception in CLI GPM and backup commands when `php-zip` is not enabled [#3075](https://github.com/getgrav/grav/issues/3075)
|
||||
* Fix for XSS advisory [GHSA-cvmr-6428-87w9](https://github.com/getgrav/grav/security/advisories/GHSA-cvmr-6428-87w9)
|
||||
* Fixed Flex ordering to be natural and case insensitive [flex-objects#87](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/87)
|
||||
* Fixed Flex and Page ordering to be natural and case insensitive [flex-objects#87](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/87)
|
||||
|
||||
# v1.7.0-rc.17
|
||||
## 10/07/2020
|
||||
|
||||
@@ -391,7 +391,7 @@ class PageCollection extends FlexPageCollection implements PageCollectionInterfa
|
||||
$list = $new_list;
|
||||
|
||||
// Apply manual ordering to the list.
|
||||
asort($list);
|
||||
asort($list, SORT_NUMERIC);
|
||||
}
|
||||
|
||||
if ($order_dir !== 'asc') {
|
||||
|
||||
@@ -563,8 +563,8 @@ class PageStorage extends FolderStorage
|
||||
$rawRoute = trim(preg_replace(PageIndex::PAGE_ROUTE_REGEX, '/', "/{$key}") ?? '', '/');
|
||||
$route = PageIndex::normalizeRoute($rawRoute);
|
||||
|
||||
ksort($markdown, SORT_NATURAL);
|
||||
ksort($children, SORT_NATURAL);
|
||||
ksort($markdown, SORT_NATURAL | SORT_FLAG_CASE);
|
||||
ksort($children, SORT_NATURAL | SORT_FLAG_CASE);
|
||||
|
||||
$file = array_key_first($markdown[''] ?? (reset($markdown) ?: []));
|
||||
|
||||
@@ -628,7 +628,7 @@ class PageStorage extends FolderStorage
|
||||
$list[$storage_key] = $meta;
|
||||
} while ($queue);
|
||||
|
||||
ksort($list, SORT_NATURAL);
|
||||
ksort($list, SORT_NATURAL | SORT_FLAG_CASE);
|
||||
|
||||
// Update parent timestamps.
|
||||
foreach (array_reverse($list) as $storage_key => $meta) {
|
||||
|
||||
@@ -1983,7 +1983,7 @@ class Pages
|
||||
$list = $new_list;
|
||||
|
||||
// Apply manual ordering to the list.
|
||||
asort($list);
|
||||
asort($list, SORT_NUMERIC);
|
||||
}
|
||||
|
||||
foreach ($list as $key => $sort) {
|
||||
|
||||
Reference in New Issue
Block a user