Fix in chmod

This commit is contained in:
Laurent Destailleur
2008-10-18 18:34:07 +00:00
parent 07eb06d8b7
commit e6fcbb98b8
3 changed files with 3 additions and 3 deletions

View File

@@ -1676,7 +1676,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite)
$return=move_uploaded_file($src_file, $file_name); $return=move_uploaded_file($src_file, $file_name);
if ($return) if ($return)
{ {
@chmod($file_name, $conf->global->MAIN_UMASK); if (! empty($conf->global->MAIN_UMASK)) @chmod($file_name, $conf->global->MAIN_UMASK);
dolibarr_syslog("Functions.lib::dol_move_uploaded_file Success to move ".$src_file." to ".$file_name." - Umask=".$conf->global->MAIN_UMASK, LOG_DEBUG); dolibarr_syslog("Functions.lib::dol_move_uploaded_file Success to move ".$src_file." to ".$file_name." - Umask=".$conf->global->MAIN_UMASK, LOG_DEBUG);
return 1; return 1;
} }

View File

@@ -600,7 +600,7 @@ class Ldap
// We change mod to allow file to be overwritten if dump is launched // We change mod to allow file to be overwritten if dump is launched
// from command line or a web session. // from command line or a web session.
// 0666 = rw-rw-rw- // 0666 = rw-rw-rw-
@chmod($file, $conf->global->MAIN_UMASK); if (! empty($conf->global->MAIN_UMASK)) @chmod($file, $conf->global->MAIN_UMASK);
return 1; return 1;
} }
else else

View File

@@ -316,7 +316,7 @@ function build_rssfile($format='rss',$title,$desc,$events_array,$outputfile,$fil
// We change mod to allow file to be overwritten if dump is launched // We change mod to allow file to be overwritten if dump is launched
// from command line or a web session. // from command line or a web session.
// 0666 = rw-rw-rw- // 0666 = rw-rw-rw-
@chmod($fichier, $conf->global->MAIN_UMASK); if (! empty($conf->global->MAIN_UMASK)) @chmod($fichier, $conf->global->MAIN_UMASK);
} }
} }