diff --git a/src/Umbraco.Core/StringExtensions.cs b/src/Umbraco.Core/StringExtensions.cs index a463e36bff..13cb906786 100644 --- a/src/Umbraco.Core/StringExtensions.cs +++ b/src/Umbraco.Core/StringExtensions.cs @@ -907,7 +907,7 @@ namespace Umbraco.Core /// This allows you to replace strings like & , etc.. with your replacement character before the automatic /// reduction. /// - [UmbracoWillObsolete("This method should be removed. Use ToUrlSegment instead.")] + [Obsolete("This method should be removed. Use ToUrlSegment instead.")] public static string ToUrlAlias(this string value, IDictionary charReplacements, bool replaceDoubleDashes, bool stripNonAscii, bool urlEncode) { var helper = ShortStringHelper; @@ -931,7 +931,7 @@ namespace Umbraco.Core /// and UmbracoSettings.RemoveDoubleDashesFromUrlReplacing. /// Other helpers may use different parameters. /// - [UmbracoWillObsolete("This method should be removed. Use ToUrlSegment instead.")] + [Obsolete("This method should be removed. Use ToUrlSegment instead.")] public static string FormatUrl(this string url) { var helper = ShortStringHelper; @@ -1011,7 +1011,7 @@ namespace Umbraco.Core /// Indicates whether spaces should be removed. THIS PARAMETER IS IGNORED. /// The safe alias. /// CamelCase, and remove spaces, whatever the parameters. - [UmbracoWillObsolete("This method should be removed. Use ToSafeAlias instead.")] + [Obsolete("This method should be removed. Use ToSafeAlias instead.")] public static string ToUmbracoAlias(this string phrase, StringAliasCaseType caseType = StringAliasCaseType.CamelCase, bool removeSpaces = false) { var helper = ShortStringHelper; @@ -1056,7 +1056,7 @@ namespace Umbraco.Core /// This is the legacy method, so we can't really change it, although it has issues (see unit tests). /// It does more than "converting the case", and also remove spaces, etc. /// - [UmbracoWillObsolete("This method should be removed. Use CleanString instead.")] + [Obsolete("This method should be removed. Use CleanString instead.")] public static string ConvertCase(this string phrase, StringAliasCaseType cases) { var helper = ShortStringHelper; diff --git a/src/Umbraco.Tests/Services/ContentServiceTests.cs b/src/Umbraco.Tests/Services/ContentServiceTests.cs index f34a2a70eb..3c36f1c282 100644 --- a/src/Umbraco.Tests/Services/ContentServiceTests.cs +++ b/src/Umbraco.Tests/Services/ContentServiceTests.cs @@ -223,6 +223,27 @@ namespace Umbraco.Tests.Services Assert.That(content.WriterId, Is.EqualTo(user.Id)); } + [Test] + public void Can_Save_New_Content_With_Explicit_User() + { + var user = new User(ServiceContext.UserService.GetUserTypeByAlias("admin")) + { + Name = "Test", + Email = "test@test.com", + Username = "test", + Password = "test" + }; + ServiceContext.UserService.SaveUser(user); + var content = new Content("Test", -1, ServiceContext.ContentTypeService.GetContentType("umbTextpage")); + + // Act + ServiceContext.ContentService.Save(content, (int)user.Id); + + // Assert + Assert.That(content.CreatorId, Is.EqualTo(user.Id)); + Assert.That(content.WriterId, Is.EqualTo(user.Id)); + } + [Test] public void Cannot_Create_Content_With_Non_Existing_ContentType_Alias() { diff --git a/src/Umbraco.Web.UI/umbraco/developer/Xslt/xsltChooseExtension.aspx b/src/Umbraco.Web.UI/umbraco/developer/Xslt/xsltChooseExtension.aspx index a127ead2d5..2540c5290a 100644 --- a/src/Umbraco.Web.UI/umbraco/developer/Xslt/xsltChooseExtension.aspx +++ b/src/Umbraco.Web.UI/umbraco/developer/Xslt/xsltChooseExtension.aspx @@ -1,23 +1,22 @@ <%@ Page Language="c#" Codebehind="xsltChooseExtension.aspx.cs" MasterPageFile="../../masterpages/umbracoDialog.Master" AutoEventWireup="True" Inherits="umbraco.developer.xsltChooseExtension" %> - <%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> +<%@ Import Namespace="Umbraco.Web" %> <%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> +