LSsession::startLStemplate() : added check to verify that smarty's compile dir is writable.

This commit is contained in:
Benjamin Renard 2012-09-01 14:04:24 +02:00
parent 2057f8318e
commit dae3178ac9

View file

@ -133,6 +133,9 @@ class LSsession {
$GLOBALS['Smarty'] = new Smarty(); $GLOBALS['Smarty'] = new Smarty();
$GLOBALS['Smarty'] -> template_dir = LS_TEMPLATES_DIR; $GLOBALS['Smarty'] -> template_dir = LS_TEMPLATES_DIR;
$GLOBALS['Smarty'] -> compile_dir = LS_TMP_DIR; $GLOBALS['Smarty'] -> compile_dir = LS_TMP_DIR;
if ( ! is_writable(LS_TMP_DIR) ) {
die('Smarty compile directory is not writable (dir : '.LS_TMP_DIR.')');
}
if (LSdebug) { if (LSdebug) {
$GLOBALS['Smarty'] -> caching = 0; $GLOBALS['Smarty'] -> caching = 0;