Ignore:
Timestamp:
Aug 30, 2012, 9:20:50 PM (12 years ago)
Author:
rvelices
Message:

bug 2725: Piwigo isn't compatible with suPHP + better handling of watermark upload errors merge from trunk to branch 2.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4/include/template.class.php

    r17022 r17676  
    7979    }
    8080
    81     if (!isset($conf['combined_dir_checked']))
    82     {
    83       $dir = PHPWG_ROOT_PATH.PWG_COMBINED_DIR;
    84       mkgetdir($dir, MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR);
    85       if (!is_writable($dir))
    86       {
    87         load_language('admin.lang');
    88         fatal_error(
    89           sprintf(
    90             l10n('Give write access (chmod 777) to "%s" directory at the root of your Piwigo installation'),
    91             PWG_COMBINED_DIR
    92             ),
    93           l10n('an error happened'),
    94           false // show trace
    95           );
    96       }
    97       if (function_exists('pwg_query')) {
    98         conf_update_param('combined_dir_checked', 1);
    99       }
    100     }
    101 
    102 
    10381    $compile_dir = PHPWG_ROOT_PATH.$conf['data_location'].'templates_c';
    10482    mkgetdir( $compile_dir );
     
    13441322    }
    13451323
    1346     file_put_contents( PHPWG_ROOT_PATH . $file,  $output );
     1324    mkgetdir( dirname(PHPWG_ROOT_PATH.$file) );
     1325    file_put_contents( PHPWG_ROOT_PATH.$file,  $output );
     1326    @chmod(PHPWG_ROOT_PATH.$file, 0644);
    13471327    $out_file = $file;
    13481328    $out_version = false;
Note: See TracChangeset for help on using the changeset viewer.