summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/config.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-12-11 10:03:32 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-12-11 10:03:32 +0000
commite6e07c8326c0082b8edf4924c166aaadbd99cdef (patch)
treea0ea4db63f8f6cb16e015c6ee8a3829a7430216a /frontends/php/include/config.inc.php
parentd977bea9e417e2272264157e5db82d79fbbc10f4 (diff)
- improved installation wizard with permissions (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3584 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/config.inc.php')
-rw-r--r--frontends/php/include/config.inc.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index 11c55f6f..29d4b453 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -94,13 +94,15 @@ function VDP($var, $msg=null) { echo "DEBUG DUMP: "; if(isset($msg)) echo '"'.$m
set_error_handler('zbx_err_handler');
- global $ZBX_LOCALNODEID, $ZBX_CONFIGURATION_FILE, $DB_TYPE, $DB_SERVER, $DB_DATABASE, $DB_USER, $DB_PASSWORD;
+ global $_COOKIE, $ZBX_LOCALNODEID, $ZBX_CONFIGURATION_FILE, $DB_TYPE, $DB_SERVER, $DB_DATABASE, $DB_USER, $DB_PASSWORD;
$ZBX_LOCALNODEID = 0;
$ZBX_CONFIGURATION_FILE = './conf/zabbix.conf.php';
- if(file_exists($ZBX_CONFIGURATION_FILE))
+ $ZBX_CONFIGURATION_FILE = realpath(dirname($ZBX_CONFIGURATION_FILE)).'/'.basename($ZBX_CONFIGURATION_FILE);
+
+ if(file_exists($ZBX_CONFIGURATION_FILE) && !isset($_COOKIE['ZBX_CONFIG']))
{
include $ZBX_CONFIGURATION_FILE;
@@ -139,11 +141,6 @@ function VDP($var, $msg=null) { echo "DEBUG DUMP: "; if(isset($msg)) echo '"'.$m
$show_setup = true;
}
- if(isset($_COOKIE['ZBX_CONFIG']))
- {
- $show_setup = true;
- }
-
if(isset($show_setup))
{
unset($show_setup);
@@ -200,6 +197,13 @@ function VDP($var, $msg=null) { echo "DEBUG DUMP: "; if(isset($msg)) echo '"'.$m
array_push($ZBX_MESSAGES, array('type' => 'error', 'message' => $msg));
}
+ function clear_messages()
+ {
+ global $ZBX_MESSAGES;
+
+ $ZBX_MESSAGES = null;
+ }
+
function &asort_by_key(&$array, $key)
{
if(!is_array($array)) {