Skip to content

Commit

Permalink
LPD-32570 SF, move variable declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
ling-alan-huang authored and brianchandotcom committed Aug 6, 2024
1 parent 7b1011c commit 7f697e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ public static OrderByComparator<SiteNavigationMenu> getOrderByComparator(
}

if (orderByCol.equals("create-date")) {
oreturn
new SiteNavigationMenuCreateDateComparator(orderByAsc);
return new SiteNavigationMenuCreateDateComparator(orderByAsc);
}
else if (orderByCol.equals("name")) {
return new SiteNavigationMenuNameComparator(orderByAsc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,23 +282,23 @@ public static String getHtmlDiffResult(
public static WikiNode getNode(PortletRequest portletRequest)
throws Exception {

HttpServletRequest httpServletRequest =
PortalUtil.getHttpServletRequest(portletRequest);

ThemeDisplay themeDisplay =
(ThemeDisplay)httpServletRequest.getAttribute(
WebKeys.THEME_DISPLAY);
WikiNode node = null;

long nodeId = ParamUtil.getLong(portletRequest, "nodeId");
String nodeName = ParamUtil.getString(portletRequest, "nodeName");

WikiNode node = null;

try {
if (nodeId > 0) {
node = WikiNodeServiceUtil.getNode(nodeId);
}
else if (Validator.isNotNull(nodeName)) {
HttpServletRequest httpServletRequest =
PortalUtil.getHttpServletRequest(portletRequest);

ThemeDisplay themeDisplay =
(ThemeDisplay)httpServletRequest.getAttribute(
WebKeys.THEME_DISPLAY);

node = WikiNodeServiceUtil.getNode(
themeDisplay.getScopeGroupId(), nodeName);
}
Expand Down

0 comments on commit 7f697e0

Please sign in to comment.