From 4bf41b8e5db7c933f1b8cd3738c32a375866d4b5 Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Wed, 8 May 2013 03:26:20 -0400 Subject: [PATCH] check if view/smarty3 folder is writable by webserver --- include/friendica_smarty.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/friendica_smarty.php b/include/friendica_smarty.php index 1326b0ac..021feea2 100644 --- a/include/friendica_smarty.php +++ b/include/friendica_smarty.php @@ -45,6 +45,13 @@ class FriendicaSmarty extends Smarty { class FriendicaSmartyEngine implements ITemplateEngine { static $name ="smarty3"; + + public function __construct(){ + if(!is_writable('view/smarty3/')){ + echo "ERROR: folder view/tpl/smarty3/ must be writable by webserver."; killme(); + } + } + // ITemplateEngine interface public function replace_macros($s, $r) { $template = '';