diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-01-11 13:54:33 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-01-11 13:54:33 +0000 |
| commit | ac2149cc84f98db84b0aada5f0cc90b5f0a4d049 (patch) | |
| tree | 5223b4899b4f3dd2c4b78fa8b5153b03e381039a /frontends/php/include/defines.inc.php | |
| parent | 3e0875c1bde2417cbe4914a5335f24ab0abfe184 (diff) | |
- fixed conflict with cookies of other products (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3693 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/defines.inc.php')
| -rw-r--r-- | frontends/php/include/defines.inc.php | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php index 08712ad4..f81680b9 100644 --- a/frontends/php/include/defines.inc.php +++ b/frontends/php/include/defines.inc.php @@ -292,11 +292,29 @@ define("ZBX_NODE_LOCAL", 1); define("ZBX_NODE_MASTER", 2); + define("BR", "<br/>\n"); + define("SPACE", " "); + define("RARR", "⇒"); + + global $_GET, $_POST, $_COOKIE, $_REQUEST; + /* Support for PHP5. PHP5 does not have $HTTP_..._VARS */ if (!function_exists('version_compare')) { - $_REQUEST = $HTTP_GET_VARS; - $_POST = $HTTP_POST_VARS; - $_COOKIE = $HTTP_COOKIE_VARS; + $_GET = $HTTP_GET_VARS; + $_POST = $HTTP_POST_VARS; + $_COOKIE = $HTTP_COOKIE_VARS; + } + +/* if magic quotes on then get rid of them */ + if (get_magic_quotes_gpc()) { + $_GET = zbx_stripslashes($_GET); + $_POST = zbx_stripslashes($_POST); + $_COOKIE = zbx_stripslashes($_COOKIE); } + +/* init $_REQUEST */ + ini_set('variables_order', 'GP'); + $_REQUEST = $_POST + $_GET; + ?> |
