mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Adding missing dynamic object casts.
--HG-- branch : 1.x
This commit is contained in:
@@ -79,7 +79,8 @@ namespace Orchard.Blogs.Controllers {
|
||||
|
||||
if (!ModelState.IsValid) {
|
||||
Services.TransactionManager.Cancel();
|
||||
return View(model);
|
||||
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
|
||||
return View((object)model);
|
||||
}
|
||||
|
||||
conditionallyPublish(blogPost.ContentItem);
|
||||
@@ -151,7 +152,8 @@ namespace Orchard.Blogs.Controllers {
|
||||
var model = Services.ContentManager.UpdateEditor(blogPost, this);
|
||||
if (!ModelState.IsValid) {
|
||||
Services.TransactionManager.Cancel();
|
||||
return View(model);
|
||||
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
|
||||
return View((object)model);
|
||||
}
|
||||
|
||||
conditionallyPublish(blogPost.ContentItem);
|
||||
|
@@ -72,7 +72,8 @@ namespace Orchard.Experimental.Controllers {
|
||||
// get at the first input?
|
||||
model.Fieldsets[0][0].Attributes(new {autofocus = "autofocus"}); // <-- could be applied by some other behavior - need to be able to modify attributes instead of clobbering them like this
|
||||
|
||||
return View(model);
|
||||
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
|
||||
return View((object)model);
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("FormShapes")]
|
||||
@@ -104,7 +105,8 @@ namespace Orchard.Experimental.Controllers {
|
||||
ViewBag.Page.Messages.Add(new HtmlString("<hr/>abuse<hr/>"));
|
||||
ViewBag.Page.Messages.Add("<hr/>encoded<hr/>");
|
||||
|
||||
return View(model);
|
||||
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
|
||||
return View((object)model);
|
||||
}
|
||||
|
||||
public static string Break(dynamic view) {
|
||||
|
@@ -134,7 +134,8 @@ namespace Orchard.Widgets.Controllers {
|
||||
var model = Services.ContentManager.UpdateEditor(widgetPart, this);
|
||||
if (!ModelState.IsValid) {
|
||||
Services.TransactionManager.Cancel();
|
||||
return View(model);
|
||||
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
|
||||
return View((object)model);
|
||||
}
|
||||
|
||||
Services.Notifier.Information(T("Your {0} has been created.", widgetPart.TypeDefinition.DisplayName));
|
||||
@@ -179,7 +180,8 @@ namespace Orchard.Widgets.Controllers {
|
||||
|
||||
if (!ModelState.IsValid) {
|
||||
Services.TransactionManager.Cancel();
|
||||
return View(model);
|
||||
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
|
||||
return View((object)model);
|
||||
}
|
||||
|
||||
Services.Notifier.Information(T("Your {0} has been created.", layerPart.TypeDefinition.DisplayName));
|
||||
@@ -226,7 +228,8 @@ namespace Orchard.Widgets.Controllers {
|
||||
|
||||
if (!ModelState.IsValid) {
|
||||
Services.TransactionManager.Cancel();
|
||||
return View(model);
|
||||
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
|
||||
return View((object)model);
|
||||
}
|
||||
|
||||
Services.Notifier.Information(T("Your {0} has been saved.", layerPart.TypeDefinition.DisplayName));
|
||||
@@ -297,7 +300,8 @@ namespace Orchard.Widgets.Controllers {
|
||||
var model = Services.ContentManager.UpdateEditor(widgetPart, this);
|
||||
if (!ModelState.IsValid) {
|
||||
Services.TransactionManager.Cancel();
|
||||
return View(model);
|
||||
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
|
||||
return View((object)model);
|
||||
}
|
||||
|
||||
Services.Notifier.Information(T("Your {0} has been saved.", widgetPart.TypeDefinition.DisplayName));
|
||||
|
Reference in New Issue
Block a user