Code

Added POST/GET save, to be able to switch to edit dialog, after lock:message was...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Feb 2006 09:23:52 +0000 (09:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Feb 2006 09:23:52 +0000 (09:23 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2719 594d385d-05f5-0310-b6e9-bd551577e9d8

include/functions.inc

index 0d64f1e28a7d0df854f197f0d02bfaeac09afff0..828060870486fcff6adcf2b7bbc13d572f776af4 100644 (file)
@@ -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);