aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-03-10 09:57:03 +0000
committerplegall <plg@piwigo.org>2011-03-10 09:57:03 +0000
commit94168b836ef10c99ef785d6af8dbb089473012a4 (patch)
treebe16c62b542b29624476efddbfeda61c56eeb288
parent93dfc4fb9fea493d7e1de763ddb1c0c11e2c37da (diff)
check for availability of local/combined (and try to create it if not available)
git-svn-id: http://piwigo.org/svn/trunk@9594 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/template.class.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/template.class.php b/include/template.class.php
index 10dea455c..e2e7b8786 100644
--- a/include/template.class.php
+++ b/include/template.class.php
@@ -79,6 +79,27 @@ class Template {
}
}
+ if (!isset($conf['combined_dir_checked']))
+ {
+ mkgetdir(PWG_COMBINED_DIR, MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR);
+ if (!is_writable(PWG_COMBINED_DIR))
+ {
+ load_language('admin.lang');
+ fatal_error(
+ sprintf(
+ l10n('Give write access (chmod 777) to "%s" directory at the root of your Piwigo installation'),
+ PWG_COMBINED_DIR
+ ),
+ l10n('an error happened'),
+ false // show trace
+ );
+ }
+ if (function_exists('pwg_query')) {
+ conf_update_param('combined_dir_checked', 'true');
+ }
+ }
+
+
$compile_dir = $conf['local_data_dir'].'/templates_c';
mkgetdir( $compile_dir );