mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-26 12:03:16 +08:00
Taxonomies: Fixing that TaxonomiesLocalizationExtensions caused Terms to be saved as Draft when changing their Weight, fixes #8273
This commit is contained in:
committed by
Benedek Farkas
parent
ac11024be4
commit
5815a2b9fa
@@ -1,4 +1,4 @@
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.Data;
|
||||
using Orchard.Environment.Configuration;
|
||||
@@ -65,11 +65,11 @@ namespace Orchard.Taxonomies.Services {
|
||||
}
|
||||
|
||||
protected override void PublishTerm(TermPart term) {
|
||||
// only publish the term if it was published already
|
||||
if (term.ContentItem.IsPublished()) {
|
||||
// Only publish the Term if it was published already.
|
||||
if (term.ContentItem.HasPublished() && !term.ContentItem.IsPublished()) {
|
||||
var contentItem = _contentManager.Get(term.ContentItem.Id, VersionOptions.DraftRequired);
|
||||
_contentManager.Publish(contentItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user