2
0
forked from Wavyzz/dolibarr

Use dolChmod

This commit is contained in:
Laurent Destailleur
2023-02-17 19:30:50 +01:00
parent d976372d87
commit 0b4cacd291
101 changed files with 247 additions and 428 deletions

View File

@@ -227,7 +227,7 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir =
$result = file_put_contents(dol_osencode($pathoffiletoedittarget), $contentclass);
if ($result) {
@chmod($pathoffiletoedittarget, octdec($newmask));
dolChmod($pathoffiletoedittarget, $newmask);
} else {
$error++;
}
@@ -369,7 +369,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = '
$result = file_put_contents($pathoffiletoedittarget, $contentsql);
if ($result) {
@chmod($pathoffiletoedittarget, octdec($newmask));
dolChmod($pathoffiletoedittarget, $newmask);
} else {
$error++;
setEventMessages($langs->trans("ErrorFailToCreateFile", $pathoffiletoedittarget), null, 'errors');
@@ -408,7 +408,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = '
$result2 = file_put_contents($pathoffiletoedittarget, $contentsql);
if ($result2) {
@chmod($pathoffiletoedittarget, octdec($newmask));
dolChmod($pathoffiletoedittarget, $newmask);
} else {
$error++;
setEventMessages($langs->trans("ErrorFailToCreateFile", $pathoffiletoedittarget), null, 'errors');