X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_controls.inc;fp=includes%2Fui%2Fui_controls.inc;h=0639124a5a236a4f6170ca70b57c0c7a5b637dd8;hb=90b3d069d96b99671af51726e2953352738abb75;hp=d2e094ae45e7e462bb2d67a7969e42c4182f9ea5;hpb=e9782c04faf09dd040dbc0c908cdb6e6d4f0dcfc;p=fa-stable.git diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index d2e094ae..0639124a 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)