mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Fixing General Settings update
--HG-- branch : dev
This commit is contained in:
@@ -64,22 +64,27 @@ namespace Orchard.Core.Settings.Controllers {
|
||||
var site = _siteService.GetSiteSettings();
|
||||
dynamic model = Services.ContentManager.UpdateEditor(site, this, groupInfoId);
|
||||
|
||||
if (model == null) {
|
||||
Services.TransactionManager.Cancel();
|
||||
return HttpNotFound();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(groupInfoId)) {
|
||||
if (model == null) {
|
||||
Services.TransactionManager.Cancel();
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
var groupInfo = Services.ContentManager.GetEditorGroupInfo(site, groupInfoId);
|
||||
if (groupInfo == null) {
|
||||
Services.TransactionManager.Cancel();
|
||||
return HttpNotFound();
|
||||
}
|
||||
var groupInfo = Services.ContentManager.GetEditorGroupInfo(site, groupInfoId);
|
||||
if (groupInfo == null) {
|
||||
Services.TransactionManager.Cancel();
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
if (!ModelState.IsValid) {
|
||||
Services.TransactionManager.Cancel();
|
||||
model.GroupInfo = groupInfo;
|
||||
|
||||
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
|
||||
if (!ModelState.IsValid) {
|
||||
Services.TransactionManager.Cancel();
|
||||
model.GroupInfo = groupInfo;
|
||||
|
||||
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
|
||||
return View((object) model);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return View((object)model);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user