Skip to content

Commit fa17f52

Browse files
committed
fix(issue): handle redirection to satisfaction survey from email
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent 0662f80 commit fa17f52

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

setup.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,13 @@ function plugin_init_formcreator() {
174174
if (strpos($_SERVER['REQUEST_URI'], "front/ticket.form.php") !== false) {
175175
if (plugin_formcreator_replaceHelpdesk()) {
176176
if (!isset($_POST['update'])) {
177-
Html::redirect($CFG_GLPI["root_doc"] . '/plugins/formcreator/front/issue.form.php?id=' . $_GET['id'] . '&sub_itemtype=Ticket');
177+
$decodedUrl = [];
178+
$forceTab = '';
179+
parse_str($_SERVER['QUERY_STRING'], $decodedUrl);
180+
if (isset($decodedUrl['forcetab'])) {
181+
Session::setActiveTab(Ticket::class, $decodedUrl['forcetab']);
182+
}
183+
Html::redirect($CFG_GLPI["root_doc"] . '/plugins/formcreator/front/issue.form.php?id=' . $_GET['id'] . '&sub_itemtype=Ticket' . $forceTab);
178184
}
179185
}
180186
}

0 commit comments

Comments
 (0)