mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-11 18:32:32 +01:00
Fix bad var
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user