diff --git a/template_editor/edit_layout.php b/template_editor/edit_layout.php index da6fc891..ace5f953 100644 --- a/template_editor/edit_layout.php +++ b/template_editor/edit_layout.php @@ -41,7 +41,7 @@ header('Location: index.php'); exit; } -if(!is_writable($_SERVER['DOCUMENT_ROOT'].$_base_path.'templates/'.$type)){ +if(!is_writable($_SERVER['DOCUMENT_ROOT'].$_base_path.'templates/'.$type) || !is_writable($_SERVER['DOCUMENT_ROOT'].$_base_path.'templates/')){ $msg->addWarning('TEMPLATE_DIR_NOT_WRITABLE'); $temp_unwritable = TRUE; }else{ diff --git a/template_editor/edit_page.php b/template_editor/edit_page.php index d34248b2..88d04a77 100644 --- a/template_editor/edit_page.php +++ b/template_editor/edit_page.php @@ -31,7 +31,7 @@ $type = "page_templates"; $template=$_GET['temp']; // non existing template name -if(!is_writable($_SERVER['DOCUMENT_ROOT'].$_base_path.'templates/'.$type)){ +if(!is_writable($_SERVER['DOCUMENT_ROOT'].$_base_path.'templates/'.$type)|| !is_writable($_SERVER['DOCUMENT_ROOT'].$_base_path.'templates/')){ $msg->addWarning('TEMPLATE_DIR_NOT_WRITABLE'); $temp_unwritable = TRUE; }else{ diff --git a/template_editor/edit_structure.php b/template_editor/edit_structure.php index a2fe9595..b29f18fc 100644 --- a/template_editor/edit_structure.php +++ b/template_editor/edit_structure.php @@ -32,7 +32,7 @@ Header('Location: index.php'); exit; } -if(!is_writable($_SERVER['DOCUMENT_ROOT'].$_base_path.'templates/'.$type)){ +if(!is_writable($_SERVER['DOCUMENT_ROOT'].$_base_path.'templates/'.$type) || !is_writable($_SERVER['DOCUMENT_ROOT'].$_base_path.'templates/')){ $msg->addWarning('TEMPLATE_DIR_NOT_WRITABLE'); $temp_unwritable = TRUE; }else{