From 13b167e23a92063cbe74fb54f42f3cffe51414c7 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Tue, 25 Jul 2017 14:43:21 +0200 Subject: [PATCH 1/3] Pico::loadConfig(): Improve Twig config parsing Thanks @refeaime for reporting this --- lib/Pico.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/Pico.php b/lib/Pico.php index a387b66..de2802d 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -465,7 +465,7 @@ class Pico 'rewrite_url' => null, 'theme' => 'default', 'date_format' => '%D %T', - 'twig_config' => array('cache' => false, 'autoescape' => false, 'debug' => false), + 'twig_config' => null, 'pages_order_by' => 'alpha', 'pages_order' => 'asc', 'content_dir' => null, @@ -486,6 +486,13 @@ class Pico $this->config['rewrite_url'] = $this->isUrlRewritingEnabled(); } + $defaultTwigConfig = array('cache' => false, 'autoescape' => false, 'debug' => false); + if (!is_array($this->config['twig_config'])) { + $this->config['twig_config'] = $defaultTwigConfig; + } else { + $this->config['twig_config'] += $defaultTwigConfig; + } + if (empty($this->config['content_dir'])) { // try to guess the content directory if (is_dir($this->getRootDir() . 'content')) { From be0828bf2a97be5c9b47b3f3bc0a8ad9847fc5c8 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Tue, 25 Jul 2017 15:01:01 +0200 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 732b9a7..a66c202 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,17 @@ Pico Changelog ============== +### Version 1.0.6 +Released: 2017-07-25 + +``` +* [Changed] Improve documentation +* [Changed] Improve handling of Pico's Twig config (`$config['twig_config']`) +* [Changed] Improve PHP platform requirement checks +``` + ### Version 1.0.5 -Released: - +Released: 2017-05-02 ``` * [Changed] Improve documentation