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/scripts_exec.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'frontends/php/scripts_exec.php') diff --git a/frontends/php/scripts_exec.php b/frontends/php/scripts_exec.php index c20f0ac5..279ecbd7 100644 --- a/frontends/php/scripts_exec.php +++ b/frontends/php/scripts_exec.php @@ -46,7 +46,7 @@ check_fields($fields); if(isset($_REQUEST['execute'])){ if($script = get_script_by_scriptid($_REQUEST['scriptid'])){ if($script['host_access'] == SCRIPT_HOST_ACCESS_WRITE){ - $hosts_read_write = explode(',',get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_WRITE,null,null,null,$_REQUEST['hostid'])); + $hosts_read_write = explode(',',get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_WRITE)); if(uint_in_array($_REQUEST['hostid'],$hosts_read_write)){ //SDI('WRITE: '.$_REQUEST['scriptid'].' : '.$_REQUEST['hostid']); @@ -55,8 +55,9 @@ if(isset($_REQUEST['execute'])){ insert_command_result_form($_REQUEST['scriptid'],$_REQUEST['hostid']); /* echo nl2br(htmlspecialchars($result));*/ } - } else { - $hosts_read_only = explode(',',get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,null,null,null,$_REQUEST['hostid'])); + } + else { + $hosts_read_only = explode(',',get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY)); if(uint_in_array($_REQUEST['hostid'],$hosts_read_only)){ //SDI('READ: '.$_REQUEST['scriptid'].' : '.$_REQUEST['hostid']); -- cgit