1
0

smarty compile dir - better exeption handler

This commit is contained in:
Ian
2011-12-02 16:23:16 +01:00
parent f890b4139a
commit b0377ef865

View File

@@ -123,8 +123,8 @@ class Serendipity_Smarty extends Smarty
$this->setConfigDir(array(S9Y_TEMPLATE_DEFAULT)); $this->setConfigDir(array(S9Y_TEMPLATE_DEFAULT));
if (!is_dir($this->getCompileDir()) || !is_writable($this->getCompileDir())) { if (!is_dir($this->getCompileDir()) || !is_writable($this->getCompileDir())) {
// howto: better throw exception depending on context or 500/503 header here ?? if(ini_get('display_errors') == 0 || ini_get('display_errors') == 'off') printf(DIRECTORY_WRITE_ERROR, $this->getCompileDir());
throw new Exception(printf(DIRECTORY_WRITE_ERROR.'<br />', $this->getCompileDir())); trigger_error(sprintf(DIRECTORY_WRITE_ERROR, $this->getCompileDir()), E_USER_ERROR);
} }
#cache# $this->setCacheDir($serendipity['serendipityPath'] . 'cache'); // (enable #cache# properties) #cache# $this->setCacheDir($serendipity['serendipityPath'] . 'cache'); // (enable #cache# properties)