U4-8710 - from Umbraco.Field, GetPropertyValue to Value

This commit is contained in:
Stephan
2016-06-30 19:35:25 +02:00
parent 9332335dff
commit ffb30123cc
19 changed files with 115 additions and 156 deletions

View File

@@ -485,7 +485,7 @@ namespace Umbraco.Web.Routing
throw new InvalidOperationException("There is no PublishedContent.");
var redirect = false;
var internalRedirect = _pcr.PublishedContent.GetPropertyValue<string>(Constants.Conventions.Content.InternalRedirectId);
var internalRedirect = _pcr.PublishedContent.Value<string>(Constants.Conventions.Content.InternalRedirectId);
if (string.IsNullOrWhiteSpace(internalRedirect))
return false;
@@ -685,7 +685,7 @@ namespace Umbraco.Web.Routing
{
if (_pcr.HasPublishedContent == false) return;
var redirectId = _pcr.PublishedContent.GetPropertyValue(Constants.Conventions.Content.Redirect, -1);
var redirectId = _pcr.PublishedContent.Value(Constants.Conventions.Content.Redirect, -1);
var redirectUrl = "#";
if (redirectId > 0)
redirectUrl = _routingContext.UrlProvider.GetUrl(redirectId);