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,33 +23,20 @@ class CORE_vars
var $f; var $f;
function CORE_vars() function CORE_vars()
{ {
if (phpversion() >= "4.1.0") if(isset($_GET) && count($_GET) > 0)
{
global $_GET, $_POST;
if(isset($_GET) && count($_GET) > 0)
{
reset ( $_GET );
while ( list ($key, $val) = each ( $_GET ) ) {
$newkey=ereg_replace ('amp;', '', $key );
$this->f["$newkey"] = $val;
}
reset ( $_GET );
}
if(isset($_POST) && count($_POST) > 0)
{
reset ( $_POST );
while ( list ($key, $val) = each ( $_POST ) ) $this->f["$key"] = $val;
reset ( $_POST );
}
}
else
{ {
global $HTTP_POST_VARS, $HTTP_GET_VARS; reset ( $_GET );
if(isset($HTTP_POST_VARS) && count($HTTP_POST_VARS) > 0) while ( list ($key, $val) = each ( $_GET ) ) {
$this->f = $HTTP_POST_VARS; $this->f["$key"] = $val;
elseif(isset($HTTP_GET_VARS) && count($HTTP_GET_VARS) > 0) }
$this->f = $HTTP_GET_VARS; reset ( $_GET );
} }
if(isset($_POST) && count($_POST) > 0)
{
reset ( $_POST );
while ( list ($key, $val) = each ( $_POST ) ) $this->f["$key"] = $val;
reset ( $_POST );
}
// set the shortcuts: // set the shortcuts:
if(!isset($this->f["_page"])) if(!isset($this->f["_page"]))
@ -92,4 +79,4 @@ class CORE_vars
} }
} }
} }
?> ?>