提交 3e9c7327 编写于 作者: J Jesse Glick

Revert "minor simplification"

This reverts commit 6a31d6eb.
上级 d61965be
......@@ -1005,13 +1005,19 @@ 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 (view.contains((TopLevelItem)i)) {
if(viewItems.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.
先完成此消息的编辑!
想要评论请 注册