diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-03-19 17:56:41 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-03-19 17:56:41 +0000 |
| commit | 58aee2faa7ab32edcedaf68d346593de9ddb3cb6 (patch) | |
| tree | 703f8e4d30b297df78d6123e4186045d4020c32f /frontends/php/include/discovery.inc.php | |
| parent | 8777958dc979627061016a85ad846507edf395e6 (diff) | |
| download | zabbix-58aee2faa7ab32edcedaf68d346593de9ddb3cb6.tar.gz zabbix-58aee2faa7ab32edcedaf68d346593de9ddb3cb6.tar.xz zabbix-58aee2faa7ab32edcedaf68d346593de9ddb3cb6.zip | |
- [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
Diffstat (limited to 'frontends/php/include/discovery.inc.php')
| -rw-r--r-- | frontends/php/include/discovery.inc.php | 21 |
1 files changed, 7 insertions, 14 deletions
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 @@ ?> <?php - function check_right_on_discovery($permission) - { + function check_right_on_discovery($permission){ global $USER_DETAILS; - 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()) - )) + 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) |
