From abf8777b0afb96da78bd770baaf144f2cb93b3c1 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Fri, 24 Jul 2015 11:02:13 +0200 Subject: [PATCH] U4-6867 UmbracoLog wrongfully logs unPublish event with user ID 0 #U4-6867 Fixed Assignee: Unassigned --- src/Umbraco.Web/Editors/ContentController.cs | 4 ++-- src/Umbraco.Web/Editors/MediaController.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index 046a433d3a..6a1e81f493 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -535,8 +535,8 @@ namespace Umbraco.Web.Editors if (foundContent == null) HandleContentNotFound(id); - - Services.ContentService.UnPublish(foundContent); + + Services.ContentService.UnPublish(foundContent, Security.CurrentUser.Id); var content = Mapper.Map(foundContent); content.AddSuccessNotification(ui.Text("content", "unPublish"), ui.Text("speechBubbles", "contentUnpublished")); diff --git a/src/Umbraco.Web/Editors/MediaController.cs b/src/Umbraco.Web/Editors/MediaController.cs index 7f9d703763..b5318c04b3 100644 --- a/src/Umbraco.Web/Editors/MediaController.cs +++ b/src/Umbraco.Web/Editors/MediaController.cs @@ -337,7 +337,7 @@ namespace Umbraco.Web.Editors { var mediaService = ApplicationContext.Services.MediaService; var f = mediaService.CreateMedia(folder.Name, folder.ParentId, Constants.Conventions.MediaTypes.Folder); - mediaService.Save(f); + mediaService.Save(f, Security.CurrentUser.Id); return Mapper.Map(f); } @@ -404,7 +404,7 @@ namespace Umbraco.Web.Editors mediaType = Constants.Conventions.MediaTypes.Image; var mediaService = ApplicationContext.Services.MediaService; - var f = mediaService.CreateMedia(fileName, parentId, mediaType); + var f = mediaService.CreateMedia(fileName, parentId, mediaType, Security.CurrentUser.Id); var fileInfo = new FileInfo(file.LocalFileName); var fs = fileInfo.OpenReadWithRetry(); @@ -414,7 +414,7 @@ namespace Umbraco.Web.Editors f.SetValue(Constants.Conventions.Media.File, fileName, fs); } - mediaService.Save(f); + mediaService.Save(f, Security.CurrentUser.Id); } else {