Merge branch 'v8/dev' into v8/feature/284-content-type-repo
This commit is contained in:
@@ -533,7 +533,7 @@ namespace Umbraco.Core.Services.Implement
|
||||
//null check otherwise we get exceptions
|
||||
if (content.Path.IsNullOrWhiteSpace()) return Enumerable.Empty<IContent>();
|
||||
|
||||
var rootId = Constants.System.Root.ToInvariantString();
|
||||
var rootId = Constants.System.RootString;
|
||||
var ids = content.Path.Split(',')
|
||||
.Where(x => x != rootId && x != content.Id.ToString(CultureInfo.InvariantCulture)).Select(int.Parse).ToArray();
|
||||
if (ids.Any() == false)
|
||||
@@ -1922,7 +1922,7 @@ namespace Umbraco.Core.Services.Implement
|
||||
// if uow is not immediate, content.Path will be updated only when the UOW commits,
|
||||
// and because we want it now, we have to calculate it by ourselves
|
||||
//paths[content.Id] = content.Path;
|
||||
paths[content.Id] = (parent == null ? (parentId == Constants.System.RecycleBinContent ? "-1,-20" : "-1") : parent.Path) + "," + content.Id;
|
||||
paths[content.Id] = (parent == null ? (parentId == Constants.System.RecycleBinContent ? "-1,-20" : Constants.System.RootString) : parent.Path) + "," + content.Id;
|
||||
|
||||
const int pageSize = 500;
|
||||
var page = 0;
|
||||
|
||||
@@ -184,8 +184,12 @@ namespace Umbraco.Core.Services.Implement
|
||||
//now load in supplementary
|
||||
var found = _supplementFileSources.Where(x =>
|
||||
{
|
||||
var fileName = Path.GetFileName(x.File.FullName);
|
||||
return fileName.InvariantStartsWith(culture.Name) && fileName.InvariantEndsWith(".xml");
|
||||
var extension = Path.GetExtension(x.File.FullName);
|
||||
var fileCultureName = Path.GetFileNameWithoutExtension(x.File.FullName).Replace("_", "-").Replace(".user", "");
|
||||
return extension.InvariantEquals(".xml") && (
|
||||
fileCultureName.InvariantEquals(culture.Name)
|
||||
|| fileCultureName.InvariantEquals(culture.TwoLetterISOLanguageName)
|
||||
);
|
||||
});
|
||||
|
||||
foreach (var supplementaryFile in found)
|
||||
@@ -203,7 +207,7 @@ namespace Umbraco.Core.Services.Implement
|
||||
continue;
|
||||
}
|
||||
|
||||
if (xChildDoc.Root == null) continue;
|
||||
if (xChildDoc.Root == null || xChildDoc.Root.Name != "language") continue;
|
||||
foreach (var xArea in xChildDoc.Root.Elements("area")
|
||||
.Where(x => ((string)x.Attribute("alias")).IsNullOrWhiteSpace() == false))
|
||||
{
|
||||
|
||||
@@ -995,7 +995,7 @@ namespace Umbraco.Core.Services.Implement
|
||||
// if uow is not immediate, content.Path will be updated only when the UOW commits,
|
||||
// and because we want it now, we have to calculate it by ourselves
|
||||
//paths[media.Id] = media.Path;
|
||||
paths[media.Id] = (parent == null ? (parentId == Constants.System.RecycleBinMedia ? "-1,-21" : "-1") : parent.Path) + "," + media.Id;
|
||||
paths[media.Id] = (parent == null ? (parentId == Constants.System.RecycleBinMedia ? "-1,-21" : Constants.System.RootString) : parent.Path) + "," + media.Id;
|
||||
|
||||
const int pageSize = 500;
|
||||
var page = 0;
|
||||
|
||||
Reference in New Issue
Block a user