projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Stable merged into unstable again (due to failure on binary file during previous...
[fa-stable.git]
/
includes
/
ui
/
ui_controls.inc
diff --git
a/includes/ui/ui_controls.inc
b/includes/ui/ui_controls.inc
index d2e094ae45e7e462bb2d67a7969e42c4182f9ea5..0639124a5a236a4f6170ca70b57c0c7a5b637dd8 100644
(file)
--- 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]);
}
//---------------------------------------------------------------------------------
((!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
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'";
if ($name != "")
$name = "name='$name'";
@@
-53,7
+58,9
@@
function start_form($multi=false, $dummy=false, $action="", $name="")
function end_form($breaks=0)
{
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)
$_SESSION['csrf_token'] = hash('sha256', uniqid(mt_rand(), true));
if ($breaks)