Fix edit dav: link
This commit is contained in:
parent
93f902aa90
commit
4e391be2dc
1 changed files with 8 additions and 2 deletions
|
|
@ -117,7 +117,10 @@ if (GETPOST('sendit', 'alpha') && getDolGlobalString('MAIN_UPLOAD_DOC') && !empt
|
|||
} elseif (GETPOST('linkit', 'restricthtml') && getDolGlobalString('MAIN_UPLOAD_DOC') && !empty($permissiontoadd)) {
|
||||
$link = GETPOST('link', 'alpha');
|
||||
if ($link) {
|
||||
if (substr($link, 0, 7) != 'http://' && substr($link, 0, 8) != 'https://' && substr($link, 0, 7) != 'file://' && substr($link, 0, 7) != 'davs://') {
|
||||
if (substr($link, 0, 7) != 'http://'
|
||||
&& substr($link, 0, 8) != 'https://'
|
||||
&& substr($link, 0, 7) != 'davs://'
|
||||
&& (substr($link, 0, 7) != 'file://' || !getDolGlobalString('MAIN_ALLOW_LINK_STARTING_WITH_FILE'))) {
|
||||
$link = 'http://'.$link;
|
||||
}
|
||||
|
||||
|
|
@ -221,7 +224,10 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes' && !empty($permissionto
|
|||
$f = $link->fetch(GETPOSTINT('linkid'));
|
||||
if ($f) {
|
||||
$link->url = GETPOST('link', 'alpha');
|
||||
if (substr($link->url, 0, 7) != 'http://' && substr($link->url, 0, 8) != 'https://' && substr($link->url, 0, 7) != 'file://') {
|
||||
if (substr($link->url, 0, 7) != 'http://'
|
||||
&& substr($link->url, 0, 8) != 'https://'
|
||||
&& substr($link->url, 0, 7) != 'davs://'
|
||||
&& (substr($link->url, 0, 7) != 'file://' || !getDolGlobalString('MAIN_ALLOW_LINK_STARTING_WITH_FILE'))) {
|
||||
$link->url = 'http://'.$link->url;
|
||||
}
|
||||
$link->label = GETPOST('label', 'alphanohtml');
|
||||
|
|
|
|||
Loading…
Reference in a new issue