Better handling of unpublished items during XML generation

[TFS Changeset #64962]
This commit is contained in:
slace
2010-03-24 22:06:15 +00:00
parent 9ccfa19907
commit 968d043489

View File

@@ -1152,7 +1152,15 @@ namespace umbraco.cms.businesslogic.web
var c = Children;
foreach (Document d in c)
{
x.AppendChild(d.ToXml(xd, true));
XmlNode xml = d.ToXml(xd, true);
if (xml != null)
{
x.AppendChild(xml);
}
else
{
Log.Add(LogTypes.System, d.Id, "Document not published so XML cannot be generated");
}
}
}