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.File;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files; import java.nio.file.Files;
import java.util.List; import java.util.List;
@ -104,7 +105,10 @@ public class AllegatiManualiPortlet extends MVCPortlet {
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getFileEntryId()); FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getFileEntryId());
inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(), inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(),
fileEntry.getVersion(), false); 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); zipWriter.addEntry(name, inputStream);
} finally { } finally {
StreamUtil.cleanUp(inputStream); 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.File;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files; import java.nio.file.Files;
import java.util.List; import java.util.List;
@ -106,7 +107,10 @@ public class DocAggiuntivaPortlet extends MVCPortlet {
inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(), inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(),
fileEntry.getVersion(), false); 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); zipWriter.addEntry(name, inputStream);
} finally { } finally {
StreamUtil.cleanUp(inputStream); 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())) { if (Validator.isNull(doc.getDlFileEntryId())) {
continue; continue;
} }
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getDlFileEntryId()); FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getDlFileEntryId());
inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(), inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(),
fileEntry.getVersion(), false); 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.namespace=portos_bo
build.number=2712 build.number=2713
build.date=1632147297567 build.date=1633514794474
build.auto.upgrade=true 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.File;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files; import java.nio.file.Files;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
@ -263,7 +264,9 @@ public class AllegatiPraticaPortlet extends MVCPortlet {
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getDlFileEntryId()); FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getDlFileEntryId());
inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(), inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(),
fileEntry.getVersion(), false); 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); zipWriter.addEntry(name, inputStream);
} finally { } finally {
if (inputStream != null) { 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 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.util.ValidazionePraticaUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.SessionUtil"%> <%@page import="it.tref.liferay.portos.bo.shared.util.SessionUtil"%>
@ -58,8 +59,10 @@ if (isFineLavori) {
if (dettPraticaIdParam == 0) { if (dettPraticaIdParam == 0) {
dettPraticaIdParam = GetterUtil.getLong(httpServletRequest.getParameter("classPk")); dettPraticaIdParam = GetterUtil.getLong(httpServletRequest.getParameter("classPk"));
} }
if (dettPraticaIdParam != 0) {
dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaIdParam); dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaIdParam);
} }
}
if (dettPratica == null) { if (dettPratica == null) {
dettPratica = DettPraticaServiceUtil.getDettPratica(classPk); 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 { else {
workflowTask = (WorkflowTask) request.getAttribute(WebKeys.WORKFLOW_TASK); 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"> <liferay-ui:icon-menu showExpanded="<%= (row == null) %>" showWhenSingleIcon="<%= (row == null) %>" cssClass="wrap-action">
<div class="task-content-actions"> <div class="task-content-actions">

Caricamento…
Annulla
Salva