From 9c78127237286480fbcc829c767e7c5273cbd0ba Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 17 Aug 2007 07:41:30 +0000 Subject: [PATCH] Moved get_post() method from setup to include, like it was done in stable. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7066 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/functions.inc | 16 ++++++++++++++++ setup/class_setup.inc | 14 -------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/include/functions.inc b/include/functions.inc index e7c063e55..dd95232d8 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -2439,5 +2439,21 @@ function get_languages($languages_in_own_language = FALSE,$strip_region_tag = FA return($ret); } + +/* 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