aboutsummaryrefslogtreecommitdiffstats
path: root/include/template.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/template.class.php')
-rw-r--r--include/template.class.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/template.class.php b/include/template.class.php
index a92e499a8..ec813efb3 100644
--- a/include/template.class.php
+++ b/include/template.class.php
@@ -52,6 +52,18 @@ class Template {
$this->smarty->compile_check = $conf['template_compile_check'];
$this->smarty->force_compile = $conf['template_force_compile'];
+ if (!is_writable($conf['local_data_dir']))
+ {
+ load_language('admin.lang');
+ fatal_error(
+ sprintf(
+ l10n('Give write access (chmod 777) to "%s" directory at the root of your Piwigo installation'),
+ basename($conf['local_data_dir'])
+ ),
+ l10n('an error happened'),
+ false // show trace
+ );
+ }
$compile_dir = $conf['local_data_dir'].'/templates_c';
mkgetdir( $compile_dir );