mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge
--HG-- branch : 1.x
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
//<![CDATA[
|
||||
(function ($) {
|
||||
// grab the slug input
|
||||
var slug = $("#Routable_Slug");
|
||||
var slug = $("#Autoroute_CurrentUrl");
|
||||
if (slug) {
|
||||
// grab the current culture
|
||||
var culture = $("#SelectedCulture");
|
||||
|
@@ -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, [Bind(Prefix = "WidgetPart.LayerId")] int layerId, string returnUrl) {
|
||||
if (!IsAuthorizedToManageWidgets())
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
|
@@ -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<ContentItemVersionRecord>();
|
||||
_itemVersionCriteria.SetCacheable(true).SetCacheRegion(_shellSettings.Name);
|
||||
_itemVersionCriteria.SetCacheable(true);
|
||||
}
|
||||
return _itemVersionCriteria;
|
||||
}
|
||||
|
Reference in New Issue
Block a user