diff options
author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-09-06 13:01:35 +0000 |
---|---|---|
committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-09-06 13:01:35 +0000 |
commit | ac95afe73509dad324813c1abf1e9231c6cf9d59 (patch) | |
tree | 6c6c89d45d798aa68797ad2204844887f9e12168 /frontends/php/actionconf.php | |
parent | 5df979d2e2addb993d8b7b4b63a41997f2d3c1a7 (diff) | |
download | zabbix-ac95afe73509dad324813c1abf1e9231c6cf9d59.tar.gz zabbix-ac95afe73509dad324813c1abf1e9231c6cf9d59.tar.xz zabbix-ac95afe73509dad324813c1abf1e9231c6cf9d59.zip |
- merged rev. 4729:4730 of branches/1.4.j (Artem) [[NTT-14] fixed "Configuration->Action Can't do anything with actions" issue]
git-svn-id: svn://svn.zabbix.com/trunk@4732 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/actionconf.php')
-rw-r--r-- | frontends/php/actionconf.php | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/frontends/php/actionconf.php b/frontends/php/actionconf.php index a7ea548d..cc13eac5 100644 --- a/frontends/php/actionconf.php +++ b/frontends/php/actionconf.php @@ -231,13 +231,14 @@ include_once "include/page_header.php"; { global $USER_DETAILS; - if(count($nodes = get_accessible_nodes_by_user($USER_DETAILS,PERM_READ_WRITE,PERM_MODE_LT,PERM_RES_IDS_ARRAY,get_current_nodeid()))) + if(!count($nodes = get_accessible_nodes_by_user($USER_DETAILS,PERM_READ_WRITE,null,PERM_RES_IDS_ARRAY,get_current_nodeid()))) access_deny(); - - $result=DBselect('select distinct actionid from actions'. + + $query = 'select distinct actionid from actions'. ' where '.DBin_node('actionid',$nodes). - ' and actionid in ('.implode(',',$_REQUEST['g_actionid']).') ' - ); + ' and actionid in ('.implode(',',$_REQUEST['g_actionid']).') '; + + $result=DBselect($query); $actionids = array(); while($row=DBfetch($result)) @@ -256,13 +257,15 @@ include_once "include/page_header.php"; { global $USER_DETAILS; - if(count($nodes = get_accessible_nodes_by_user($USER_DETAILS,PERM_READ_WRITE,PERM_MODE_LT,PERM_RES_IDS_ARRAY,get_current_nodeid()))) + if(!count($nodes = get_accessible_nodes_by_user($USER_DETAILS,PERM_READ_WRITE,null,PERM_RES_IDS_ARRAY,get_current_nodeid()))) access_deny(); - $result=DBselect('select distinct actionid from actions'. + $query = 'select distinct actionid from actions'. ' where '.DBin_node('actionid',$nodes). - ' and actionid in ('.implode(',',$_REQUEST['g_actionid']).') ' - ); + ' and actionid in ('.implode(',',$_REQUEST['g_actionid']).') '; + + $result=DBselect($query); + $actionids = array(); while($row=DBfetch($result)) { @@ -280,7 +283,7 @@ include_once "include/page_header.php"; { global $USER_DETAILS; - if(count($nodes = get_accessible_nodes_by_user($USER_DETAILS,PERM_READ_WRITE,PERM_MODE_LT,PERM_RES_IDS_ARRAY,get_current_nodeid()))) + if(!count($nodes = get_accessible_nodes_by_user($USER_DETAILS,PERM_READ_WRITE,null,PERM_RES_IDS_ARRAY,get_current_nodeid()))) access_deny(); $result=DBselect('select distinct actionid from actions'. |