From 67503ab6e15bb648dd7b2f0defcc7af2ba1d98bb Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 22 Feb 2006 09:23:52 +0000 Subject: [PATCH] Added POST/GET save, to be able to switch to edit dialog, after lock:message was displayed git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2719 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/functions.inc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/functions.inc b/include/functions.inc index 0d64f1e28..828060870 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -1002,6 +1002,28 @@ function gen_locked_message($user, $dn) $attrs= $ldap->fetch(); $uid= $attrs["uid"][0]; +// print_a($_POST); +// print_a($_GET); + + if((isset($_SESSION['LOCK_VARS_TO_USE']))&&(count($_SESSION['LOCK_VARS_TO_USE']))){ + $_SESSION['LOCK_VARS_USED'] =array(); + foreach($_SESSION['LOCK_VARS_TO_USE'] as $name){ + + foreach($_POST as $Pname => $Pvalue){ + if(preg_match($name,$Pname)){ + $_SESSION['LOCK_VARS_USED'][$Pname] = $_POST[$Pname]; + } + } + + foreach($_GET as $Pname => $Pvalue){ + if(preg_match($name,$Pname)){ + $_SESSION['LOCK_VARS_USED'][$Pname] = $_GET[$Pname]; + } + } + } + $_SESSION['LOCK_VARS_TO_USE'] =array(); + } + /* Prepare and show template */ $smarty= get_smarty(); $smarty->assign ("dn", $dn); -- 2.30.2