Commit 8b26d86929898e4d7f1f570f095eb1d664f36815

Authored by Michael Joseph
1 parent 7da89b58

added request parameter handling


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@163 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 29 additions and 0 deletions
lib/dms.inc
@@ -11,6 +11,35 @@ @@ -11,6 +11,35 @@
11 * @package dmslib 11 * @package dmslib
12 */ 12 */
13 13
  14 +/**
  15 + * Initialises the web application by making current
  16 + * request parameters global and loading the default language
  17 + */
  18 +// make request parameters global
  19 +if (substr(phpversion(),0,5) >= "4.1.0") {
  20 + // if supported by the installed version of PHP
  21 + import_request_variables('pgc');
  22 +} else {
  23 + // do it manually
  24 + if (!EMPTY($_POST)) {
  25 + extract($_POST);
  26 + } else {
  27 + extract($HTTP_POST_VARS);
  28 + }
  29 +
  30 + if (!EMPTY($_GET)) {
  31 + extract($_GET);
  32 + } else {
  33 + extract($HTTP_GET_VARS);
  34 + }
  35 +
  36 + if (!EMPTY($_FILE)) {
  37 + extract($_FILE);
  38 + } else {
  39 + extract($HTTP_POST_FILES);
  40 + }
  41 +}
  42 +
14 // set default language 43 // set default language
15 if(isset($default->owl_lang)) { 44 if(isset($default->owl_lang)) {
16 45