PublishedContent - use PublishedContentModelFactory in XmlPublishedCache
This commit is contained in:
@@ -338,7 +338,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
|
||||
if (parent == null) return;
|
||||
|
||||
if (parent.Name == "node" || (parent.Attributes != null && parent.Attributes.GetNamedItem("isDoc") != null))
|
||||
_parent = new XmlPublishedContent(parent, _isPreviewing, true);
|
||||
_parent = PublishedContentModelFactory.CreateModel(new XmlPublishedContent(parent, _isPreviewing, true));
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
@@ -439,7 +439,8 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
|
||||
expr.AddSort("@sortOrder", XmlSortOrder.Ascending, XmlCaseOrder.None, "", XmlDataType.Number);
|
||||
var iterator = nav.Select(expr);
|
||||
while (iterator.MoveNext())
|
||||
_children.Add(new XmlPublishedContent(((IHasXmlNode)iterator.Current).GetNode(), _isPreviewing, true));
|
||||
_children.Add(PublishedContentModelFactory.CreateModel(
|
||||
new XmlPublishedContent(((IHasXmlNode)iterator.Current).GetNode(), _isPreviewing, true)));
|
||||
|
||||
// warn: this is not thread-safe
|
||||
_childrenInitialized = true;
|
||||
|
||||
Reference in New Issue
Block a user