From 3fc3174788ddacedfd0b395783ebc8801581629d Mon Sep 17 00:00:00 2001 From: "Andreas Burchert (scarya)" Date: Sat, 19 Mar 2011 14:32:43 +0100 Subject: [PATCH] Finished work for reuseable form data, fixes #672 @4h --- lib/functions/output/function.makecheckbox.php | 4 ++++ lib/init.php | 3 +++ 2 files changed, 7 insertions(+) diff --git a/lib/functions/output/function.makecheckbox.php b/lib/functions/output/function.makecheckbox.php index f6e506fc..f58f59b9 100644 --- a/lib/functions/output/function.makecheckbox.php +++ b/lib/functions/output/function.makecheckbox.php @@ -38,6 +38,10 @@ function makecheckbox($name, $title, $value, $break = false, $selvalue = NULL, $ { $checked = 'checked="checked"'; } + else if(isset($_SESSION['requestData'][$name])) + { + $checked = 'checked="checked"'; + } else { $checked = ''; diff --git a/lib/init.php b/lib/init.php index f995285d..88d29892 100644 --- a/lib/init.php +++ b/lib/init.php @@ -429,6 +429,9 @@ elseif(isset($_GET['action'])) else { $action = ''; + + // clear request data + unset($_SESSION['requestData']); } if(isset($_POST['page']))