From 4c4d97e2303b2c4d6d2705f1f563da8518ff2e4b Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Mon, 10 Aug 2020 09:12:59 +0200 Subject: [PATCH] fix(form): error in displayed form URL related to changes for marketplace compatibility Signed-off-by: Thierry Bugier --- inc/form_profile.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/form_profile.class.php b/inc/form_profile.class.php index 8980ed982..550ad7404 100644 --- a/inc/form_profile.class.php +++ b/inc/form_profile.class.php @@ -97,7 +97,9 @@ public static function showForForm(CommonDBTM $item, $withtemplate = '') { echo ''; echo ''.__('Link to the form', 'formcreator').': '; if ($item->fields['is_active']) { - $form_url = $CFG_GLPI['url_base'] . FORMCREATOR_ROOTDOC . '/front/formdisplay.php?id='.$item->getID(); + $baseUrl = parse_url($CFG_GLPI['url_base']); + $baseUrl = $baseUrl['scheme'] . '://' . $baseUrl['host'] . ':' . $baseUrl['port']; + $form_url = $baseUrl . FORMCREATOR_ROOTDOC . '/front/formdisplay.php?id='.$item->getID(); echo ''.$form_url.' '; echo ''; echo '';