Code

Updated lock handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 27 Aug 2009 05:51:20 +0000 (05:51 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 27 Aug 2009 05:51:20 +0000 (05:51 +0000)
-Include  $_REQUEST  in re-post variables.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14146 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/html/main.php
gosa-core/include/class_plugin.inc
gosa-core/include/functions.inc

index b7a8271d8cb7cb62241caa966595bd66ab4108ed..e002b9339366c0fd87b78639a721e8d7419c41d2 100644 (file)
@@ -321,6 +321,11 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){
         $_POST[$name] = $value;
       } 
     }
+    if(session::global_is_set('LOCK_VARS_USED_REQUEST')){
+      foreach(session::global_get('LOCK_VARS_USED_REQUEST') as $name => $value){
+        $_REQUEST[$name] = $value;
+      } 
+    }
   }
 }
 
index 52b3235c510b5db49fffb57cc8b1fd79c3084134..ddd00c55ad105ea00426d63af68816b305e349f9 100644 (file)
@@ -265,6 +265,7 @@ class plugin
     session::set('LOCK_VARS_TO_USE',array());
     session::set('LOCK_VARS_USED_GET',array());
     session::set('LOCK_VARS_USED_POST',array());
+    session::set('LOCK_VARS_USED_REQUEST',array());
   }
 
   /*! \brief execute plugin
@@ -1862,7 +1863,9 @@ class plugin
 
     /* Reset Lock message POST/GET check array, to prevent perg_match errors*/
     session::set('LOCK_VARS_TO_USE',array());
-    session::set('LOCK_VARS_USED',array());
+    session::set('LOCK_VARS_USED_GET',array());
+    session::set('LOCK_VARS_USED_POST',array());
+    session::set('LOCK_VARS_USED_REQUEST',array());
     
     return("Multiple edit is currently not implemented for this plugin.");
   }
index b0d14045abc23aaeddc4012b82e3cf059a74c982..f6626a8ac9aa9497cb633eb53c83c6d05ac71a6f 100644 (file)
@@ -1298,6 +1298,7 @@ function gen_locked_message($user, $dn, $allow_readonly = FALSE)
 
     $LOCK_VARS_USED_GET   = array();
     $LOCK_VARS_USED_POST   = array();
+    $LOCK_VARS_USED_REQUEST   = array();
     $LOCK_VARS_TO_USE = session::get('LOCK_VARS_TO_USE');
 
     foreach($LOCK_VARS_TO_USE as $name){
@@ -1317,10 +1318,17 @@ function gen_locked_message($user, $dn, $allow_readonly = FALSE)
           $LOCK_VARS_USED_GET[$Pname] = $_GET[$Pname];
         }
       }
+
+      foreach($_REQUEST as $Pname => $Pvalue){
+        if(preg_match($name,$Pname)){
+          $LOCK_VARS_USED_REQUEST[$Pname] = $_REQUEST[$Pname];
+        }
+      }
     }
     session::set('LOCK_VARS_TO_USE',array());
     session::set('LOCK_VARS_USED_GET'  , $LOCK_VARS_USED_GET);
     session::set('LOCK_VARS_USED_POST'  , $LOCK_VARS_USED_POST);
+    session::set('LOCK_VARS_USED_REQUEST'  , $LOCK_VARS_USED_REQUEST);
   }
 
   /* Prepare and show template */