From ab82bd66a05abe3ce826dfb1417a34655acb72f4 Mon Sep 17 00:00:00 2001 From: Stijn-Flipper Date: Thu, 21 Aug 2014 17:14:59 +0200 Subject: [PATCH] [BUGFIX] Make sorting actually works --- Changelog.md | 1 + lib/Phile/Repository/Page.php | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index 5ea3786f..7db52574 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,6 +3,7 @@ ## Release v1.2.1 - [x] [XXXXXXX](https://github.com/PhileCMS/Phile/commit/) by Frank Nägler - refactoring of bootstrapping and adding travis ci +- [ ] [XXXXXXX](https://github.com/PhileCMS/Phile/commit/) by Stijn-Flipper - [BUGFIX] Make sorting *actually* works after release v1.2.0 ## Release v1.2.0 diff --git a/lib/Phile/Repository/Page.php b/lib/Phile/Repository/Page.php index b3ff8fe4..5175c3dc 100644 --- a/lib/Phile/Repository/Page.php +++ b/lib/Phile/Repository/Page.php @@ -37,9 +37,8 @@ class Page { * the constructor */ public function __construct($settings = null) { - if ($settings === null) { - $this->settings = \Phile\Registry::get('Phile_Settings'); - } + $this->settings = ($settings === null) ? \Phile\Registry::get('Phile_Settings') : $settings; + if (ServiceLocator::hasService('Phile_Cache')) { $this->cache = ServiceLocator::getService('Phile_Cache'); }