From 4da027caebdac710d323f4cab0e1642bd1ec5a5b Mon Sep 17 00:00:00 2001 From: osmiy Date: Wed, 25 Oct 2006 13:13:02 +0000 Subject: - improved permission system for nondistributed system git-svn-id: svn://svn.zabbix.com/trunk@3381 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/config.inc.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'frontends/php/include/config.inc.php') diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index 48107e47..b4bc5364 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -31,9 +31,6 @@ function SDI($msg="SDI") { echo "DEBUG INFO: "; if(is_array($msg)) print_r($msg) $USER_RIGHTS = array(); $ERROR_MSG = array(); $INFO_MSG = array(); - - - $ZBX_LOCALNODEID = 1; // Local node // END OF GLOBALS // if magic quotes on then get rid of them @@ -85,6 +82,19 @@ function SDI($msg="SDI") { echo "DEBUG INFO: "; if(is_array($msg)) print_r($msg) include_once("include/classes/cserverinfo.mod.php"); include_once("include/classes/cflashclock.mod.php"); + /* Init LOCAL NODE ID */ + if($local_node_data = DBfetch(DBselect('select nodeid from nodes where nodetype=1 order by nodeid'))) + { + $ZBX_LOCALNODEID = $local_node_data['nodeid']; + define('ZBX_DISTRIBUTED', true); + } + else + { + $ZBX_LOCALNODEID = 0; + define('ZBX_DISTRIBUTED', false); + } + unset($local_node_data); + function access_deny() { include_once "include/page_header.php"; -- cgit