From 7b909c435f5ee1fce50143c279f92fc7ec5e73bb Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 9 Aug 2007 10:31:42 +0000 Subject: [PATCH] Moved get_post function from setup to include.inc This function seems to be usefull outside setup too. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7025 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/functions.inc | 14 ++++++++++++++ setup/class_setup.inc | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) 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: ?> diff --git a/setup/class_setup.inc b/setup/class_setup.inc index 9fd17ee2f..753751c52 100644 --- a/setup/class_setup.inc +++ b/setup/class_setup.inc @@ -19,20 +19,6 @@ */ -/* 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]); - } -} - require_once("class_setupStep.inc"); -- 2.30.2