Skip to content

Commit

Permalink
fix: restore page redirections existing in v2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Sep 2, 2022
1 parent 76444ec commit 582f926
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,21 @@ function plugin_formcreator_redirect() {

Html::redirect($issue->getFormURLWithID($issue->getID()) . '&tickets_id=' . $itemTicket->fields['tickets_id']);
}

$pages = [
'front/reservationitem.php' => FORMCREATOR_ROOTDOC . '/front/reservationitem.php',
'front/helpdesk.faq.php' => FORMCREATOR_ROOTDOC . '/front/wizard.php',
'front/ticket.php' => FORMCREATOR_ROOTDOC . '/front/issue.php',
];
foreach ($pages as $srcPage => $dstPage) {
if (strpos($_SERVER['REQUEST_URI'], $srcPage) !== false && strpos($_SERVER['REQUEST_URI'], $dstPage) === false) {
if ($srcPage == 'front/reservationitem.php') {
$_SESSION['plugin_formcreator']['redirected']['POST'] = $_POST;
}
Html::redirect($dstPage);
break;
}
}
}

function plugin_formcreator_options() {
Expand Down

0 comments on commit 582f926

Please sign in to comment.