Merge pull request #17505 from FHenry/13_fix_webdavlink

fix: allow webdavs link type
This commit is contained in:
Laurent Destailleur 2021-05-06 15:56:55 +02:00 committed by GitHub
commit 7bd6cdbf59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,7 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC))
$link = GETPOST('link', 'alpha');
if ($link)
{
if (substr($link, 0, 7) != 'http://' && substr($link, 0, 8) != 'https://' && substr($link, 0, 7) != 'file://') {
if (substr($link, 0, 7) != 'http://' && substr($link, 0, 8) != 'https://' && substr($link, 0, 7) != 'file://' && substr($link, 0, 7) != 'davs://') {
$link = 'http://'.$link;
}
dol_add_file_process($upload_dir, 0, 1, 'userfile', null, $link, '', 0);