Code

Added new lock to users / ogroups
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Feb 2006 10:34:28 +0000 (10:34 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Feb 2006 10:34:28 +0000 (10:34 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2721 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_plugin.inc
include/functions.inc
plugins/admin/ogroups/class_ogroupManagement.inc
plugins/admin/users/class_userManagement.inc

index d3064e4d13264ba098ce6b6eda287857605d0f49..7d65a04b2665a5f795a6667fd79e45b0106dca66 100644 (file)
@@ -200,6 +200,8 @@ class plugin
   {
     # This one is empty currently. Fabian - please fill in the docu code
     $_SESSION['current_class_for_help'] = get_class($this);
+    /* Reset Lock message POST/GET check array, to prevent perg_match errors*/
+    $_SESSION['LOCK_VARS_TO_USE'] =array();
   }
 
   /* remove object from parent */
index 828060870486fcff6adcf2b7bbc13d572f776af4..a7695a01744376076f803b212f935a993e50b49e 100644 (file)
@@ -1009,7 +1009,8 @@ function gen_locked_message($user, $dn)
     $_SESSION['LOCK_VARS_USED']  =array();
     foreach($_SESSION['LOCK_VARS_TO_USE'] as $name){
 
-      foreach($_POST as $Pname => $Pvalue){
+      if(empty($name)) continue;
+       foreach($_POST as $Pname => $Pvalue){
         if(preg_match($name,$Pname)){
           $_SESSION['LOCK_VARS_USED'][$Pname] = $_POST[$Pname];
         }
index d848dd856069dc554ec9a0cf7dba60fe7588f8e4..ed4489d30420a8f62af7b00def5012b010937fb1 100644 (file)
@@ -70,8 +70,10 @@ class ogroupManagement extends plugin
 
   function execute()
   {
-       /* Call parent execute */
-       plugin::execute();
+         /* Call parent execute */
+         plugin::execute();
+
+    $_SESSION['LOCK_VARS_TO_USE'] = array("/^act$/","/^id$/","/^group_edit_/","/^group_del_/");
 
     /* Prepare template */
     $smarty= get_smarty();
index 88936bd503a44fca137274790f3a877074bdd5c7..172ae9bf2759248c64157ebb54af363ee668972e 100644 (file)
@@ -40,6 +40,7 @@ class userManagement extends plugin
     $this->config= $config;
     $this->ui= $ui;
 
+
     /* Get global filter config */
     if (!isset($_SESSION["userfilter"])){
       $base= get_base_from_people($ui->dn);
@@ -59,8 +60,12 @@ class userManagement extends plugin
 
   function execute()
   {
-       /* Call parent execute */
-       plugin::execute();
+    /* Call parent execute */
+    plugin::execute();
+
+    /* LOCK  MESSAGE Vars */
+    $_SESSION['LOCK_VARS_TO_USE'] = array("/^act$/","/^id$/","/^user_edit_/","/^user_del_/");
+
 
     $smarty       = get_smarty();             // Smarty instance
     $userfilter   = get_global("userfilter"); // contains Filter Settings