@@ -48,7 +48,7 @@ Namespace Api
4848
4949# Region " Service Methods "
5050 <HttpPost()>
51- <BlogAuthorizeAttribute (SecurityAccessLevel.Owner Or SecurityAccessLevel.Admin)>
51+ <BlogAuthorize (SecurityAccessLevel.Owner Or SecurityAccessLevel.Admin)>
5252 <ValidateAntiForgeryToken()>
5353 <ActionName( "Export" )>
5454 Public Function ExportBlog(postData As BlogDTO) As HttpResponseMessage
@@ -61,8 +61,10 @@ Namespace Api
6161 Dim newBlogML As New BlogMLBlog
6262 newBlogML.Title = Blog.Title
6363 newBlogML.SubTitle = Blog.Description
64- newBlogML.Authors.Add( New BlogMLAuthor With {.Title = Blog.DisplayName})
6564 newBlogML.DateCreated = Blog.CreatedOnDate
65+ For Each author As PostAuthor In Core.Entities.Posts.PostsController.GetAuthors(Settings.ModuleId, Blog.BlogID)
66+ newBlogML.Authors.Add( New BlogMLAuthor With {.Title = author.DisplayName, .ID = author.UserID.ToString, .Email = author.Email})
67+ Next
6668 AddCategories(newBlogML)
6769 AddPosts(newBlogML)
6870 Dim blogMLFile As String = Date .Now.ToString( "yyyy-MM-dd" ) & "-" & Guid.NewGuid.ToString( "D" )
@@ -82,7 +84,7 @@ Namespace Api
8284# Region " Private Methods "
8385 Private Sub SetContext(data As BlogDTO)
8486 Blog = Core.Entities.Blogs.BlogsController.GetBlog(data.BlogId, UserInfo.UserID, Threading.Thread.CurrentThread.CurrentCulture.Name)
85- Settings = ModuleSettings.GetModuleSettings (ActiveModule.ModuleID )
87+ Settings = ModuleSettings.GetSettings (ActiveModule)
8688 End Sub
8789
8890 Private Sub AddCategories( ByRef TargetBlogML As BlogMLBlog)
@@ -122,7 +124,7 @@ Namespace Api
122124 For Each t As TermInfo In post.PostCategories
123125 newPostML.Categories.Add( New BlogMLCategoryReference With {.Ref = t.TermId.ToString})
124126 Next
125- newPostML.Authors.Add(post.DisplayName )
127+ newPostML.Authors.Add(post.CreatedByUserID.ToString() )
126128 newPostML.PostType = BlogML.BlogPostTypes.Normal
127129 newPostML.DateCreated = post.PublishedOnDate
128130 If Not String .IsNullOrEmpty(post.Summary) Then
@@ -142,6 +144,7 @@ Namespace Api
142144 newPostML.DisplayCopyright = post.DisplayCopyright
143145 newPostML.Copyright = post.Copyright
144146 newPostML.Locale = post.Locale
147+ newPostML.IsPublished = post.Published
145148
146149 ' pack files
147150 Dim postDir As String = Globals.GetPostDirectoryMapPath(post.BlogID, post.ContentItemId)
0 commit comments