check whether we can use templates_c (this seems a better idea than falling back to using something in /tmp)

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1886 a1433add-5e2c-0410-b055-b7f2511e0802
pull/12/head
David Goodwin 8 years ago
parent b434f7070a
commit b8051515db

@ -14,7 +14,13 @@ class PFASmarty {
//$this->template->debugging = true;
$incpath = dirname(__FILE__);
$this->template->setTemplateDir(dirname(__FILE__) . '/templates');
$this->template->setCompileDir(dirname(__FILE__) . '/templates_c');
// if it's not present or writeable, smarty should just not cache.
$templates_c = dirname(__FILE__) . '/templates_c';
if(is_dir($templates_c) && is_writeable($templates_c)) {
$this->template->setCompileDir($templates_c);
}
$this->template->setConfigDir(dirname(__FILE__) . '/configs');
}

Loading…
Cancel
Save