From 9f209ec243e6bb7bbbbc124b8cd4be77e2cd8d8e Mon Sep 17 00:00:00 2001 From: "nmayne@DRF00403.dr-foster.lan" Date: Thu, 27 Sep 2012 17:19:51 +0100 Subject: [PATCH 1/4] #19062: Removing the layerid from the method signiture and use the one posted back form the modal --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 6912d26d9..b2b146f07 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, 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. From 7fcd924de38d902d191abcbb513da525cba641ba Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Thu, 27 Sep 2012 10:09:20 -0700 Subject: [PATCH 2/4] #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. From f45db4da7dff5e98057ede7727ce2fa25af88ca4 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Thu, 27 Sep 2012 11:03:16 -0700 Subject: [PATCH 3/4] #19034: Fixing javascript meant for Routable Work Item: 19034 --HG-- branch : 1.x --- .../Modules/Orchard.Localization/Views/Admin/Translate.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.Localization/Views/Admin/Translate.cshtml b/src/Orchard.Web/Modules/Orchard.Localization/Views/Admin/Translate.cshtml index 5b835c7ee..2667162cf 100644 --- a/src/Orchard.Web/Modules/Orchard.Localization/Views/Admin/Translate.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Localization/Views/Admin/Translate.cshtml @@ -16,7 +16,7 @@ // Date: Thu, 27 Sep 2012 11:06:10 -0700 Subject: [PATCH 4/4] Removing SetCacheRegion as the cache prefix is defined in the session factory --HG-- branch : 1.x --- src/Orchard/ContentManagement/DefaultContentQuery.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Orchard/ContentManagement/DefaultContentQuery.cs b/src/Orchard/ContentManagement/DefaultContentQuery.cs index 60511c856..7857f08c9 100644 --- a/src/Orchard/ContentManagement/DefaultContentQuery.cs +++ b/src/Orchard/ContentManagement/DefaultContentQuery.cs @@ -16,14 +16,12 @@ using Orchard.Utility.Extensions; namespace Orchard.ContentManagement { public class DefaultContentQuery : IContentQuery { private readonly ISessionLocator _sessionLocator; - private readonly ShellSettings _shellSettings; private ISession _session; private ICriteria _itemVersionCriteria; private VersionOptions _versionOptions; - public DefaultContentQuery(IContentManager contentManager, ISessionLocator sessionLocator, ShellSettings shellSettings) { + public DefaultContentQuery(IContentManager contentManager, ISessionLocator sessionLocator) { _sessionLocator = sessionLocator; - _shellSettings = shellSettings; ContentManager = contentManager; } @@ -54,7 +52,7 @@ namespace Orchard.ContentManagement { ICriteria BindItemVersionCriteria() { if (_itemVersionCriteria == null) { _itemVersionCriteria = BindSession().CreateCriteria(); - _itemVersionCriteria.SetCacheable(true).SetCacheRegion(_shellSettings.Name); + _itemVersionCriteria.SetCacheable(true); } return _itemVersionCriteria; }