From 8b26d86929898e4d7f1f570f095eb1d664f36815 Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Tue, 14 Jan 2003 10:22:30 +0000 Subject: [PATCH] added request parameter handling --- lib/dms.inc | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+), 0 deletions(-) diff --git a/lib/dms.inc b/lib/dms.inc index a2287f0..9d4c67d 100644 --- a/lib/dms.inc +++ b/lib/dms.inc @@ -11,6 +11,35 @@ * @package dmslib */ +/** + * Initialises the web application by making current + * request parameters global and loading the default language + */ +// make request parameters global +if (substr(phpversion(),0,5) >= "4.1.0") { + // if supported by the installed version of PHP + import_request_variables('pgc'); +} else { + // do it manually + if (!EMPTY($_POST)) { + extract($_POST); + } else { + extract($HTTP_POST_VARS); + } + + if (!EMPTY($_GET)) { + extract($_GET); + } else { + extract($HTTP_GET_VARS); + } + + if (!EMPTY($_FILE)) { + extract($_FILE); + } else { + extract($HTTP_POST_FILES); + } +} + // set default language if(isset($default->owl_lang)) { -- libgit2 0.21.4