From 20405d27186040dc559c45f64b8a0e2540e8a8bb Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 22 Feb 2006 10:34:28 +0000 Subject: [PATCH] Added new lock to users / ogroups git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2721 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_plugin.inc | 2 ++ include/functions.inc | 3 ++- plugins/admin/ogroups/class_ogroupManagement.inc | 6 ++++-- plugins/admin/users/class_userManagement.inc | 9 +++++++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/include/class_plugin.inc b/include/class_plugin.inc index d3064e4d1..7d65a04b2 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -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 */ diff --git a/include/functions.inc b/include/functions.inc index 828060870..a7695a017 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -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]; } diff --git a/plugins/admin/ogroups/class_ogroupManagement.inc b/plugins/admin/ogroups/class_ogroupManagement.inc index d848dd856..ed4489d30 100644 --- a/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/plugins/admin/ogroups/class_ogroupManagement.inc @@ -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(); diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index 88936bd50..172ae9bf2 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -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 -- 2.30.2