Sfoglia il codice sorgente

Fix definitivo per caratteri non validi nel nome dei file all'interno degli zip

master
Salvatore La Manna 3 anni fa
parent
commit
dae112b920
  1. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AllegatiManualiPortlet.java
  2. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/DocAggiuntivaPortlet.java
  3. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java
  4. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  5. 5
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/AllegatiPraticaPortlet.java
  6. 3
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view.jsp
  7. 3
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/workflow_task_action.jsp

6
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AllegatiManualiPortlet.java

@ -7,6 +7,7 @@ import it.tref.liferay.portos.bo.service.AllegatoManualeServiceUtil;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.List;
@ -104,7 +105,10 @@ public class AllegatiManualiPortlet extends MVCPortlet {
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getFileEntryId());
inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(),
fileEntry.getVersion(), false);
String name = fileEntry.getTitle() + StringPool.PERIOD + fileEntry.getExtension();
String s = new String(fileEntry.getTitle().getBytes(StandardCharsets.UTF_8));
byte[] b = s.getBytes(StandardCharsets.ISO_8859_1);
String name = new String(b, StandardCharsets.ISO_8859_1) + StringPool.PERIOD
+ fileEntry.getExtension();
zipWriter.addEntry(name, inputStream);
} finally {
StreamUtil.cleanUp(inputStream);

6
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/DocAggiuntivaPortlet.java

@ -7,6 +7,7 @@ import it.tref.liferay.portos.bo.service.DocAggiuntivaServiceUtil;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.List;
@ -106,7 +107,10 @@ public class DocAggiuntivaPortlet extends MVCPortlet {
inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(),
fileEntry.getVersion(), false);
String name = fileEntry.getTitle() + StringPool.PERIOD + fileEntry.getExtension();
String s = new String(fileEntry.getTitle().getBytes(StandardCharsets.UTF_8));
byte[] b = s.getBytes(StandardCharsets.ISO_8859_1);
String name = new String(b, StandardCharsets.ISO_8859_1) + StringPool.PERIOD
+ fileEntry.getExtension();
zipWriter.addEntry(name, inputStream);
} finally {
StreamUtil.cleanUp(inputStream);

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java

@ -339,7 +339,6 @@ public class FascicoloPortlet extends MVCPortlet {
if (Validator.isNull(doc.getDlFileEntryId())) {
continue;
}
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getDlFileEntryId());
inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(),
fileEntry.getVersion(), false);

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
##
build.namespace=portos_bo
build.number=2712
build.date=1632147297567
build.number=2713
build.date=1633514794474
build.auto.upgrade=true
##

5
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/AllegatiPraticaPortlet.java

@ -12,6 +12,7 @@ import it.tref.liferay.portos.bo.util.DelegheUtil;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Date;
@ -263,7 +264,9 @@ public class AllegatiPraticaPortlet extends MVCPortlet {
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getDlFileEntryId());
inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(),
fileEntry.getVersion(), false);
String name = fileEntry.getTitle();
String s = new String(fileEntry.getTitle().getBytes(StandardCharsets.UTF_8));
byte[] b = s.getBytes(StandardCharsets.ISO_8859_1);
String name = new String(b, StandardCharsets.ISO_8859_1);
zipWriter.addEntry(name, inputStream);
} finally {
if (inputStream != null) {

3
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view.jsp

@ -1,3 +1,4 @@
<%@page import="com.liferay.portal.kernel.exception.PortalException"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.bo.util.ValidazionePraticaUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.SessionUtil"%>
@ -58,8 +59,10 @@ if (isFineLavori) {
if (dettPraticaIdParam == 0) {
dettPraticaIdParam = GetterUtil.getLong(httpServletRequest.getParameter("classPk"));
}
if (dettPraticaIdParam != 0) {
dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaIdParam);
}
}
if (dettPratica == null) {
dettPratica = DettPraticaServiceUtil.getDettPratica(classPk);
}

3
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/workflow_task_action.jsp

@ -45,7 +45,8 @@ if (row != null) {
else {
workflowTask = (WorkflowTask) request.getAttribute(WebKeys.WORKFLOW_TASK);
}
long[] pooledActorsIds = WorkflowTaskManagerUtil.getPooledActorsIds(company.getCompanyId(), workflowTask.getWorkflowTaskId());
long[] pooledActorsIds = WorkflowTaskManagerUtil
.getPooledActorsIds(company.getCompanyId(), workflowTask.getWorkflowTaskId());
%>
<liferay-ui:icon-menu showExpanded="<%= (row == null) %>" showWhenSingleIcon="<%= (row == null) %>" cssClass="wrap-action">
<div class="task-content-actions">

Caricamento…
Annulla
Salva