diff --git a/htdocs/core/actions_dellink.inc.php b/htdocs/core/actions_dellink.inc.php index a8f3b26291f..02de4833da7 100644 --- a/htdocs/core/actions_dellink.inc.php +++ b/htdocs/core/actions_dellink.inc.php @@ -43,7 +43,7 @@ if ($action == 'addlink' && !empty($permissiondellink) && !$cancellink && $id > } // Link by reference -if ($action == 'addlinkbyref' && !empty($permissiondellink) && !$cancellink && $id > 0 && !empty($addlinkref) && getDolGlobalString('MAIN_LINK_BY_REF_IN_LINKTO')) { +if ($action == 'addlinkbyref' && !empty($permissiondellink) && !$cancellink && $id > 0 && !empty($addlinkref) && getDolGlobalString('MAIN_HIDE_LINK_BY_REF_IN_LINKTO')) { $element_prop = getElementProperties($addlink); if (is_array($element_prop)) { dol_include_once('/' . $element_prop['classpath'] . '/' . $element_prop['classfile'] . '.class.php'); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index e5d392ab580..11d2644cdf2 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9656,6 +9656,7 @@ class Form } } + // Build the html part with possible suggested links foreach ($possiblelinks as $key => $possiblelink) { $num = 0; @@ -9666,7 +9667,7 @@ class Form if (!empty($possiblelink['perms']) && (empty($restrictlinksto) || in_array($key, $restrictlinksto)) && (empty($excludelinksto) || !in_array($key, $excludelinksto))) { print '