mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#19205: Fixing bug where menu items with same texts and urls, but under different parents, were treated as equal and merged into one.
Work Item: 19205 --HG-- branch : 1.x
This commit is contained in:
@@ -36,6 +36,18 @@ namespace Orchard.UI.Navigation {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(x.Position) && !string.IsNullOrWhiteSpace(y.Position)) {
|
||||
var xLastDot = x.Position.LastIndexOf('.');
|
||||
var yLastDot = y.Position.LastIndexOf('.');
|
||||
var xParentPosition = xLastDot == -1 ? null : x.Position.Substring(0, xLastDot);
|
||||
var yParentPosition = yLastDot == -1 ? null : y.Position.Substring(0, yLastDot);
|
||||
|
||||
if (!string.Equals(xParentPosition, yParentPosition))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user