Fixes issue with showing the recycle bin menu

This commit is contained in:
Shannon
2013-07-11 17:04:30 +10:00
parent e7a00adff4
commit 824b5ad5a4
2 changed files with 11 additions and 4 deletions

View File

@@ -56,8 +56,15 @@ namespace Umbraco.Web.Trees
var parentId = queryStrings.GetRequiredString("parentId");
var tree = GetTree(queryStrings);
var rootIds = new[]
{
Core.Constants.System.Root.ToString(CultureInfo.InvariantCulture),
Core.Constants.System.RecycleBinContent.ToString(CultureInfo.InvariantCulture),
Core.Constants.System.RecycleBinMedia.ToString(CultureInfo.InvariantCulture)
};
//if the id and the parentId are both -1 then we need to get the menu for the root node
if (id == "-1" && parentId == "-1")
if (rootIds.Contains(id) && parentId == "-1")
{
var attempt = tree.TryGetMenuFromLegacyTreeRootNode(queryStrings, Url);
if (attempt.Success == false)

View File

@@ -48,10 +48,10 @@ namespace Umbraco.Web.Trees
public string Icon { get; set; }
/// <summary>
/// The action to execute when the menu item is clicked. This is generally a route path.
/// The view to render when the menu item is clicked. This is generally a route path.
/// </summary>
[DataMember(Name = "action")]
public string Action { get; set; }
[DataMember(Name = "view")]
public string View { get; set; }
}