* -------------------------------------------------------------------- *
* 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 *
}
// Wrapper for elements in $_POST
-function postRequestElement ($element, $subElement=null) {
+function postRequestElement ($element, $subElement = NULL) {
// By default no element is there
$value = 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];
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
}
// 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 {