summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/perm.inc.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-06-20 08:42:25 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-06-20 08:42:25 +0000
commit3f8cf5f0da75fa8312c173e9e2c1e1e843811091 (patch)
tree1cb9f4841cb20bc2fd65a696181e70cbdf2cfb88 /frontends/php/include/perm.inc.php
parent2804bdc7c298f114802a93d7c3312370c8602ba0 (diff)
downloadzabbix-3f8cf5f0da75fa8312c173e9e2c1e1e843811091.tar.gz
zabbix-3f8cf5f0da75fa8312c173e9e2c1e1e843811091.tar.xz
zabbix-3f8cf5f0da75fa8312c173e9e2c1e1e843811091.zip
- [DEV-137] changes in users profile system (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5782 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/perm.inc.php')
-rw-r--r--frontends/php/include/perm.inc.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/frontends/php/include/perm.inc.php b/frontends/php/include/perm.inc.php
index 17299831..65bcf4c1 100644
--- a/frontends/php/include/perm.inc.php
+++ b/frontends/php/include/perm.inc.php
@@ -399,8 +399,9 @@ COpt::counter_up('perm');
function get_accessible_nodes_by_user(&$user_data,$perm,$perm_res=null,$nodeid=null){
global $ZBX_LOCALNODEID, $ZBX_NODES_IDS;
-
+
if(is_null($nodeid)) $nodeid = $ZBX_NODES_IDS;
+ if(!is_array($nodeid)) $nodeid = array($nodeid);
if(is_null($perm_res)) $perm_res=PERM_RES_STRING_LINE;
$userid =& $user_data['userid'];
@@ -414,7 +415,7 @@ function get_accessible_nodes_by_user(&$user_data,$perm,$perm_res=null,$nodeid=n
//COpt::counter_up('perm');
if(USER_TYPE_SUPER_ADMIN == $user_type){
- $nodes = DBselect('SELECT nodeid FROM nodes WHERE '.DBcondition('nodeid',$nodeid));
+ $nodes = DBselect('SELECT nodeid FROM nodes WHERE '.DBcondition('nodeid', $nodeid));
while($node = DBfetch($nodes)){
$node_data[$node['nodeid']] = $node;
$node_data[$node['nodeid']]['permission'] = PERM_READ_WRITE;