Skip to content

Commit

Permalink
SAK-44057 Improve entitybroker DHS getCurrentLocationReference (sakai…
Browse files Browse the repository at this point in the history
…project#8430)

There is no need to get the site here, as the transformation from
a site id (context) to a site reference is a simple string manipulation
for which SiteService already has a method.
  • Loading branch information
smarquard authored Aug 6, 2020
1 parent 69e08c5 commit 53ac39c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,7 @@ public String getCurrentLocationReference() {
String location = null;
try {
String context = toolManager.getCurrentPlacement().getContext();
Site s = siteService.getSite( context );
location = s.getReference(); // get the entity reference to the site
location = siteService.siteReference(context); // get the entity reference to the site
} catch (Exception e) {
// sakai failed to get us a location so we can assume we are not inside the portal
location = null;
Expand Down Expand Up @@ -550,4 +549,4 @@ public void setThreadLocalManager(ThreadLocalManager threadLocalManager) {
this.threadLocalManager = threadLocalManager;
}

}
}

0 comments on commit 53ac39c

Please sign in to comment.