diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index 72c78cb8a4d..54243494de4 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -125,8 +125,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') { require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $link = new Link($db); - $link->id = $linkid; - $link->fetch(); + $link->fetch($linkid); $res = $link->delete($user); $langs->load('link'); @@ -160,8 +159,7 @@ elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST(' require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $langs->load('link'); $link = new Link($db); - $link->id = GETPOST('linkid', 'int'); - $f = $link->fetch(); + $f = $link->fetch(GETPOST('linkid', 'int')); if ($f) { $link->url = GETPOST('link', 'alpha'); @@ -169,7 +167,7 @@ elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST(' { $link->url = 'http://' . $link->url; } - $link->label = GETPOST('label', 'alpha'); + $link->label = GETPOST('label', 'alphanohtml'); $res = $link->update($user); if (!$res) { diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 5f63d4db66c..d271f90720c 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1839,7 +1839,7 @@ class FormFile print $langs->trans('Link') . ': '; print ''; print '