Accept patch [2788801] MAttachementEntry.java patch
Thanks to Muhammad Faisal Shahzad (ro2)
This commit is contained in:
parent
fa69ebfcef
commit
73efd701fd
|
@ -603,7 +603,7 @@ public class ReportStarter implements ProcessCall, ClientProcess
|
|||
MAttachmentEntry[] entries = attachment.getEntries();
|
||||
for(int i = 0; i < entries.length; i++) {
|
||||
if (!entries[i].getName().equals(name) &&
|
||||
(entries[i].getName().endsWith(".jrxml") || entries[i].getName().endsWith(".jasper"))) {
|
||||
(entries[i].getName().toLowerCase().endsWith(".jrxml") || entries[i].getName().toLowerCase().endsWith(".jasper"))) {
|
||||
File reportFile = getAttachmentEntryFile(entries[i]);
|
||||
if (reportFile != null)
|
||||
subreports.add(reportFile);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/**********************************************************************
|
||||
/***********************************************************************
|
||||
* This file is part of Adempiere ERP Bazaar *
|
||||
* http://www.adempiere.org *
|
||||
* *
|
||||
|
@ -25,7 +25,7 @@
|
|||
* *
|
||||
* Sponsors: *
|
||||
* - Company (http://www.faire.com.br) *
|
||||
***********************************************************************/
|
||||
**********************************************************************/
|
||||
|
||||
package org.adempiere.process;
|
||||
|
||||
|
@ -67,7 +67,7 @@ public class PrepareMigrationScripts extends SvrProcess {
|
|||
|
||||
FilenameFilter filter = new FilenameFilter() {
|
||||
public boolean accept(File dir, String name) {
|
||||
return name.endsWith(".sql");
|
||||
return name.toLowerCase().endsWith(".sql");
|
||||
}
|
||||
};
|
||||
dirList = dir.listFiles(filter);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
|
@ -260,16 +260,17 @@ public class MAttachmentEntry
|
|||
*/
|
||||
public boolean isPDF()
|
||||
{
|
||||
return m_name.endsWith(".pdf");
|
||||
return m_name.toLowerCase().endsWith(".pdf");
|
||||
} // isPDF
|
||||
|
||||
/**
|
||||
* Isattachment entry a Graphic
|
||||
* Is attachment entry a Graphic
|
||||
* @return true if *.gif, *.jpg, *.png
|
||||
*/
|
||||
public boolean isGraphic()
|
||||
{
|
||||
return m_name.endsWith(".gif") || m_name.endsWith(".jpg") || m_name.endsWith(".png");
|
||||
String m_lowname = m_name.toLowerCase();
|
||||
return m_lowname.endsWith(".gif") || m_lowname.endsWith(".jpg") || m_lowname.endsWith(".png");
|
||||
} // isGraphic
|
||||
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ public class GetReportAction extends POSAction
|
|||
|
||||
String mimeType = null;
|
||||
|
||||
if(reportName.endsWith(".csv"))
|
||||
if(reportName.toLowerCase().endsWith(".csv"))
|
||||
{
|
||||
mimeType = "text/comma-separated-values";
|
||||
}
|
||||
|
|
|
@ -139,10 +139,12 @@ public final class WFilter implements javax.servlet.Filter
|
|||
|
||||
// Get URI
|
||||
String uri = "";
|
||||
String urilow = "";
|
||||
if (request instanceof HttpServletRequest)
|
||||
{
|
||||
HttpServletRequest req = (HttpServletRequest)request;
|
||||
uri = req.getRequestURI();
|
||||
urilow = uri.toLowerCase();
|
||||
}
|
||||
|
||||
|
||||
|
@ -171,9 +173,9 @@ public final class WFilter implements javax.servlet.Filter
|
|||
else
|
||||
pass = false;
|
||||
else if (!uri.startsWith(WebEnv.DIR_BASE) // not requesting /adempiere/...
|
||||
|| uri.endsWith(".gif") || uri.endsWith(".jpg") || uri.endsWith(".png")
|
||||
|| uri.endsWith(".html") || uri.endsWith(".css")
|
||||
|| uri.endsWith(".js"))
|
||||
|| urilow.endsWith(".gif") || urilow.endsWith(".jpg") || urilow.endsWith(".png")
|
||||
|| urilow.endsWith(".html") || urilow.endsWith(".css")
|
||||
|| urilow.endsWith(".js"))
|
||||
check = false;
|
||||
else
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue