#19062: Removing the layerid from the method signiture and use the one posted back form the modal

--HG--
branch : 1.x
This commit is contained in:
nmayne@DRF00403.dr-foster.lan
2012-09-27 17:19:51 +01:00
parent bc0b377eec
commit 9f209ec243

View File

@@ -318,7 +318,7 @@ namespace Orchard.Widgets.Controllers {
[HttpPost, ActionName("EditWidget")]
[FormValueRequired("submit.Save")]
public ActionResult EditWidgetSavePOST(int id, int layerId, string returnUrl) {
public ActionResult EditWidgetSavePOST(int id, 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(layerId);
widgetPart.LayerPart = _widgetsService.GetLayer(widgetPart.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.