From: hickert Date: Thu, 27 Aug 2009 05:51:20 +0000 (+0000) Subject: Updated lock handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c7ce835ef689103c537e755559b00129cf0ef825;p=gosa.git Updated lock handling -Include $_REQUEST in re-post variables. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14146 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/html/main.php b/gosa-core/html/main.php index b7a8271d8..e002b9339 100644 --- a/gosa-core/html/main.php +++ b/gosa-core/html/main.php @@ -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; + } + } } } diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index 52b3235c5..ddd00c55a 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -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."); } diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index b0d14045a..f6626a8ac 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -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 */