summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/export.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-05-02 10:54:58 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-05-02 10:54:58 +0000
commit296a14631b8eac246ea609433e5d08c590e834a1 (patch)
treeea1fa134f1bd940214a689e8a1c627e0f15cdd57 /frontends/php/include/export.inc.php
parent83934fff62629f5942accbb249b0e8c2ebae7e70 (diff)
downloadzabbix-296a14631b8eac246ea609433e5d08c590e834a1.tar.gz
zabbix-296a14631b8eac246ea609433e5d08c590e834a1.tar.xz
zabbix-296a14631b8eac246ea609433e5d08c590e834a1.zip
- added exporting of applications and valuemap linkage (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@4079 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/export.inc.php')
-rw-r--r--frontends/php/include/export.inc.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/frontends/php/include/export.inc.php b/frontends/php/include/export.inc.php
index f9ff5ac9..1c3acb81 100644
--- a/frontends/php/include/export.inc.php
+++ b/frontends/php/include/export.inc.php
@@ -170,6 +170,23 @@
if(empty($xml_name)) $xml_name = $db_name;
zbx_xmlwriter_write_element ($memory, $xml_name, $data[$db_name]);
}
+
+ if( !empty($data['valuemapid']) && $valuemap = DBfetch(DBselect('select name from valuemaps where valuemapid='.$data['valuemapid'])))
+ {
+ zbx_xmlwriter_write_element($memory, 'valuemap', $valuemap['name']);
+ }
+
+ $db_applications=DBselect('select distinct a.name from applications a,items_applications ia '.
+ ' where ia.applicationid=a.applicationid and ia.itemid='.$itemid);
+ if ($application = DBfetch($db_applications))
+ {
+ zbx_xmlwriter_start_element ($memory,XML_TAG_APPLICATIONS);
+ do {
+ zbx_xmlwriter_write_element ($memory, XML_TAG_APPLICATION, $application['name']);
+ } while($application = DBfetch($db_applications));
+ zbx_xmlwriter_end_element($memory); // XML_TAG_APPLICATIONS
+ }
+
zbx_xmlwriter_end_element($memory); // XML_TAG_ITEM
}