Changed to only using _POST and _GET superglobals in CORE_vars.

This commit is contained in:
anubis 2009-01-04 21:24:53 -05:00
parent 36aaa16e4c
commit 2e4fa74af1

View File

@ -23,15 +23,11 @@ class CORE_vars
var $f; var $f;
function CORE_vars() function CORE_vars()
{ {
if (phpversion() >= "4.1.0")
{
global $_GET, $_POST;
if(isset($_GET) && count($_GET) > 0) if(isset($_GET) && count($_GET) > 0)
{ {
reset ( $_GET ); reset ( $_GET );
while ( list ($key, $val) = each ( $_GET ) ) { while ( list ($key, $val) = each ( $_GET ) ) {
$newkey=ereg_replace ('amp;', '', $key ); $this->f["$key"] = $val;
$this->f["$newkey"] = $val;
} }
reset ( $_GET ); reset ( $_GET );
} }
@ -41,15 +37,6 @@ class CORE_vars
while ( list ($key, $val) = each ( $_POST ) ) $this->f["$key"] = $val; while ( list ($key, $val) = each ( $_POST ) ) $this->f["$key"] = $val;
reset ( $_POST ); reset ( $_POST );
} }
}
else
{
global $HTTP_POST_VARS, $HTTP_GET_VARS;
if(isset($HTTP_POST_VARS) && count($HTTP_POST_VARS) > 0)
$this->f = $HTTP_POST_VARS;
elseif(isset($HTTP_GET_VARS) && count($HTTP_GET_VARS) > 0)
$this->f = $HTTP_GET_VARS;
}
// set the shortcuts: // set the shortcuts:
if(!isset($this->f["_page"])) if(!isset($this->f["_page"]))