Skip to content

Commit

Permalink
fix(form): error in displayed form URL
Browse files Browse the repository at this point in the history
related to changes for marketplace compatibility

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Aug 10, 2020
1 parent 57a9831 commit 4c4d97e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inc/form_profile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ public static function showForForm(CommonDBTM $item, $withtemplate = '') {
echo '</td>';
echo '<td>'.__('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 '<a href="'.$form_url.'">'.$form_url.'</a>&nbsp;';
echo '<a href="mailto:?subject='.$item->getName().'&body='.$form_url.'" target="_blank">';
echo '<img src="'.FORMCREATOR_ROOTDOC.'/pics/email.png" />';
Expand Down

0 comments on commit 4c4d97e

Please sign in to comment.