@@ -115,8 +115,8 @@ function onUpdate() {
115115 }
116116
117117 if ($ _REQUEST ["next_tab " ] == '' ) {
118- if ( $ _SESSION ["s " ]["form " ]["return_to " ] != '' ) {
119- $ list_name = $ _SESSION ["s " ]["form " ][" return_to " ];
118+ $ list_name = $ _SESSION ["s " ]["form " ]["return_to " ];
119+ if ( $ list_name != '' && $ _SESSION [ " s " ][ " list " ][ $ list_name][ " parent_id " ] ! = $ this -> id && $ _SESSION ["s " ]["list " ][$ list_name ][ " parent_name " ] != $ app -> tform -> formDef [ " name " ]) {
120120 $ 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 " ];
121121 $ _SESSION ["s " ]["form " ]["return_to " ] = '' ;
122122 session_write_close ();
@@ -153,8 +153,8 @@ function onInsert() {
153153 }
154154
155155 if ($ _REQUEST ["next_tab " ] == '' ) {
156- if ( $ _SESSION ["s " ]["form " ]["return_to " ] != '' ) {
157- $ list_name = $ _SESSION ["s " ]["form " ][" return_to " ];
156+ $ list_name = $ _SESSION ["s " ]["form " ]["return_to " ];
157+ if ( $ list_name != '' && $ _SESSION [ " s " ][ " list " ][ $ list_name][ " parent_id " ] ! = $ this -> id && $ _SESSION ["s " ]["list " ][$ list_name ][ " parent_name " ] != $ app -> tform -> formDef [ " name " ]) {
158158 $ 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 " ];
159159 $ _SESSION ["s " ]["form " ]["return_to " ] = '' ;
160160 session_write_close ();
@@ -236,8 +236,8 @@ function onDelete() {
236236 }
237237
238238 //header("Location: ".$liste["file"]."?PHPSESSID=".$_SESSION["s"]["id"]);
239- if ( $ _SESSION ["s " ]["form " ]["return_to " ] != '' ) {
240- $ list_name = $ _SESSION ["s " ]["form " ][" return_to " ];
239+ $ list_name = $ _SESSION ["s " ]["form " ]["return_to " ];
240+ if ( $ list_name != '' && $ _SESSION [ " s " ][ " list " ][ $ list_name][ " parent_id " ] ! = $ this -> id && $ _SESSION ["s " ]["list " ][$ list_name ][ " parent_name " ] != $ app -> tform -> formDef [ " name " ]) {
241241 $ 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 " ];
242242 $ _SESSION ["s " ]["form " ]["return_to " ] = '' ;
243243 session_write_close ();
0 commit comments