]> git.mxchange.org Git - mailer.git/blobdiff - inc/request-functions.php
Extension ext-forced/network continued:
[mailer.git] / inc / request-functions.php
index 439e51bf61177ed41865c5382f0c7366b57f3f4a..353e24b4e8a6acba00e0c8fb770d44fd25022c0a 100644 (file)
@@ -17,7 +17,7 @@
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -117,7 +117,7 @@ function setGetRequestElement ($element, $value) {
 }
 
 // Wrapper for elements in $_POST
-function postRequestElement ($element, $subElement=null) {
+function postRequestElement ($element, $subElement = NULL) {
        // By default no element is there
        $value = NULL;
 
@@ -125,6 +125,7 @@ function postRequestElement ($element, $subElement=null) {
        if (isset($GLOBALS['cache_request']['post'][$element][$subElement])) {
                // Then use it
                $value = $GLOBALS['cache_request']['post'][$element][$subElement];
+               //* DEBUG: */ print $element.'/'.$subElement.'='.$value.'<br />';
        } elseif (isPostRequestElementSet($element)) {
                // Then use it
                $value = $GLOBALS['raw_request']['post'][$element];
@@ -133,12 +134,16 @@ function postRequestElement ($element, $subElement=null) {
                if ((!is_null($subElement)) && (isPostRequestElementSet($element, $subElement))) {
                        // Then use this
                        $value = SQL_ESCAPE($value[$subElement]);
+                       //* DEBUG: */ print 'sub!<br />';
                } elseif (!is_array($value)) {
                        // Escape it here
                        $value = SQL_ESCAPE($value);
+                       //* DEBUG: */ print 'no-array!<br />';
                }
 
                // Set it in cache
+               //* DEBUG: */ print $element.'/'.$subElement.'='.$value.'<br />';
+               //* DEBUG: */ print('<pre>'.print_r($_POST,true).'</pre>');
                $GLOBALS['cache_request']['post'][$element][$subElement] = $value;
        } // END - if
 
@@ -147,7 +152,7 @@ function postRequestElement ($element, $subElement=null) {
 }
 
 // Checks if an element in $_POST exists
-function isPostRequestElementSet ($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 {