smarty compile dir - better exeption handler
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user