Skip to content
Snippets Groups Projects
Commit 775e53a5 authored by tbrehm's avatar tbrehm
Browse files

Fixed bug in tform_actions

parent 6920b895
No related branches found
No related tags found
No related merge requests found
......@@ -77,6 +77,7 @@ class plugin_listview extends plugin_base {
// Setting Returnto information in the session
$list_name = $app->listform->listDef["name"];
$_SESSION["s"]["list"][$list_name]["parent_id"] = $app->tform_actions->id;
$_SESSION["s"]["list"][$list_name]["parent_name"] = $app->tform->formDef["name"];
$_SESSION["s"]["list"][$list_name]["parent_tab"] = $_SESSION["s"]["form"]["tab"];
$_SESSION["s"]["list"][$list_name]["parent_script"] = $app->tform->formDef["action"];
$_SESSION["s"]["form"]["return_to"] = $list_name;
......
......@@ -115,8 +115,8 @@ class tform_actions {
}
if($_REQUEST["next_tab"] == '') {
if($_SESSION["s"]["form"]["return_to"] != '') {
$list_name = $_SESSION["s"]["form"]["return_to"];
$list_name = $_SESSION["s"]["form"]["return_to"];
if($list_name != '' && $_SESSION["s"]["list"][$list_name]["parent_id"] != $this->id && $_SESSION["s"]["list"][$list_name]["parent_name"] != $app->tform->formDef["name"]) {
$redirect = "Location: ".$_SESSION["s"]["list"][$list_name]["parent_script"]."?id=".$_SESSION["s"]["list"][$list_name]["parent_id"]."&next_tab=".$_SESSION["s"]["list"][$list_name]["parent_tab"];
$_SESSION["s"]["form"]["return_to"] = '';
session_write_close();
......@@ -153,8 +153,8 @@ class tform_actions {
}
if($_REQUEST["next_tab"] == '') {
if($_SESSION["s"]["form"]["return_to"] != '') {
$list_name = $_SESSION["s"]["form"]["return_to"];
$list_name = $_SESSION["s"]["form"]["return_to"];
if($list_name != '' && $_SESSION["s"]["list"][$list_name]["parent_id"] != $this->id && $_SESSION["s"]["list"][$list_name]["parent_name"] != $app->tform->formDef["name"]) {
$redirect = "Location: ".$_SESSION["s"]["list"][$list_name]["parent_script"]."?id=".$_SESSION["s"]["list"][$list_name]["parent_id"]."&next_tab=".$_SESSION["s"]["list"][$list_name]["parent_tab"];
$_SESSION["s"]["form"]["return_to"] = '';
session_write_close();
......@@ -236,8 +236,8 @@ class tform_actions {
}
//header("Location: ".$liste["file"]."?PHPSESSID=".$_SESSION["s"]["id"]);
if($_SESSION["s"]["form"]["return_to"] != '') {
$list_name = $_SESSION["s"]["form"]["return_to"];
$list_name = $_SESSION["s"]["form"]["return_to"];
if($list_name != '' && $_SESSION["s"]["list"][$list_name]["parent_id"] != $this->id && $_SESSION["s"]["list"][$list_name]["parent_name"] != $app->tform->formDef["name"]) {
$redirect = "Location: ".$_SESSION["s"]["list"][$list_name]["parent_script"]."?id=".$_SESSION["s"]["list"][$list_name]["parent_id"]."&next_tab=".$_SESSION["s"]["list"][$list_name]["parent_tab"];
$_SESSION["s"]["form"]["return_to"] = '';
session_write_close();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment