mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-06-28 15:34:39 +08:00
Merge branch 'dev' into issue/8773
This commit is contained in:
commit
7b07ab9b3b
@ -1,26 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Core.Contents.Settings;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
using Orchard.Core.Navigation.Services;
|
||||
using Orchard.Core.Navigation.ViewModels;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc.Extensions;
|
||||
using Orchard.UI;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.UI.Navigation;
|
||||
using Orchard.Utility;
|
||||
using System;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Exceptions;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.Utility.Extensions;
|
||||
using Orchard.Mvc.Html;
|
||||
using Orchard.Core.Contents.Settings;
|
||||
using Orchard.Data;
|
||||
using System.Web.Routing;
|
||||
using Orchard.Exceptions;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Mvc.Extensions;
|
||||
using Orchard.Mvc.Html;
|
||||
using Orchard.UI;
|
||||
using Orchard.UI.Navigation;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.Utility;
|
||||
using Orchard.Utility.Extensions;
|
||||
|
||||
namespace Orchard.Core.Navigation.Controllers {
|
||||
[ValidateInput(false)]
|
||||
@ -249,13 +249,14 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("Edit")]
|
||||
[Mvc.FormValueRequired("submit.Save")]
|
||||
[Mvc.FormValueRequired("submit.Publish")]
|
||||
public ActionResult EditPOST(int id, string returnUrl) {
|
||||
return EditPOST(id, returnUrl, contentItem => {
|
||||
if (!contentItem.Has<IPublishingControlAspect>() && !contentItem.TypeDefinition.Settings.GetModel<ContentTypeSettings>().Draftable)
|
||||
_contentManager.Publish(contentItem);
|
||||
});
|
||||
}
|
||||
|
||||
private ActionResult EditPOST(int id, string returnUrl, Action<ContentItem> conditionallyPublish) {
|
||||
var contentItem = _contentManager.Get(id, VersionOptions.DraftRequired);
|
||||
|
||||
|
@ -40,7 +40,8 @@
|
||||
taxonomyFieldName: '@Model.FieldName',
|
||||
contentId: @Model.Id,
|
||||
culture: culture,
|
||||
selectedValues: selectedValues,
|
||||
selectedValues: selectedValues
|
||||
},
|
||||
success: function (html) {
|
||||
var container = $(".taxonomy-wrapper[data-id-prefix='@Taxonomyprefix']");
|
||||
|
||||
@ -211,3 +212,4 @@
|
||||
</script>
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,13 +240,19 @@ namespace Orchard.Data {
|
||||
if (tableIndex == fromIndex + 1
|
||||
|| parts[tableIndex - 1].Equals(",")) {
|
||||
|
||||
if (parts[tableIndex + 1].Equals("where", StringComparison.OrdinalIgnoreCase)) {
|
||||
// There is no alias in the query, so we add "WITH(NOLOCK)" immediately after table name but before the "where" clause.
|
||||
parts.Insert(tableIndex + 1, "WITH(NOLOCK)");
|
||||
} else {
|
||||
// We add "WITH(NOLOCK)" after the table alias.
|
||||
parts.Insert(tableIndex + 2, "WITH(NOLOCK)");
|
||||
}
|
||||
} else {
|
||||
// probably doing a join, so edit the next "on" and make it
|
||||
// "WITH (NOLOCK) on"
|
||||
for (int i = tableIndex + 1; i < whereIndex; i++) {
|
||||
if (parts[i].Trim().Equals("WITH(NOLOCK)", StringComparison.OrdinalIgnoreCase)) {
|
||||
// we processed this table anme already
|
||||
// we processed this table name already.
|
||||
break;
|
||||
}
|
||||
if (parts[i].Trim().Equals("on", StringComparison.OrdinalIgnoreCase)) {
|
||||
|
Loading…
Reference in New Issue
Block a user