Skip to content

Commit

Permalink
Merge branch 'temp8' of https://github.com/umbraco/Umbraco-CMS into t…
Browse files Browse the repository at this point in the history
…emp8
  • Loading branch information
Warren Buckley committed Feb 13, 2019
2 parents 0176e2f + ac44823 commit 0a4502a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Umbraco.Web/Editors/ContentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,16 @@ public PagedResult<ContentItemBasic<ContentPropertyBasic>> GetChildren(
{
long totalChildren;
List<IContent> children;

// Sets the culture to the only existing culture if we only have one culture.
if (string.IsNullOrWhiteSpace(cultureName))
{
if (_allLangs.Value.Count == 1)
{
cultureName = _allLangs.Value.First().Key;
}
}

if (pageNumber > 0 && pageSize > 0)
{
IQuery<IContent> queryFilter = null;
Expand Down Expand Up @@ -1200,7 +1210,7 @@ private PublishResult PublishInternal(ContentItemSave contentItem, out bool wasC
if (canPublish)
{
var culturesToPublish = cultureVariants.Where(x => x.Publish).Select(x => x.Culture).ToArray();

//proceed to publish if all validation still succeeds
var publishStatus = Services.ContentService.SaveAndPublish(contentItem.PersistedContent, culturesToPublish, Security.CurrentUser.Id);
wasCancelled = publishStatus.Result == PublishResultType.FailedPublishCancelledByEvent;
Expand Down

0 comments on commit 0a4502a

Please sign in to comment.