]> git.mxchange.org Git - mailer.git/blobdiff - inc/request-functions.php
Fixes for stripped HTML tags, and false warnings in debug log
[mailer.git] / inc / request-functions.php
index 0066994f26757168c63a4fbe8aef21bde6e2f150..839a2ffe71a3a0269cdc5a87a856f01f9ee81460 100644 (file)
@@ -42,10 +42,16 @@ function REQUEST_GET ($element) {
        // By default no element is there
        $value = null;
 
-       // Is the element there?
-       if (REQUEST_ISSET_GET($element)) {
-               // Then use it
-               $value = $_GET[$element];
+       // Is the element cached or there?
+       if (isset($GLOBALS['cache_array']['request_get'][$element])) {
+               // Then use the cache
+               $value = $GLOBALS['cache_array']['request_get'][$element];
+       } elseif (REQUEST_ISSET_GET($element)) {
+               // Then get it directly
+               $value = SQL_ESCAPE($_GET[$element]);
+
+               // Store it in cache
+               $GLOBALS['cache_array']['request_get'][$element] = $value;
        } // END - if
 
        // Return value
@@ -54,7 +60,7 @@ function REQUEST_GET ($element) {
 
 // Checks if an element in $_GET exists
 function REQUEST_ISSET_GET ($element) {
-       return (isset($_GET['element']));
+       return (isset($_GET[$element]));
 }
 
 // Removes an element from $_GET
@@ -101,7 +107,7 @@ function REQUEST_POST ($element) {
 
 // Checks if an element in $_POST exists
 function REQUEST_ISSET_POST ($element) {
-       return (isset($_POST['element']));
+       return (isset($_POST[$element]));
 }
 
 // Removes an element from $_POST