Skip to content

Commit 582f926

Browse files
committed
fix: restore page redirections existing in v2.12
1 parent 76444ec commit 582f926

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

setup.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,21 @@ function plugin_formcreator_redirect() {
488488

489489
Html::redirect($issue->getFormURLWithID($issue->getID()) . '&tickets_id=' . $itemTicket->fields['tickets_id']);
490490
}
491+
492+
$pages = [
493+
'front/reservationitem.php' => FORMCREATOR_ROOTDOC . '/front/reservationitem.php',
494+
'front/helpdesk.faq.php' => FORMCREATOR_ROOTDOC . '/front/wizard.php',
495+
'front/ticket.php' => FORMCREATOR_ROOTDOC . '/front/issue.php',
496+
];
497+
foreach ($pages as $srcPage => $dstPage) {
498+
if (strpos($_SERVER['REQUEST_URI'], $srcPage) !== false && strpos($_SERVER['REQUEST_URI'], $dstPage) === false) {
499+
if ($srcPage == 'front/reservationitem.php') {
500+
$_SESSION['plugin_formcreator']['redirected']['POST'] = $_POST;
501+
}
502+
Html::redirect($dstPage);
503+
break;
504+
}
505+
}
491506
}
492507

493508
function plugin_formcreator_options() {

0 commit comments

Comments
 (0)