Skip to content

Commit

Permalink
Implode an array returned by sort order #1264
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jan 20, 2017
1 parent 5ecf240 commit 300f65c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
# v1.1.15
## xx/xx/2017

1. [](#new)
* Added a new `Collection::merge()` method to allow merging of multiple collections [#1258](https://github.com/getgrav/grav/pull/1258)
1. [](#bugfix)
* Fixed an issue when page collection with header-based `sort.by` returns an array [#1264](https://github.com/getgrav/grav/issues/1264)

# v1.1.14
## 01/18/2017

1. [](#bugfix)
* Fixed `page.collection()` returning array and not Collection object when header variable did not exist
* Fixed `Page::collection()` returning array and not Collection object when header variable did not exist
* Revert `Content-Encoding: identity` fix, and let you set `cache: allow_webserver_gzip:` option to switch to `identity` [#548](https://github.com/getgrav/grav/issues/548)

# v1.1.13
Expand Down
4 changes: 3 additions & 1 deletion system/src/Grav/Common/Page/Pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,9 @@ protected function buildSort($path, array $pages, $order_by = 'default', $manual
case (is_string($header_query[0])):
$child_header = new Header((array)$child->header());
$header_value = $child_header->get($header_query[0]);
if ($header_value) {
if (is_array($header_value)) {
$list[$key] = implode(',',$header_value);
} elseif ($header_value) {
$list[$key] = $header_value;
} else {
$list[$key] = $header_default ?: $key;
Expand Down

0 comments on commit 300f65c

Please sign in to comment.