|
From: MW <jo...@us...> - 2008-02-09 19:32:59
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6145/includes Modified Files: mx_functions_core.php Log Message: Be explicite about what we return in wrapper request_vars class bool functions. Should be true:false really but don't think all code is ready to handle that Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** mx_functions_core.php 9 Feb 2008 12:34:09 -0000 1.68 --- mx_functions_core.php 9 Feb 2008 19:32:55 -0000 1.69 *************** *** 3750,3754 **** global $HTTP_POST_VARS; // Note: _x and _y are used by (at least IE) to return the mouse position at onclick of INPUT TYPE="img" elements. ! return ( isset($HTTP_POST_VARS[$var]) || ( isset($HTTP_POST_VARS[$var.'_x']) && isset($HTTP_POST_VARS[$var.'_y']) ) ); } --- 3750,3754 ---- global $HTTP_POST_VARS; // Note: _x and _y are used by (at least IE) to return the mouse position at onclick of INPUT TYPE="img" elements. ! return (isset($HTTP_POST_VARS[$var]) || ( isset($HTTP_POST_VARS[$var.'_x']) && isset($HTTP_POST_VARS[$var.'_y']))) ? 1 : 0; } *************** *** 3765,3769 **** { global $HTTP_GET_VARS; ! return ( isset($HTTP_GET_VARS[$var]) ); } --- 3765,3769 ---- { global $HTTP_GET_VARS; ! return isset($HTTP_GET_VARS[$var]) ? 1 : 0 ; } *************** *** 3779,3783 **** function is_request($var) { ! return ( $this->is_get($var) || $this->is_post($var) ); } /** --- 3779,3783 ---- function is_request($var) { ! return ($this->is_get($var) || $this->is_post($var)) ? 1 : 0; } /** *************** *** 3793,3802 **** function is_empty_post($var) { ! global $HTTP_POST_VARS; ! // Note: _x and _y are used by (at least IE) to return the mouse position at onclick of INPUT TYPE="img" elements. ! if ( isset($HTTP_POST_VARS[$var]) || ( isset($HTTP_POST_VARS[$var.'_x']) && isset($HTTP_POST_VARS[$var.'_y']))) { $tmp = $this->_read($var, MX_TYPE_POST_VARS); ! return empty($tmp); } return true; --- 3793,3800 ---- function is_empty_post($var) { ! if ( $this->is_post($var)) { $tmp = $this->_read($var, MX_TYPE_POST_VARS); ! return empty($tmp) ? 1 : 0; } return true; *************** *** 3814,3822 **** function is_empty_get($var) { ! global $HTTP_GET_VARS; ! if ( isset($HTTP_GET_VARS[$var]) ) { $tmp = $this->_read($var, MX_TYPE_GET_VARS); ! return empty($tmp); } return true; --- 3812,3819 ---- function is_empty_get($var) { ! if ($this->is_get($var)) { $tmp = $this->_read($var, MX_TYPE_GET_VARS); ! return empty($tmp) ? 1 : 0; } return true; *************** *** 3834,3841 **** function is_empty_request($var) { ! return ( $this->is_empty_get($var) && $this->is_empty_post($var) ); } - } // class mx_request_vars ?> \ No newline at end of file --- 3831,3837 ---- function is_empty_request($var) { ! return ($this->is_empty_get($var) && $this->is_empty_post($var)) ? 1 : 0; } } // class mx_request_vars ?> \ No newline at end of file |