LSsession::startLStemplate() : added check to verify that smarty's compile dir is...
authorBenjamin Renard <bn8@zionetrix.net>
Sat, 1 Sep 2012 12:04:24 +0000 (14:04 +0200)
committerBenjamin Renard <bn8@zionetrix.net>
Sat, 1 Sep 2012 12:04:24 +0000 (14:04 +0200)
public_html/includes/class/class.LSsession.php

index e37f8ca..d758049 100644 (file)
@@ -133,6 +133,9 @@ class LSsession {
       $GLOBALS['Smarty'] = new Smarty();
       $GLOBALS['Smarty'] -> template_dir = LS_TEMPLATES_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) {
         $GLOBALS['Smarty'] -> caching = 0;