Skip to content

Commit

Permalink
LPS-202228 Take into account the highlighted DDM Structure when searc…
Browse files Browse the repository at this point in the history
…hing
  • Loading branch information
jkappler authored and brianchandotcom committed Nov 27, 2023
1 parent 4306c85 commit 56891aa
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
import com.liferay.portal.kernel.bean.BeanParamUtil;
import com.liferay.portal.kernel.dao.search.SearchContainer;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.feature.flag.FeatureFlagManagerUtil;
import com.liferay.portal.kernel.json.JSONArray;
import com.liferay.portal.kernel.json.JSONFactoryUtil;
import com.liferay.portal.kernel.json.JSONObject;
Expand Down Expand Up @@ -1912,7 +1913,16 @@ private void _populateSearchContext(
long ddmStructureId = ParamUtil.getLong(
_httpServletRequest, "ddmStructureId");

if (ddmStructureId > 0) {
long highlightedDDMStructureId = ParamUtil.getLong(
_httpServletRequest, "highlightedDDMStructureId");

if (FeatureFlagManagerUtil.isEnabled("LPS-194763") &&
(highlightedDDMStructureId > 0)) {

searchContext.setClassTypeIds(
new long[] {highlightedDDMStructureId});
}
else if (ddmStructureId > 0) {
searchContext.setClassTypeIds(new long[] {ddmStructureId});
}

Expand Down

0 comments on commit 56891aa

Please sign in to comment.