X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Ffunctions.inc;h=15df054ccbb5e41d94779cb75eae6378024a3243;hb=7b909c435f5ee1fce50143c279f92fc7ec5e73bb;hp=50a9318b10ef939889aff16d829b16e5fc42685f;hpb=63af277b3f94138e457a3f69edcf54e43be85a8c;p=gosa.git diff --git a/include/functions.inc b/include/functions.inc index 50a9318b1..15df054cc 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -2584,5 +2584,19 @@ function is_ip_range($ip1,$ip2) } } +/* Returns contents of the given POST variable and check magic quotes settings */ +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(get_magic_quotes_gpc()){ + return(stripcslashes($_POST[$name])); + }else{ + return($_POST[$name]); + } +} + // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>