[libgdata] gd: Don't output empty department elements for gd:organization
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] gd: Don't output empty department elements for gd:organization
- Date: Sat, 20 Aug 2011 16:56:18 +0000 (UTC)
commit 23e7043ef1c8f6fc2d803ecf2ea0ac5b7d4706f2
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Aug 18 22:47:21 2011 +0100
gd: Don't output empty department elements for gd:organization
See: bgo#651451
gdata/gd/gdata-gd-organization.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdata/gd/gdata-gd-organization.c b/gdata/gd/gdata-gd-organization.c
index 0472f90..fe15d25 100644
--- a/gdata/gd/gdata-gd-organization.c
+++ b/gdata/gd/gdata-gd-organization.c
@@ -444,7 +444,7 @@ get_xml (GDataParsable *parsable, GString *xml_string)
gdata_parser_string_append_escaped (xml_string, "<gd:orgName>", priv->name, "</gd:orgName>");
if (priv->title != NULL)
gdata_parser_string_append_escaped (xml_string, "<gd:orgTitle>", priv->title, "</gd:orgTitle>");
- if (priv->department != NULL)
+ if (priv->department != NULL && *(priv->department) != '\0')
gdata_parser_string_append_escaped (xml_string, "<gd:orgDepartment>", priv->department, "</gd:orgDepartment>");
if (priv->job_description != NULL)
gdata_parser_string_append_escaped (xml_string, "<gd:orgJobDescription>", priv->job_description, "</gd:orgJobDescription>");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]