summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/config.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-10-25 13:13:02 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-10-25 13:13:02 +0000
commit4da027caebdac710d323f4cab0e1642bd1ec5a5b (patch)
treef3f2b2878f929da0825b9ee47f529515ff6a925d /frontends/php/include/config.inc.php
parentd23332dbc5dabb29dfec400d2d9ba782b46b5615 (diff)
downloadzabbix-4da027caebdac710d323f4cab0e1642bd1ec5a5b.tar.gz
zabbix-4da027caebdac710d323f4cab0e1642bd1ec5a5b.tar.xz
zabbix-4da027caebdac710d323f4cab0e1642bd1ec5a5b.zip
- improved permission system for nondistributed system
git-svn-id: svn://svn.zabbix.com/trunk@3381 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/config.inc.php')
-rw-r--r--frontends/php/include/config.inc.php16
1 files changed, 13 insertions, 3 deletions
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";