]> git.mxchange.org Git - friendica.git/commitdiff
check if view/smarty3 folder is writable by webserver
authorFabrixxm <fabrix.xm@gmail.com>
Wed, 8 May 2013 07:26:20 +0000 (03:26 -0400)
committerFabrixxm <fabrix.xm@gmail.com>
Wed, 8 May 2013 07:26:20 +0000 (03:26 -0400)
include/friendica_smarty.php

index 1326b0aca645ba5760296ed56bbaeab1c04d7708..021feea2ac3b9cb726acf1e5652d048dfeaaee2c 100644 (file)
@@ -45,6 +45,13 @@ class FriendicaSmarty extends Smarty {
 
 class FriendicaSmartyEngine implements ITemplateEngine {
        static $name ="smarty3";
+       
+    public function __construct(){
+               if(!is_writable('view/smarty3/')){
+                       echo "<b>ERROR:</b> folder <tt>view/tpl/smarty3/</tt> must be writable by webserver."; killme();
+               }
+       } 
+    
        // ITemplateEngine interface
        public function replace_macros($s, $r) {
                $template = '';