X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fui%2Fui_controls.inc;h=ddef1bddf3491d083918f0ed8f03ef8433b0add8;hb=927ebef2443b6dda544056e33ec84b71d2bdb6c2;hp=6250620528e2d4b153d00de2f8fa5f4114cd67ac;hpb=b52ca51128e33a2d051d8e36a7dcc2c22e816020;p=fa-stable.git diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index 62506205..ddef1bdd 100644 --- a/includes/ui/ui_controls.inc +++ b/includes/ui/ui_controls.inc @@ -32,10 +32,15 @@ function get_post($name, $dflt='') ((!isset($_POST[$name]) || $_POST[$name] === '') ? $dflt : $_POST[$name]); } //--------------------------------------------------------------------------------- +$form_nested = -1; function start_form($multi=false, $dummy=false, $action="", $name="") { // $dummy - leaved for compatibility with 2.0 API + global $form_nested; + + if (++$form_nested) return; + if ($name != "") $name = "name='$name'"; @@ -53,7 +58,9 @@ function start_form($multi=false, $dummy=false, $action="", $name="") function end_form($breaks=0) { - global $Ajax; + global $Ajax, $form_nested; + + if ($form_nested-- > 0) return; $_SESSION['csrf_token'] = hash('sha256', uniqid(mt_rand(), true)); if ($breaks) @@ -132,10 +139,10 @@ function vertical_space($params='') echo "