From 58aee2faa7ab32edcedaf68d346593de9ddb3cb6 Mon Sep 17 00:00:00 2001 From: artem Date: Wed, 19 Mar 2008 17:56:41 +0000 Subject: - [DEV-139] added transaction functionality to frontend (Artem) - many small fixes (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5505 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/discovery.inc.php | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'frontends/php/include/discovery.inc.php') diff --git a/frontends/php/include/discovery.inc.php b/frontends/php/include/discovery.inc.php index 10cd2565..673c9d40 100644 --- a/frontends/php/include/discovery.inc.php +++ b/frontends/php/include/discovery.inc.php @@ -21,27 +21,20 @@ ?> = USER_TYPE_ZABBIX_ADMIN ) - { - if ( 0 == count( - get_accessible_nodes_by_user($USER_DETAILS, $permission, null, PERM_RES_IDS_ARRAY, get_current_nodeid()) - )) + if( $USER_DETAILS['type'] >= USER_TYPE_ZABBIX_ADMIN ){ + if (0 < count(get_accessible_nodes_by_user($USER_DETAILS, $permission, null, PERM_RES_IDS_ARRAY, get_current_nodeid()))) return true; } - - return false; + return false; } - function svc_default_port($type_int) - { + function svc_default_port($type_int){ $port = 0; - switch($type_int) - { + switch($type_int){ case SVC_SSH: $port = 22; break; case SVC_LDAP: $port = 389; break; case SVC_SMTP: $port = 25; break; @@ -56,7 +49,7 @@ case SVC_SNMPv2:$port = 161; break; } - return $port; + return $port; } function discovery_check_type2str($type_int) -- cgit