]> git.mxchange.org Git - mailer.git/blobdiff - inc/request-functions.php
'order_points' and locked are now displayed, some array elements/language ids renamed
[mailer.git] / inc / request-functions.php
index 5a4f04621694f0c5c6a7ac858d722095d1bf786e..799d4e38dd120a16452d7442adbb2984618b50cb 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -42,8 +42,8 @@ if (!defined('__SECURITY')) {
 
 // Initialize the request elements
 function initRequest () {
-       $GLOBALS['raw_request']['get']  = $_GET;
-       $GLOBALS['raw_request']['post'] = $_POST;
+       $GLOBALS['raw_request']['get']  = (array) $_GET;
+       $GLOBALS['raw_request']['post'] = (array) $_POST;
 }
 
 // Wrapper for elements in $_GET
@@ -52,15 +52,15 @@ function getRequestParameter ($element) {
        $value = null;
 
        // Is the element cached or there?
-       if (isset($GLOBALS['cache_request']['request_get'][$element])) {
+       if (isset($GLOBALS['cache_request']['get'][$element])) {
                // Then use the cache
-               $value = $GLOBALS['cache_request']['request_get'][$element];
+               $value = $GLOBALS['cache_request']['get'][$element];
        } elseif (isGetRequestParameterSet($element)) {
                // Then get it directly
                $value = SQL_ESCAPE($GLOBALS['raw_request']['get'][$element]);
 
                // Store it in cache
-               $GLOBALS['cache_request']['request_get'][$element] = $value;
+               $GLOBALS['cache_request']['get'][$element] = $value;
        } // END - if
 
        // Return value
@@ -113,7 +113,7 @@ function setGetRequestParameter ($element, $value) {
        $GLOBALS['raw_request']['get'][$element] = $value;
 
        // Update cache
-       $GLOBALS['cache_request']['request_get'][$element] = $value;
+       $GLOBALS['cache_request']['get'][$element] = $value;
 }
 
 // Wrapper for elements in $_POST
@@ -122,9 +122,9 @@ function postRequestParameter ($element, $subElement=null) {
        $value = null;
 
        // Is the element in cache?
-       if (isset($GLOBALS['cache_request']['request_post'][$element][$subElement])) {
+       if (isset($GLOBALS['cache_request']['post'][$element][$subElement])) {
                // Then use it
-               $value = $GLOBALS['cache_request']['request_post'][$element][$subElement];
+               $value = $GLOBALS['cache_request']['post'][$element][$subElement];
        } elseif (isPostRequestParameterSet($element)) {
                // Then use it
                $value = $GLOBALS['raw_request']['post'][$element];
@@ -139,7 +139,7 @@ function postRequestParameter ($element, $subElement=null) {
                }
 
                // Set it in cache
-               $GLOBALS['cache_request']['request_post'][$element][$subElement] = $value;
+               $GLOBALS['cache_request']['post'][$element][$subElement] = $value;
        } // END - if
 
        // Return value
@@ -218,7 +218,7 @@ function setPostRequestParameter ($element, $value) {
        }
 
        // Update cache
-       $GLOBALS['cache_request']['request_post'][$element][null] = $value;
+       $GLOBALS['cache_request']['post'][$element][null] = $value;
 }
 
 // Checks wether a form was sent. If so, the $_POST['ok'] element must be set