This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit aeece0d88d9ea15434d6717904007ddccfb198c1 Author: Kevin Morin <morin@codelutin.com> Date: Fri Apr 7 10:22:23 2017 +0200 fixes #9103 ne pas ajouter les PJ de contenu du mail --- .../faxtomail/persistence/entities/EmailTopiaDao.java | 1 + .../faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java b/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java index aba1a85..a3d0154 100644 --- a/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java +++ b/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java @@ -560,6 +560,7 @@ public class EmailTopiaDao extends AbstractEmailTopiaDao<Email> { // add same fecth liste as emailService#getEmailForFolder() StringBuilder hqlForFetchStep1 = new StringBuilder("SELECT " + EMAIL_IDENTIFIER + "." + TopiaEntity.PROPERTY_TOPIA_ID); if (orderClause != null && !orderByWithSize) { + // sql server ne supporte pas les requetes order by sur des champs non selectionnes hqlForFetchStep1.append(", ").append(orderClause); } if (orderByWithSize && tableToJoin != null) { diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java index 4cb69d9..4cf8b7c 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java @@ -37,7 +37,6 @@ import com.franciaflex.faxtomail.ui.swing.content.reply.actions.AddAttachmentToR import com.franciaflex.faxtomail.ui.swing.content.reply.actions.SenderChangedAction; import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailUIHandler; import com.franciaflex.faxtomail.ui.swing.util.FaxToMailUIUtil; -import com.google.common.base.Strings; import com.google.common.collect.Lists; import jaxx.runtime.SwingUtil; import jaxx.runtime.validator.swing.SwingValidator; @@ -142,7 +141,7 @@ public class ReplyFormUIHandler extends AbstractFaxToMailUIHandler<ReplyFormUIMo new ReplyAttachmentModel(attachment, true, prefix + " - " + attachment.getOriginalFileName()); model.addAvailableAttachment(replyOriginalAttachmentModel); - if (!Strings.isNullOrEmpty(attachment.getEditedFileName())) { + if (StringUtils.isNotEmpty(attachment.getEditedFileName())) { ReplyAttachmentModel replyEditedAttachmentModel = new ReplyAttachmentModel(attachment, false, prefix + " - " + attachment.getEditedFileName()); @@ -154,7 +153,7 @@ public class ReplyFormUIHandler extends AbstractFaxToMailUIHandler<ReplyFormUIMo model.addAvailableAttachment(replyEditedAttachmentModel); } - } else if (addAttchmentToReply(demand, model, demandeUIModel, attachment)){ + } else if (addAttchmentToReply(demand, model, demandeUIModel, attachment)) { model.addAttachment(replyOriginalAttachmentModel); model.removeAvailableAttachment(replyOriginalAttachmentModel); addAttachmentToReplyAction.setReplyAttachmentModel(replyOriginalAttachmentModel); @@ -283,7 +282,8 @@ public class ReplyFormUIHandler extends AbstractFaxToMailUIHandler<ReplyFormUIMo protected boolean addAttchmentToReply(DemandeUIModel demand, ReplyFormUIModel model, DemandeUIModel demandeUIModel, Attachment attachment) { return model.isForward() && demandeUIModel.equals(demand) - && !attachment.isInlineAttachment() && !attachment.isLessImportant(); + && !attachment.isInlineAttachment() && !attachment.isLessImportant() + && !attachment.isMailContent() && !attachment.isAddedByUser(); } @Override @@ -460,8 +460,8 @@ public class ReplyFormUIHandler extends AbstractFaxToMailUIHandler<ReplyFormUIMo // Must take the value from the editor and get the value and cast it to the new type. Class<?> cls = oldValue.getClass(); try { - Method method = cls.getMethod("valueOf", new Class[]{String.class}); - newValue = method.invoke(oldValue, new Object[] { editorComponent.getText()}); + Method method = cls.getMethod("valueOf", String.class); + newValue = method.invoke(oldValue, editorComponent.getText()); } catch (Exception ex) { // Fail silently and return the newValue (a String object) } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.