Merging r5332 r5336:5338 r5341 r5349 from http://svn.mannlib.cornell.edu/svn/vitro/branches/nihvivo-rel-1.1-maint
This commit is contained in:
parent
ea03604dc5
commit
4bfeadf3ad
8 changed files with 48 additions and 14 deletions
|
@ -106,7 +106,8 @@ public class UrlBuilder {
|
|||
|
||||
public String getHomeUrl() {
|
||||
String rootBreadCrumbUrl = portal.getRootBreadCrumbURL();
|
||||
return StringUtils.isEmpty(rootBreadCrumbUrl) ? contextPath : rootBreadCrumbUrl;
|
||||
String path = StringUtils.isEmpty(rootBreadCrumbUrl) ? "" : rootBreadCrumbUrl;
|
||||
return getUrl(path);
|
||||
}
|
||||
|
||||
public String getLogoutUrl() {
|
||||
|
@ -155,10 +156,12 @@ public class UrlBuilder {
|
|||
/********** Static utility methods **********/
|
||||
|
||||
public static String getUrl(String path) {
|
||||
if ( ! path.startsWith("/") ) {
|
||||
|
||||
if ( !path.isEmpty() && !path.startsWith("/") ) {
|
||||
path = "/" + path;
|
||||
}
|
||||
return contextPath + path;
|
||||
path = contextPath + path;
|
||||
return path.isEmpty() ? "/" : path;
|
||||
}
|
||||
|
||||
public static String getUrl(String path, Params params) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue