Skip to content

Commit

Permalink
fix: keep backward compatibility with GLPI 9.4
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <[email protected]>
  • Loading branch information
btry committed Jul 10, 2020
1 parent a71d468 commit dedde0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inc/form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ public function showForCentral() {

echo '<table class="tab_cadrehov" id="plugin_formcreatorHomepageForms">';
echo '<tr class="noHover">';
echo '<th><a href="' . Plugin::getWebDir('formcreator', true, true) . '/front/formlist.php">' . _n('Form', 'Forms', 2, 'formcreator') . '</a></th>';
echo '<th><a href="' . FORMCREATOR_ROOTDOC . '/front/formlist.php">' . _n('Form', 'Forms', 2, 'formcreator') . '</a></th>';
echo '</tr>';

$currentCategoryId = -1;
Expand Down
4 changes: 2 additions & 2 deletions inc/form_profile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtem
}

public static function showForForm(CommonDBTM $item, $withtemplate = '') {
global $DB;
global $DB, $CFG_GLPI;

echo "<form name='notificationtargets_form' id='notificationtargets_form'
method='post' action=' ";
Expand All @@ -101,7 +101,7 @@ public static function showForForm(CommonDBTM $item, $withtemplate = '') {
echo '</td>';
echo '<td>'.__('Link to the form', 'formcreator').': ';
if ($item->fields['is_active']) {
$form_url = Plugin::getWebDir('formcreator', true, true) . '/front/formdisplay.php?id='.$item->getID();
$form_url = $CFG_GLPI['url_base'] . 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 dedde0b

Please sign in to comment.