Fixes plugin mgr to not resolve types that shouldn't be resolved. Fixes mntp legacy editor to not throw exceptions when initializing because the legacy tree no longer exists. Fixes authentication when an invalid cookie is detected.
This commit is contained in:
@@ -10,6 +10,7 @@ using System.Xml.Linq;
|
||||
using ClientDependency.Core;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.IO;
|
||||
using umbraco.BusinessLogic;
|
||||
using umbraco.cms.presentation.Trees;
|
||||
using umbraco.controls.Images;
|
||||
using umbraco.controls.Tree;
|
||||
@@ -45,7 +46,15 @@ namespace umbraco.editorControls.MultiNodeTreePicker
|
||||
//need to add our tree definitions to the collection.
|
||||
|
||||
//find the content tree to duplicate
|
||||
var contentTree = TreeDefinitionCollection.Instance.Single(x => string.Equals(x.Tree.Alias, Umbraco.Core.Constants.Applications.Content, StringComparison.OrdinalIgnoreCase));
|
||||
var contentTree = TreeDefinitionCollection.Instance.SingleOrDefault(x => string.Equals(x.Tree.Alias, Umbraco.Core.Constants.Applications.Content, StringComparison.OrdinalIgnoreCase));
|
||||
//have put this here because the legacy content tree no longer exists as a tree def
|
||||
if (contentTree == null)
|
||||
{
|
||||
contentTree = new TreeDefinition(
|
||||
typeof (loadContent),
|
||||
new ApplicationTree(false, true, 0, "content", "content", "Content", ".sprTreeFolder", ".sprTreeFolder_o", "", typeof (loadContent).GetFullNameWithAssembly(), ""),
|
||||
new Application("Content", "content", "content"));
|
||||
}
|
||||
var filteredContentTree = new TreeDefinition(typeof(FilteredContentTree),
|
||||
new umbraco.BusinessLogic.ApplicationTree(true, false, 0,
|
||||
contentTree.Tree.ApplicationAlias,
|
||||
@@ -59,7 +68,15 @@ namespace umbraco.editorControls.MultiNodeTreePicker
|
||||
contentTree.App);
|
||||
|
||||
//find the media tree to duplicate
|
||||
var mediaTree = TreeDefinitionCollection.Instance.Single(x => string.Equals(x.Tree.Alias, Umbraco.Core.Constants.Applications.Media, StringComparison.OrdinalIgnoreCase));
|
||||
var mediaTree = TreeDefinitionCollection.Instance.SingleOrDefault(x => string.Equals(x.Tree.Alias, Umbraco.Core.Constants.Applications.Media, StringComparison.OrdinalIgnoreCase));
|
||||
//have put this here because the legacy content tree no longer exists as a tree def
|
||||
if (mediaTree == null)
|
||||
{
|
||||
mediaTree = new TreeDefinition(
|
||||
typeof(loadMedia),
|
||||
new ApplicationTree(false, true, 0, "media", "media", "Media", ".sprTreeFolder", ".sprTreeFolder_o", "", typeof(loadMedia).GetFullNameWithAssembly(), ""),
|
||||
new Application("Media", "media", "media"));
|
||||
}
|
||||
var filteredMediaTree = new TreeDefinition(typeof(FilteredMediaTree),
|
||||
new umbraco.BusinessLogic.ApplicationTree(true, false, 0,
|
||||
mediaTree.Tree.ApplicationAlias,
|
||||
|
||||
Reference in New Issue
Block a user