From f3b4efb66155e8df3a2ca8b5b36b240436e7c094 Mon Sep 17 00:00:00 2001 From: Gert Date: Thu, 16 Apr 2015 17:43:03 +0200 Subject: [PATCH] Make plugins and themes load the merged config from all files --- system/src/Grav/Common/Plugins.php | 4 ++-- system/src/Grav/Common/Themes.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system/src/Grav/Common/Plugins.php b/system/src/Grav/Common/Plugins.php index d0c30c3e3..9d8167df9 100644 --- a/system/src/Grav/Common/Plugins.php +++ b/system/src/Grav/Common/Plugins.php @@ -123,10 +123,10 @@ class Plugins extends Iterator $obj = new Data($file->content(), $blueprint); // Override with user configuration. - $file = CompiledYamlFile::instance("user://config/plugins/{$name}.yaml"); - $obj->merge($file->content()); + $obj->merge($this->grav['config']->get('plugins.' . $name) ?: []); // Save configuration always to user/config. + $file = CompiledYamlFile::instance("config://plugins/{$name}.yaml"); $obj->file($file); return $obj; diff --git a/system/src/Grav/Common/Themes.php b/system/src/Grav/Common/Themes.php index 4ec394ee9..ab4696a88 100644 --- a/system/src/Grav/Common/Themes.php +++ b/system/src/Grav/Common/Themes.php @@ -106,10 +106,10 @@ class Themes extends Iterator $obj = new Data($file->content(), $blueprint); // Override with user configuration. - $file = CompiledYamlFile::instance("user://config/themes/{$name}" . YAML_EXT); - $obj->merge($file->content()); + $obj->merge($this->grav['config']->get('themes.' . $name) ?: []); // Save configuration always to user/config. + $file = CompiledYamlFile::instance("config://themes/{$name}" . YAML_EXT); $obj->file($file); return $obj;