From 8b687907a4926393770a3b4a8dddf7414f5c2a38 Mon Sep 17 00:00:00 2001 From: Loz Calver Date: Mon, 15 Sep 2014 14:31:28 +0100 Subject: [PATCH] Make DNEnvironment.template_file configurable --- code/model/DNEnvironment.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/model/DNEnvironment.php b/code/model/DNEnvironment.php index f8938b59..33c931fb 100644 --- a/code/model/DNEnvironment.php +++ b/code/model/DNEnvironment.php @@ -16,6 +16,7 @@ class DNEnvironment extends DataObject { * If not set, the default 'environment.template' from the module * root is used * + * @config * @var string */ private static $template_file = ''; @@ -645,8 +646,8 @@ public function onBeforeWrite() { // Create a basic new environment config from a template if($this->config()->get('allow_web_editing') && !$this->envFileExists() && $this->Filename && $this->CreateEnvConfig) { - if(self::$template_file) { - $templateFile = self::$template_file; + if($this->config()->template_file) { + $templateFile = $this->config()->template_file; } else { $templateFile = BASE_PATH.'/deploynaut/environment.template'; }