Revert "Fix issue with config blueprints auto creating config yaml files"

This reverts commit b630c5cf27.
This commit is contained in:
Flavio Copes
2016-02-11 16:14:43 +01:00
parent 91bae627fa
commit 60057c3c75

View File

@@ -540,15 +540,6 @@ class AdminPlugin extends Plugin
throw new \RuntimeException('One of the required plugins is missing or not enabled');
}
// Double check we have system.yaml and site.yaml
$config_files[] = $this->grav['locator']->findResource('user://config') . '/system.yaml';
$config_files[] = $this->grav['locator']->findResource('user://config') . '/site.yaml';
foreach ($config_files as $config_file) {
if (!file_exists($config_file)) {
touch($config_file);
}
}
// Initialize Admin Language if needed
/** @var Language $language */
$language = $this->grav['language'];
@@ -576,6 +567,15 @@ class AdminPlugin extends Plugin
// And store the class into DI container.
$this->grav['admin'] = $this->admin;
// Double check we have system.yam, site.yaml etc
$config_path = $this->grav['locator']->findResource('user://config');
foreach ($this->admin->configurations() as $config_file) {
$config_file = "{$config_path}/{$config_file}.yaml";
if (!file_exists($config_file)) {
touch($config_file);
}
}
// Get theme for admin
$this->theme = $this->config->get('plugins.admin.theme', 'grav');