提交 6a31d6eb 编写于 作者: N Nicolas De Loof

minor simplification

上级 b32d0e4f
......@@ -1005,19 +1005,13 @@ public class Functions {
Item i=p;
String url = "";
Collection<TopLevelItem> viewItems;
if (view != null) {
viewItems = view.getItems();
} else {
viewItems = Collections.emptyList();
}
while(true) {
ItemGroup ig = i.getParent();
url = i.getShortUrl()+url;
if(ig== Jenkins.getInstance() || (view != null && ig == view.getOwnerItemGroup())) {
assert i instanceof TopLevelItem;
if(viewItems.contains((TopLevelItem)i)) {
if (view.contains((TopLevelItem)i)) {
// if p and the current page belongs to the same view, then return a relative path
return normalizeURI(ancestors.get(view)+'/'+url);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册