Skip to content

Commit

Permalink
Merge branch 'main' into 29875-file-field-create-new-file-functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
oidacra authored Oct 23, 2024
2 parents 7f6ae33 + 8973f4f commit 01a4246
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,11 @@ public void _saveFileAsset(ActionRequest req, ActionResponse res,PortletConfig c
final long defaultLanguageId = APILocator.getLanguageAPI().getDefaultLanguage().getId();
currentLang = searchedLangId == 0 ? defaultLanguageId : searchedLangId;
} else {
currentLang = Long.parseLong(session.getAttribute(WebKeys.CONTENT_SELECTED_LANGUAGE).toString());
if (session.getAttribute(WebKeys.CONTENT_SELECTED_LANGUAGE) != null) {
currentLang = Long.parseLong(session.getAttribute(WebKeys.CONTENT_SELECTED_LANGUAGE).toString());
} else {
currentLang = Long.parseLong(session.getAttribute(WebKeys.HTMLPAGE_LANGUAGE).toString());
}
}
if (currentLang != 0) {
contentlet.setLanguageId(currentLang);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ com.dotcms.repackage.javax.portlet.title.pages=Pages
com.dotcms.repackage.javax.portlet.title.landing-pages=Landing Pages
com.dotcms.repackage.javax.portlet.title.dotai=dotAI
com.dotcms.repackage.javax.portlet.title.locales=Locales
com.dotcms.repackage.javax.portlet.title.analytics_search=Analytics Search
com.dotcms.repackage.javax.portlet.title.analytics-search=Analytics Search
com.dotcms.repackage.javax.app.title.edit-ema=Edit Mode Anywhere
com.dotmarketing.business.UserAPI.delete.beginning=Deletion of user {0}: Started replacing user references in {1}.
com.dotmarketing.business.UserAPI.delete.end=Deletion of user {0}: Finished replacing user references in {1}.
Expand Down
2 changes: 1 addition & 1 deletion dotCMS/src/main/webapp/WEB-INF/portlet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@
</portlet>

<portlet>
<portlet-name>analytics_search</portlet-name>
<portlet-name>analytics-search</portlet-name>
<display-name>Analytics Search</display-name>
<portlet-class>com.dotcms.spring.portlet.PortletController</portlet-class>
</portlet>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
<%@page import="org.apache.commons.lang.StringEscapeUtils"%>
<%@page import="com.dotcms.publisher.business.PublishAuditUtil"%>
<%@page import="com.dotmarketing.beans.PermissionableProxy"%>
<%@page import="com.dotcms.publisher.business.PublishQueueElement"%>
<%@page import="com.dotmarketing.business.PermissionAPI"%>
<%@page import="com.dotmarketing.util.DateUtil"%>
<%@page import="com.dotcms.publisher.business.PublishAuditAPI"%>
<%@page import="com.dotcms.publisher.business.PublishAuditStatus"%>
<%@page import="com.dotmarketing.util.URLEncoder"%>
<%@page import="java.util.Date"%>
<%@page import="com.dotmarketing.portlets.contentlet.business.ContentletAPI"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.liferay.portal.model.User"%>
<%@page import="com.dotmarketing.business.web.WebAPILocator"%>
<%@page import="com.dotmarketing.portlets.contentlet.model.Contentlet"%>
<%@page import="com.dotcms.publisher.business.DotPublisherException"%>
<%@page import="com.dotmarketing.business.DotStateException"%>
<%@page import="java.util.Map"%>
<%@page import="com.dotcms.publisher.business.PublisherAPI"%>
<%@page import="java.util.List"%>
<%@page import="com.dotmarketing.business.APILocator"%>
<%@page import="java.util.Calendar"%>
<%@page import="com.dotmarketing.util.UtilMethods"%>
<%@ page import="com.liferay.portal.language.LanguageUtil"%>
<%@ page import="com.dotcms.publisher.bundle.bean.Bundle"%>
<%@ page import="java.util.stream.Collectors" %>
<%@ page import="com.dotcms.publisher.business.PublishQueueElementTransformer" %>
<%@ include file="/html/portlet/ext/contentlet/publishing/init.jsp" %>
Expand Down Expand Up @@ -298,7 +288,6 @@


<th nowrap="nowrap" ><strong><%= LanguageUtil.get(pageContext, "publisher_Identifier") %></strong></th>
<th nowrap="nowrap" ><strong><%= LanguageUtil.get(pageContext, "publisher_dialog_bundle_name") %></strong></th>
<th style="width:100%" nowrap="nowrap" ><strong><%= LanguageUtil.get(pageContext, "Title") %></strong></th>
<th style="width:100px" nowrap="nowrap" ><strong><%= LanguageUtil.get(pageContext, "publisher_Status") %></strong></th>
<th style="width:40px" nowrap="nowrap" ><strong><%= LanguageUtil.get(pageContext, "publisher_Date_Entered") %></strong></th>
Expand Down Expand Up @@ -347,13 +336,6 @@
<td valign="top" nowrap="nowrap" style="cursor: pointer" onclick="javascript: showDetail('<%=c.getBundleId()%>')">
<%=shortBundleId.toString()%>
</td>
<%--BundleName--%>
<td valign="top" nowrap="nowrap" style="cursor: pointer" onclick="javascript: showDetail('<%=c.getBundleId()%>')">
<% Bundle bundle = APILocator.getBundleAPI().getBundleById(c.getBundleId()); %>
<%if ( bundle != null && bundle.getName() != null && (!bundle.getName().equals( bundle.getId() ))) { %>
<%=bundle.getName()%>
<%}%>
</td>
<%--BundleTitle--%>
<%try{ %>
<% if(bundleAssets.keySet().size()>0){ %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public void testFromXmlFile() throws IOException {
portletList.getPortlets().stream().anyMatch(p -> p.getPortletId().equals("categories")));
assertTrue("PortletList should contain 'dotai' portlet",
portletList.getPortlets().stream().anyMatch(p -> p.getPortletId().equals("dotai")));
assertTrue("PortletList should contain 'analytics_search' portlet",
portletList.getPortlets().stream().anyMatch(p -> p.getPortletId().equals("analytics_search")));
assertTrue("PortletList should contain 'analytics-search' portlet",
portletList.getPortlets().stream().anyMatch(p -> p.getPortletId().equals("analytics-search")));

// Check a specific portlet's details
Optional<DotPortlet> categoriesPortlet = portletList.getPortlets().stream()
Expand Down

0 comments on commit 01a4246

Please sign in to comment.