Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
c9cb978c39
@ -190,7 +190,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
$publicmediasdirwithslash = $conf->medias->multidir_output[$conf->entity];
|
$publicmediasdirwithslash = $conf->medias->multidir_output[$conf->entity];
|
||||||
if (! preg_match('/\/$/', $publicmediasdirwithslash)) $publicmediasdirwithslash.='/';
|
if (! preg_match('/\/$/', $publicmediasdirwithslash)) $publicmediasdirwithslash.='/';
|
||||||
|
|
||||||
if ($upload_dir != $publicmediasdirwithslash) { // We never add .noexe on files into media directory
|
if (strpos($upload_dir, $publicmediasdirwithslash) !== 0) { // We never add .noexe on files into media directory
|
||||||
$filenameto .= '.noexe';
|
$filenameto .= '.noexe';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1049,7 +1049,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
|||||||
$publicmediasdirwithslash = $conf->medias->multidir_output[$conf->entity];
|
$publicmediasdirwithslash = $conf->medias->multidir_output[$conf->entity];
|
||||||
if (! preg_match('/\/$/', $publicmediasdirwithslash)) $publicmediasdirwithslash.='/';
|
if (! preg_match('/\/$/', $publicmediasdirwithslash)) $publicmediasdirwithslash.='/';
|
||||||
|
|
||||||
if ($upload_dir != $publicmediasdirwithslash) { // We never add .noexe on files into media directory
|
if (strpos($upload_dir, $publicmediasdirwithslash) !== 0) { // We never add .noexe on files into media directory
|
||||||
$file_name .= '.noexe';
|
$file_name .= '.noexe';
|
||||||
$successcode = 2;
|
$successcode = 2;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user