mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#19062: Reverting change to fix the parameter binding
Work Item: 19062 --HG-- branch : 1.x
This commit is contained in:
@@ -318,7 +318,7 @@ namespace Orchard.Widgets.Controllers {
|
|||||||
|
|
||||||
[HttpPost, ActionName("EditWidget")]
|
[HttpPost, ActionName("EditWidget")]
|
||||||
[FormValueRequired("submit.Save")]
|
[FormValueRequired("submit.Save")]
|
||||||
public ActionResult EditWidgetSavePOST(int id, string returnUrl) {
|
public ActionResult EditWidgetSavePOST(int id, [Bind(Prefix = "WidgetPart.LayerId")] int layerId, string returnUrl) {
|
||||||
if (!IsAuthorizedToManageWidgets())
|
if (!IsAuthorizedToManageWidgets())
|
||||||
return new HttpUnauthorizedResult();
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ namespace Orchard.Widgets.Controllers {
|
|||||||
try {
|
try {
|
||||||
var model = Services.ContentManager.UpdateEditor(widgetPart, this);
|
var model = Services.ContentManager.UpdateEditor(widgetPart, this);
|
||||||
// override the CommonPart's persisting of the current container
|
// override the CommonPart's persisting of the current container
|
||||||
widgetPart.LayerPart = _widgetsService.GetLayer(widgetPart.LayerId);
|
widgetPart.LayerPart = _widgetsService.GetLayer(layerId);
|
||||||
if (!ModelState.IsValid) {
|
if (!ModelState.IsValid) {
|
||||||
Services.TransactionManager.Cancel();
|
Services.TransactionManager.Cancel();
|
||||||
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
|
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
|
||||||
|
Reference in New Issue
Block a user