Merge origin/dev-v7-deploy into dev-v8-zbwip (builds)

This commit is contained in:
Stephan
2016-11-03 10:31:44 +01:00
412 changed files with 12532 additions and 5381 deletions

View File

@@ -6,7 +6,6 @@ using System.Xml;
using System.Xml.XPath;
using Umbraco.Core.Configuration;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.Xml;
using Umbraco.Web.Routing;
@@ -50,7 +49,6 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
_previewContent = new PreviewContent(_xmlStore, previewToken);
}
#region Unit Tests
// for INTERNAL, UNIT TESTS use ONLY
@@ -285,6 +283,13 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
return ConvertToDocument(GetXml(preview).GetElementById(nodeId.ToString(CultureInfo.InvariantCulture)), preview);
}
public override IPublishedContent GetById(bool preview, Guid nodeId)
{
// todo - implement in a more efficient way
const string xpath = "//* [@isDoc and @key=$guid]";
return GetSingleByXPath(preview, xpath, new [] { new XPathVariable("guid", nodeId.ToString()) });
}
public override bool HasById(bool preview, int contentId)
{
return GetXml(preview).CreateNavigator().MoveToId(contentId.ToString(CultureInfo.InvariantCulture));