Create templates_c directory if it does not exist
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Mon, 28 May 2007 08:27:31 +0000 (08:27 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:35:44 +0000 (00:35 +0100)
 page.inc.php |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@260 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/page.inc.php

index 7d313ef..fef0196 100644 (file)
@@ -30,7 +30,9 @@ class BananaPage extends Smarty
         $this->template_dir  = dirname(__FILE__) . '/templates/';
         $this->compile_dir   = Banana::$spool_root . '/templates_c/';
         $this->register_prefilter('banana_trimwhitespace');
-    
+        if (!is_dir($this->compile_dir)) {
+            mkdir($this->compile_dir);
+        }
     }
 
     /** Add an error message