Fix bad var

This commit is contained in:
Laurent Destailleur
2023-06-03 11:28:43 +02:00
parent 6c8b5d489f
commit 557a5ea35f

View File

@@ -97,15 +97,15 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC) && !emp
$newUrlArray = parse_url($link);
// Check URL is external
if (!getDolGlobalString('MAIN_ALLOW_LOCAL_LINKS_AS_EXTERNAL_LINKS')) {
if (!getDolGlobalString('MAIN_ALLOW_SVG_FILES_AS_EXTERNAL_LINKS')) {
if (!empty($newUrlArray['path']) && preg_match('/\.svg/i', $newUrlArray['path'])) {
$error++;
$langs->load("errors");
setEventMessages($langs->trans('ErrorSVGFilesNotAllowedAsLinksWithout', 'MAIN_ALLOW_LOCAL_LINKS_AS_EXTERNAL_LINKS'), null, 'errors');
setEventMessages($langs->trans('ErrorSVGFilesNotAllowedAsLinksWithout', 'MAIN_ALLOW_SVG_FILES_AS_EXTERNAL_LINKS'), null, 'errors');
}
}
// Alow external links to svg ?
if (!getDolGlobalString('MAIN_ALLOW_SVG_FILES_AS_EXTERNAL_LINKS')) {
if (!getDolGlobalString('MAIN_ALLOW_LOCAL_LINKS_AS_EXTERNAL_LINKS')) {
// Test $newUrlAray['host'] to check link is external
// TODO
}