From fcf131993813616cc2ed3cf69ef768c61c8de64c Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Tue, 30 Jul 2013 23:29:34 +0300 Subject: [PATCH] configurable debug mode for filesystem environment --- ipf/template/environment/filesystem.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipf/template/environment/filesystem.php b/ipf/template/environment/filesystem.php index 5f053ed..42c3aa5 100644 --- a/ipf/template/environment/filesystem.php +++ b/ipf/template/environment/filesystem.php @@ -4,6 +4,7 @@ class IPF_Template_Environment_FileSystem extends IPF_Template_Environment { public $folders = array(); public $cache = ''; + public $debug = false; public function __construct($folders, $cache) { @@ -29,7 +30,7 @@ class IPF_Template_Environment_FileSystem extends IPF_Template_Environment { $_tmp = var_export($this->folders, true); $filename = $this->cache.'/IPF_Template-'.md5($_tmp.(string)$template).'.phps'; - if (IPF::get('debug') or !file_exists($filename)) { + if ($this->debug or !file_exists($filename)) { $this->write($filename, $template->compile()); } return $filename; -- 2.49.0