summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 25f9c77)
raw | patch | inline | side by side (parent: 25f9c77)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Jul 2010 09:44:08 +0000 (09:44 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Jul 2010 09:44:08 +0000 (09:44 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19102 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/functions.inc | patch | blob | history |
index 68b17919b6de0788ce7730a3ea7443de4b8a5ca2..c0af25616f106baecc84c51b72c457fe43faa76b 100644 (file)
@@ -2896,16 +2896,29 @@ function get_languages($languages_in_own_language = FALSE,$strip_region_tag = FA
* */
function get_post($name)
{
- if(!isset($_POST[$name])){
- trigger_error("Requested POST value (".$name.") does not exists, you should add a check to prevent this message.");
- return(FALSE);
- }
+ if(!isset($_POST[$name])){
+ trigger_error("Requested POST value (".$name.") does not exists, you should add a check to prevent this message.");
+ return(FALSE);
+ }
- if(get_magic_quotes_gpc()){
- $val = stripcslashes($_POST[$name]);
- }else{
- $val = $_POST[$name];
- }
+ // Handle Posted Arrays
+ $tmp = array();
+ if(is_array($_POST[$name]) && !is_string($_POST[$name])){
+ foreach($_POST[$name] as $key => $val){
+ if(get_magic_quotes_gpc()){
+ $val = stripcslashes($val);
+ }
+ $tmp[$key] = $val;
+ }
+ return($tmp);
+ }else{
+
+ if(get_magic_quotes_gpc()){
+ $val = stripcslashes($_POST[$name]);
+ }else{
+ $val = $_POST[$name];
+ }
+ }
return($val);
}