diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-12-07 13:45:29 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-12-07 13:45:29 +0000 |
| commit | 9d01e6f52cd54727a3337df573e7043ad779fb06 (patch) | |
| tree | bd25db58eab3f97e4415c33085024cc31341b141 /frontends/php/include/forms.inc.php | |
| parent | b93508c7b63e89efd30a1a6c304f2eea27388244 (diff) | |
| download | zabbix-9d01e6f52cd54727a3337df573e7043ad779fb06.tar.gz zabbix-9d01e6f52cd54727a3337df573e7043ad779fb06.tar.xz zabbix-9d01e6f52cd54727a3337df573e7043ad779fb06.zip | |
- improved sqlite3 supporting for zabbix frontend (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3573 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/forms.inc.php')
| -rw-r--r-- | frontends/php/include/forms.inc.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php index fa28d98b..48401b9c 100644 --- a/frontends/php/include/forms.inc.php +++ b/frontends/php/include/forms.inc.php @@ -463,18 +463,21 @@ $group_rights = array(); $sqls = array( - 'select r.*i,n.name as name from rights r, nodes n where r.groupid='.$_REQUEST["usrgrpid"]. + 'select r.*,n.name as name from rights r, nodes n where r.groupid='.$_REQUEST["usrgrpid"]. ' and r.type='.RESOURCE_TYPE_NODE.' and r.id=n.nodeid', - 'select r.*i, CONCAT(n.name,":",g.name) as name from rights r, groups g, nodes n'. - ' where r.groupid='.$_REQUEST["usrgrpid"].' and n.nodeid='.DBid2nodeid('g.groupid'). - ' and r.type='.RESOURCE_TYPE_GROUP.' and r.id=g.groupid', - + 'select r.*, n.name as node_name, g.name as name from groups g '. + ' left join rights r on r.type='.RESOURCE_TYPE_GROUP.' and r.id=g.groupid '. + ' left join nodes n on n.nodeid='.DBid2nodeid('g.groupid'). + ' where r.groupid='.$_REQUEST["usrgrpid"], ); foreach($sqls as $sql) { $db_rights = DBselect($sql); while($db_right = DBfetch($db_rights)) { + if(isset($db_right['node_name'])) + $db_right['name'] = $db_right['node_name'].':'.$db_right['name']; + $group_rights[$db_right['name']] = array( 'type' => $db_right['type'], 'permission' => $db_right['permission'], |
