mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-24 13:33:34 +08:00
Hooking up create BlogPost and some other service changes to make sure getting posts is scoped to Blog.
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4042128
This commit is contained in:
@@ -4,6 +4,7 @@ using Orchard.Blogs.Extensions;
|
||||
using Orchard.Blogs.Models;
|
||||
using Orchard.Blogs.Services;
|
||||
using Orchard.Blogs.ViewModels;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Models;
|
||||
@@ -56,13 +57,13 @@ namespace Orchard.Blogs.Controllers {
|
||||
if (!ModelState.IsValid)
|
||||
return View(model);
|
||||
|
||||
Blog blog = _blogService.CreateBlog(model.ToCreateBlogParams());
|
||||
Blog blog = _blogService.Create(model.ToCreateBlogParams());
|
||||
|
||||
//TEMP: (erikpo) ensure information has committed for this record
|
||||
var session = _sessionLocator.For(typeof(BlogRecord));
|
||||
session.Flush();
|
||||
|
||||
return Redirect(Url.BlogEdit(model.Slug));
|
||||
return Redirect(Url.BlogEdit(blog.As<RoutableAspect>().Slug));
|
||||
}
|
||||
|
||||
public ActionResult Edit(string blogSlug) {
|
||||
|
Reference in New Issue
Block a user