mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
parent
9525bf9e09
commit
c6b6cb1a98
@ -248,14 +248,15 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
if (!Services.Authorizer.Authorize(Permissions.EditContent, contentItem, T("Couldn't create content")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
_contentManager.Create(contentItem, VersionOptions.Draft);
|
||||
|
||||
var model = _contentManager.UpdateEditor(contentItem, this);
|
||||
|
||||
if (!ModelState.IsValid) {
|
||||
_transactionManager.Cancel();
|
||||
return View(model);
|
||||
}
|
||||
|
||||
_contentManager.Create(contentItem, VersionOptions.Draft);
|
||||
|
||||
conditionallyPublish(contentItem);
|
||||
|
||||
Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName)
|
||||
|
Loading…
Reference in New Issue
Block a user