diff options
author | plegall <plg@piwigo.org> | 2010-04-28 16:11:07 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2010-04-28 16:11:07 +0000 |
commit | 056668c9aef0c28703777ba54e83020fdd80713d (patch) | |
tree | ca4ef1466bd506fbc039f63663c7d749b12ebe73 /include/template.class.php | |
parent | deb73a99f7e369ce5ebfff959cd988477003acf8 (diff) |
bug 860: display a more readable error when the _data directory is not writable
git-svn-id: http://piwigo.org/svn/trunk@5985 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/template.class.php | 12 |
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 ); |