Skip to content

Commit

Permalink
SORT_REGULAR for dates #1910
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Apr 19, 2018
1 parent 3091a14 commit 692aff3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
1. [](#bugfix)
* Fixed an issue with `custom_base_url` always causing 404 errors
* Improve support for regex redirects with query and params [#1983](https://github.com/getgrav/grav/issues/1983)
* Changed collection-based date sorting to `SORT_REGULAR` for better server compatibility [#1910](https://github.com/getgrav/grav/issues/1910)

# v1.4.3
## 04/12/2018
Expand Down
8 changes: 4 additions & 4 deletions system/src/Grav/Common/Page/Pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -1202,19 +1202,19 @@ protected function buildSort($path, array $pages, $order_by = 'default', $manual
break;
case 'date':
$list[$key] = $child->date();
$sort_flags = SORT_NUMERIC;
$sort_flags = SORT_REGULAR;
break;
case 'modified':
$list[$key] = $child->modified();
$sort_flags = SORT_NUMERIC;
$sort_flags = SORT_REGULAR;
break;
case 'publish_date':
$list[$key] = $child->publishDate();
$sort_flags = SORT_NUMERIC;
$sort_flags = SORT_REGULAR;
break;
case 'unpublish_date':
$list[$key] = $child->unpublishDate();
$sort_flags = SORT_NUMERIC;
$sort_flags = SORT_REGULAR;
break;
case 'slug':
$list[$key] = $child->slug();
Expand Down

0 comments on commit 692aff3

Please sign in to comment.