mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-15 13:18:25 +08:00
Ambiguity in LocalizedTaxonomyController action names (#8785)
* Removed ambiguity to LocalizedTaxonomyController actions. * Properly added ApplyPreRequest to the action. * Code refactoring * Code autoformatting * Sorting using * Overriding GetTaxonomy action * Calling base GetTaxonomy action * Removing ApplyPreRequest function * Removed ApplyPreRequest function * Added virtual keyword to GetTaxonomy action in LocalizedTaxonomyController --------- Co-authored-by: Benedek Farkas <benedek.farkas@lombiq.com>
This commit is contained in:
parent
86bcf413e7
commit
fc8b681b4e
@ -1,5 +1,5 @@
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using Orchard.ContentManagement.MetaData;
|
using Orchard.ContentManagement.MetaData;
|
||||||
using Orchard.Environment.Extensions;
|
using Orchard.Environment.Extensions;
|
||||||
using Orchard.Localization.Services;
|
using Orchard.Localization.Services;
|
||||||
@ -25,10 +25,9 @@ namespace Orchard.Taxonomies.Controllers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[OutputCache(NoStore = true, Duration = 0)]
|
[OutputCache(NoStore = true, Duration = 0)]
|
||||||
public new ActionResult GetTaxonomy(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
|
public override ActionResult GetTaxonomy(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
|
||||||
AdminFilter.Apply(_requestContext);
|
AdminFilter.Apply(_requestContext);
|
||||||
|
return base.GetTaxonomy(contentTypeName, taxonomyFieldName, contentId, culture, selectedValues);
|
||||||
return GetTaxonomyInternal(contentTypeName, taxonomyFieldName, contentId, culture, selectedValues);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,11 +35,11 @@ namespace Orchard.Taxonomies.Controllers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[OutputCache(NoStore = true, Duration = 0)]
|
[OutputCache(NoStore = true, Duration = 0)]
|
||||||
public ActionResult GetTaxonomy(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
|
public virtual ActionResult GetTaxonomy(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
|
||||||
return GetTaxonomyInternal(contentTypeName, taxonomyFieldName, contentId, culture, selectedValues);
|
return GetTaxonomyInternal(contentTypeName, taxonomyFieldName, contentId, culture, selectedValues);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ActionResult GetTaxonomyInternal (string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
|
protected ActionResult GetTaxonomyInternal(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
|
||||||
var viewModel = new TaxonomyFieldViewModel();
|
var viewModel = new TaxonomyFieldViewModel();
|
||||||
bool autocomplete = false;
|
bool autocomplete = false;
|
||||||
var contentDefinition = _contentDefinitionManager.GetTypeDefinition(contentTypeName);
|
var contentDefinition = _contentDefinitionManager.GetTypeDefinition(contentTypeName);
|
||||||
|
Loading…
Reference in New Issue
Block a user