X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Frequest-functions.php;h=439e51bf61177ed41865c5382f0c7366b57f3f4a;hb=2379934be6a196a54f4155bb8e24c49b20736969;hp=86db766d4273a63ad71a3637c01d3c053db839c6;hpb=11a9294db20070dc0c2f578d3a91b69cc7c1182d;p=mailer.git diff --git a/inc/request-functions.php b/inc/request-functions.php index 86db766d42..439e51bf61 100644 --- a/inc/request-functions.php +++ b/inc/request-functions.php @@ -47,15 +47,15 @@ function initRequest () { } // Wrapper for elements in $_GET -function getRequestParameter ($element) { +function getRequestElement ($element) { // By default no element is there - $value = null; + $value = NULL; // Is the element cached or there? if (isset($GLOBALS['cache_request']['get'][$element])) { // Then use the cache $value = $GLOBALS['cache_request']['get'][$element]; - } elseif (isGetRequestParameterSet($element)) { + } elseif (isGetRequestElementSet($element)) { // Then get it directly $value = SQL_ESCAPE($GLOBALS['raw_request']['get'][$element]); @@ -68,7 +68,7 @@ function getRequestParameter ($element) { } // Checks if an element in $_GET exists -function isGetRequestParameterSet ($element, $subElement = '') { +function isGetRequestElementSet ($element, $subElement = '') { if (empty($subElement)) { return ((isset($GLOBALS['raw_request']['get'][$element])) && ('' . ($GLOBALS['raw_request']['get'][$element] . '') != '')); } else { @@ -77,7 +77,7 @@ function isGetRequestParameterSet ($element, $subElement = '') { } // Removes an element from $_GET -function unsetGetRequestParameter ($element) { +function unsetGetRequestElement ($element) { unset($GLOBALS['raw_request']['get'][$element]); } @@ -104,7 +104,7 @@ function countRequestGet () { } // Setter for element in $_GET -function setGetRequestParameter ($element, $value) { +function setGetRequestElement ($element, $value) { // Escape both $element = SQL_ESCAPE($element); $value = SQL_ESCAPE($value); @@ -117,20 +117,20 @@ function setGetRequestParameter ($element, $value) { } // Wrapper for elements in $_POST -function postRequestParameter ($element, $subElement=null) { +function postRequestElement ($element, $subElement=null) { // By default no element is there - $value = null; + $value = NULL; // Is the element in cache? if (isset($GLOBALS['cache_request']['post'][$element][$subElement])) { // Then use it $value = $GLOBALS['cache_request']['post'][$element][$subElement]; - } elseif (isPostRequestParameterSet($element)) { + } elseif (isPostRequestElementSet($element)) { // Then use it $value = $GLOBALS['raw_request']['post'][$element]; // Is $subElement set? - if ((!is_null($subElement)) && (isPostRequestParameterSet($element, $subElement))) { + if ((!is_null($subElement)) && (isPostRequestElementSet($element, $subElement))) { // Then use this $value = SQL_ESCAPE($value[$subElement]); } elseif (!is_array($value)) { @@ -147,7 +147,7 @@ function postRequestParameter ($element, $subElement=null) { } // Checks if an element in $_POST exists -function isPostRequestParameterSet ($element, $subElement=null) { +function isPostRequestElementSet ($element, $subElement=null) { if (is_null($subElement)) { return ((isset($GLOBALS['raw_request']['post'][$element])) && (('' . $GLOBALS['raw_request']['post'][$element] . '') != '')); } else { @@ -156,7 +156,7 @@ function isPostRequestParameterSet ($element, $subElement=null) { } // Removes an element from $_POST -function unsetPostRequestParameter ($element) { +function unsetPostRequestElement ($element) { unset($GLOBALS['raw_request']['post'][$element]); } @@ -188,7 +188,7 @@ function countRequestPost () { } // Setter for element in $_POST -function setPostRequestParameter ($element, $value) { +function setPostRequestElement ($element, $value) { // Is $element or $value an array? if (is_array($element)) { // Set array @@ -224,7 +224,7 @@ function setPostRequestParameter ($element, $value) { // Checks wether a form was sent. If so, the $_POST['ok'] element must be set function isFormSent ($requestParameter = 'ok') { // Simply wrap it! - return isPostRequestParameterSet($requestParameter); + return isPostRequestElementSet($requestParameter); } // Checks if 'content_type' is set