/portal-web/docroot/html/common/referer_js.jsp

http://github.com/liferay/liferay-portal · JavaServer Pages · 46 lines · 23 code · 10 blank · 13 comment · 2 complexity · 87ece97f296ac42daf28a414adc9c865 MD5 · raw file

  1. <%--
  2. /**
  3. * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
  4. *
  5. * This library is free software; you can redistribute it and/or modify it under
  6. * the terms of the GNU Lesser General Public License as published by the Free
  7. * Software Foundation; either version 2.1 of the License, or (at your option)
  8. * any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  12. * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  13. * details.
  14. */
  15. --%>
  16. <%@ page session="false" %>
  17. <%
  18. pageContext.setAttribute(WebKeys.THEME_DEFINE_OBJECTS, Boolean.FALSE);
  19. %>
  20. <%@ include file="/html/common/referer_common.jsp" %>
  21. <script type="text/javascript">
  22. <%
  23. Boolean logout = (Boolean)request.getAttribute(WebKeys.LOGOUT);
  24. if (logout == null) {
  25. logout = Boolean.FALSE;
  26. }
  27. %>
  28. <c:if test="<%= logout && BrowserSnifferUtil.isIe(request) && PrefsPropsUtil.getBoolean(themeDisplay.getCompanyId(), PropsKeys.NTLM_AUTH_ENABLED, PropsValues.NTLM_AUTH_ENABLED) %>">
  29. document.execCommand('ClearAuthenticationCache');
  30. </c:if>
  31. <%
  32. referer = HtmlUtil.escapeJSLink(referer);
  33. referer = HtmlUtil.escapeJS(referer);
  34. %>
  35. location.href = '<%= referer %>';
  36. </script>