aboutsummaryrefslogtreecommitdiffstats
path: root/include/template.class.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-08-30 19:20:50 +0000
committerrvelices <rv-github@modusoptimus.com>2012-08-30 19:20:50 +0000
commita2f73718d9588a2b6185e73aa683cecd9f990363 (patch)
treee73c443a871d1ddadfa767b60d3d8221e5f93fa8 /include/template.class.php
parent2c24b0b38ae678a0269b308ddf03ab1bc85630d2 (diff)
bug 2725: Piwigo isn't compatible with suPHP + better handling of watermark upload errors merge from trunk to branch 2.4
git-svn-id: http://piwigo.org/svn/branches/2.4@17676 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/template.class.php')
-rw-r--r--include/template.class.php26
1 files changed, 3 insertions, 23 deletions
diff --git a/include/template.class.php b/include/template.class.php
index 3bc386c80..6d81b7169 100644
--- a/include/template.class.php
+++ b/include/template.class.php
@@ -78,28 +78,6 @@ class Template {
}
}
- if (!isset($conf['combined_dir_checked']))
- {
- $dir = PHPWG_ROOT_PATH.PWG_COMBINED_DIR;
- mkgetdir($dir, MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR);
- if (!is_writable($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', 1);
- }
- }
-
-
$compile_dir = PHPWG_ROOT_PATH.$conf['data_location'].'templates_c';
mkgetdir( $compile_dir );
@@ -1343,7 +1321,9 @@ final class FileCombiner
$output .= "\n";
}
- file_put_contents( PHPWG_ROOT_PATH . $file, $output );
+ mkgetdir( dirname(PHPWG_ROOT_PATH.$file) );
+ file_put_contents( PHPWG_ROOT_PATH.$file, $output );
+ @chmod(PHPWG_ROOT_PATH.$file, 0644);
$out_file = $file;
$out_version = false;
$this->clear();