summaryrefslogtreecommitdiffstats
path: root/frontends/php/setup.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-01-11 13:54:33 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-01-11 13:54:33 +0000
commitac2149cc84f98db84b0aada5f0cc90b5f0a4d049 (patch)
tree5223b4899b4f3dd2c4b78fa8b5153b03e381039a /frontends/php/setup.php
parent3e0875c1bde2417cbe4914a5335f24ab0abfe184 (diff)
downloadzabbix-ac2149cc84f98db84b0aada5f0cc90b5f0a4d049.tar.gz
zabbix-ac2149cc84f98db84b0aada5f0cc90b5f0a4d049.tar.xz
zabbix-ac2149cc84f98db84b0aada5f0cc90b5f0a4d049.zip
- 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/setup.php')
-rw-r--r--frontends/php/setup.php15
1 files changed, 5 insertions, 10 deletions
diff --git a/frontends/php/setup.php b/frontends/php/setup.php
index 2de96d18..c99e5b4e 100644
--- a/frontends/php/setup.php
+++ b/frontends/php/setup.php
@@ -61,21 +61,16 @@
check_fields($fields, false);
?>
<?php
- global $ZBX_CONFIG, $_COOKIE;
-
- $ZBX_CONFIG = array();
+ global $ZBX_CONFIG;
if(isset($_REQUEST['cancel']) || isset($_REQUEST['finish']))
{
- setcookie('ZBX_CONFIG', null, time()-3600); /* NOTE: don't use zbx_setcookie */
- unset($_COOKIE['ZBX_CONFIG']);
+ zbx_unsetcookie('ZBX_CONFIG');
Redirect('index.php');
}
- if(isset($_COOKIE['ZBX_CONFIG']))
- {
- $ZBX_CONFIG = unserialize($_COOKIE['ZBX_CONFIG']);
- }
+ $ZBX_CONFIG = get_cookie('ZBX_CONFIG', null);
+ $ZBX_CONFIG = isset($ZBX_CONFIG) ? unserialize($ZBX_CONFIG) : array();
if(!isset($ZBX_CONFIG['step'])) $ZBX_CONFIG['step'] = 0;
if(!isset($ZBX_CONFIG['agree'])) $ZBX_CONFIG['agree'] = false;
@@ -110,7 +105,7 @@
$ZBX_SETUP_WIZARD = new CSetupWizard($ZBX_CONFIG);
- zbx_setcookie('ZBX_CONFIG', serialize($ZBX_CONFIG), time()+3600);
+ zbx_set_post_cookie('ZBX_CONFIG', serialize($ZBX_CONFIG));
include_once "include/page_header.php";