Skip to content

Commit

Permalink
LPS-57200 use the right API to create the article in the right scope
Browse files Browse the repository at this point in the history
  • Loading branch information
juliocamarero committed Mar 31, 2016
1 parent 3f6ff9f commit 2e59835
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
import com.liferay.knowledgebase.util.PortletKeys;
import com.liferay.knowledgebase.util.WebKeys;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.model.Group;
import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil;
import com.liferay.portal.kernel.security.permission.PermissionChecker;
import com.liferay.portal.kernel.service.GroupLocalServiceUtil;
import com.liferay.portal.kernel.theme.ThemeDisplay;
import com.liferay.portal.kernel.util.PortalUtil;
import com.liferay.portal.kernel.workflow.WorkflowConstants;

import javax.portlet.PortletRequest;
Expand Down Expand Up @@ -111,9 +113,10 @@ public PortletURL getURLAdd(
(ThemeDisplay)liferayPortletRequest.getAttribute(
WebKeys.THEME_DISPLAY);

PortletURL portletURL = PortletURLFactoryUtil.create(
liferayPortletRequest, PortletKeys.KNOWLEDGE_BASE_ADMIN,
getControlPanelPlid(themeDisplay), PortletRequest.RENDER_PHASE);
PortletURL portletURL = PortalUtil.getControlPanelPortletURL(
liferayPortletRequest, getGroup(liferayPortletRequest),
PortletKeys.KNOWLEDGE_BASE_ADMIN, 0, 0,
PortletRequest.RENDER_PHASE);

portletURL.setParameter("mvcPath", "/admin/edit_article.jsp");

Expand Down

0 comments on commit 2e59835

Please sign in to comment.