From 567828c3db2996134abda4bea349244ce80e8c49 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Thu, 14 Jul 2016 13:26:58 +0000 Subject: [PATCH] redirects to the current Site friendly URL now also for Profile git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portal/liferay62-plugins/social-dockbar-hook@130373 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../portlet/dockbar/view_user_account.portal.jspf | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/custom_jsps/html/portlet/dockbar/view_user_account.portal.jspf b/src/main/webapp/custom_jsps/html/portlet/dockbar/view_user_account.portal.jspf index d6fe9be..7ae92e5 100644 --- a/src/main/webapp/custom_jsps/html/portlet/dockbar/view_user_account.portal.jspf +++ b/src/main/webapp/custom_jsps/html/portlet/dockbar/view_user_account.portal.jspf @@ -12,8 +12,13 @@ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ + + /** + * Modified for custom myProfile URL + */ --%> +<%@page import="org.gcube.common.portal.GCubePortalConstants"%> @@ -130,10 +135,9 @@ myAccountURL = HttpUtil.setParameter(myAccountURL, "controlPanelCategory", PortletCategoryKeys.MY); %> <%//Patch for myProfile URL - String currentVirtualHost = request.getServerName(); - String groupName = currentVirtualHost.split("\\.")[0]; - - String myProfileURL = GCubePortalConstants.PREFIX_GROUP_URL + "/" + groupName + "/profile"; + PortalContext context = PortalContext.getConfiguration(); + String mySiteURL = context.getSiteLandingPagePath(request); + String myProfileURL = mySiteURL + GCubePortalConstants.USER_PROFILE_FRIENDLY_URL; %>