From 7fcd924de38d902d191abcbb513da525cba641ba Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Thu, 27 Sep 2012 10:09:20 -0700 Subject: [PATCH] #19062: Reverting change to fix the parameter binding Work Item: 19062 --HG-- branch : 1.x --- .../Modules/Orchard.Widgets/Controllers/AdminController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs index b2b146f07..d2614c248 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs @@ -318,7 +318,7 @@ namespace Orchard.Widgets.Controllers { [HttpPost, ActionName("EditWidget")] [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()) return new HttpUnauthorizedResult(); @@ -329,7 +329,7 @@ namespace Orchard.Widgets.Controllers { try { var model = Services.ContentManager.UpdateEditor(widgetPart, this); // override the CommonPart's persisting of the current container - widgetPart.LayerPart = _widgetsService.GetLayer(widgetPart.LayerId); + widgetPart.LayerPart = _widgetsService.GetLayer(layerId); if (!ModelState.IsValid) { Services.TransactionManager.Cancel(); // Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.