diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-11-27 08:23:17 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-11-27 08:23:17 +0000 |
| commit | aca8681143291c73222e57a159812c7f8b5d9e26 (patch) | |
| tree | f44ae25286a8245141b28d73ca9d88e7a76b9f05 /frontends/php/include/export.inc.php | |
| parent | 669427092313aed310e4174767ffbaf40d7613fe (diff) | |
| download | zabbix-aca8681143291c73222e57a159812c7f8b5d9e26.tar.gz zabbix-aca8681143291c73222e57a159812c7f8b5d9e26.tar.xz zabbix-aca8681143291c73222e57a159812c7f8b5d9e26.zip | |
- fixed export/import with large ids (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3523 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/export.inc.php')
| -rw-r--r-- | frontends/php/include/export.inc.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/frontends/php/include/export.inc.php b/frontends/php/include/export.inc.php index 9e21f616..73454901 100644 --- a/frontends/php/include/export.inc.php +++ b/frontends/php/include/export.inc.php @@ -283,14 +283,16 @@ zbx_xmlwriter_write_element ($memory, $xml_name, $data[$db_name]); } - zbx_xmlwriter_start_element ($memory,XML_TAG_GROUPS); - $db_groups = DBselect('select g.name from groups g, hosts_groups hg'. - ' where g.groupid=hg.groupid and hg.hostid='.$hostid); - while($group = DBfetch($db_groups)) + if($db_groups = DBselect('select g.name from groups g, hosts_groups hg'. + ' where g.groupid=hg.groupid and hg.hostid='.$hostid)) { - zbx_xmlwriter_write_element ($memory, XML_TAG_GROUP, $group['name']); + zbx_xmlwriter_start_element ($memory,XML_TAG_GROUPS); + while($group = DBfetch($db_groups)) + { + zbx_xmlwriter_write_element ($memory, XML_TAG_GROUP, $group['name']); + } + zbx_xmlwriter_end_element($memory); // XML_TAG_GROUP } - zbx_xmlwriter_end_element($memory); // XML_TAG_GROUP if($export_items) { |
