Restored type check for NuCache status controller.
Added service located extension method for retrieving creator and writer name.
This commit is contained in:
@@ -28,6 +28,7 @@ namespace Umbraco.Web
|
||||
private static UmbracoContext UmbracoContext => Current.UmbracoContext;
|
||||
private static ISiteDomainHelper SiteDomainHelper => Current.Factory.GetInstance<ISiteDomainHelper>();
|
||||
private static IVariationContextAccessor VariationContextAccessor => Current.VariationContextAccessor;
|
||||
private static IUserService UserService => Current.Services.UserService;
|
||||
|
||||
#region IsComposedOf
|
||||
|
||||
@@ -795,6 +796,20 @@ namespace Umbraco.Web
|
||||
|
||||
#endregion
|
||||
|
||||
#region Writer and creator
|
||||
|
||||
public static string CreatorName(this IPublishedContent content)
|
||||
{
|
||||
return content.GetCreatorName(UserService);
|
||||
}
|
||||
|
||||
public static string WriterName(this IPublishedContent content)
|
||||
{
|
||||
return content.GetWriterName(UserService);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Url
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user