Changeset 17675 for trunk/include
- Timestamp:
- Aug 30, 2012, 9:20:00 PM (12 years ago)
- Location:
- trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/template.class.php
r17021 r17675 79 79 } 80 80 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_DIR92 ),93 l10n('an error happened'),94 false // show trace95 );96 }97 if (function_exists('pwg_query')) {98 conf_update_param('combined_dir_checked', 1);99 }100 }101 102 103 81 $compile_dir = PHPWG_ROOT_PATH.$conf['data_location'].'templates_c'; 104 82 mkgetdir( $compile_dir ); … … 1344 1322 } 1345 1323 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); 1347 1327 $out_file = $file; 1348 1328 $out_version = false; -
trunk/include/ws_functions.inc.php
r17669 r17675 1508 1508 1509 1509 // create the upload directory tree if not exists 1510 if (!is_dir($upload_dir)) { 1511 umask(0000); 1512 if (!@mkdir($upload_dir, 0777, true)) 1513 { 1514 return new PwgError(500, 'error during buffer directory creation'); 1515 } 1516 } 1517 1518 if (!is_writable($upload_dir)) 1519 { 1520 // last chance to make the directory writable 1521 @chmod($upload_dir, 0777); 1522 1523 if (!is_writable($upload_dir)) 1524 { 1525 return new PwgError(500, 'buffer directory has no write access'); 1526 } 1527 } 1528 1529 secure_directory($upload_dir); 1510 if (!mkgetdir($upload_dir, MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR)) 1511 { 1512 return new PwgError(500, 'error during buffer directory creation'); 1513 } 1530 1514 1531 1515 $filename = sprintf(
Note: See TracChangeset
for help on using the changeset viewer.