cmailleux 2005/12/12 16:25:36 CET
Modified files:
core/src/java/org/jahia/workflow/nstep NStepWorkflow.java
Log:
Avoid sending same mail multiple time to same user
Send email only if user have an email (do not check the validity of the email)
Revision Changes Path
1.18 +8 -3
jahia/core/src/java/org/jahia/workflow/nstep/NStepWorkflow.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/workflow/nstep/NStepWorkflow.java.diff?r1=1.17&r2=1.18&f=h
Index: NStepWorkflow.java
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/java/org/jahia/workflow/nstep/NStepWorkflow.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- NStepWorkflow.java 12 Dec 2005 15:25:18 -0000 1.17
+++ NStepWorkflow.java 12 Dec 2005 15:25:36 -0000 1.18
@@ -44,15 +44,20 @@
* Time: 14:53:40
*
* @author [EMAIL PROTECTED]
- * @version $Id: NStepWorkflow.java,v 1.17 2005/12/12 15:25:18 cmailleux Exp
$
+ * @version $Id: NStepWorkflow.java,v 1.18 2005/12/12 15:25:36 cmailleux Exp
$
* <p/>
* Revision log :
* $Log: NStepWorkflow.java,v $
- * Revision 1.17 2005/12/12 15:25:18 cmailleux
+ * Revision 1.18 2005/12/12 15:25:36 cmailleux
* Avoid sending same mail multiple time to same user
*
* Send email only if user have an email (do not check the validity
of the email)
*
+ * Revision 1.17 2005/12/12 15:25:18 cmailleux
+ * Avoid sending same mail multiple time to same user
+ *
+ * Send email only if user have an email (do not check the validity
of the email)
+ *
* Revision 1.16 2005/12/12 11:55:37 cmailleux
* Avoid ressource excpetion on startstep
* <p/>
@@ -750,7 +755,7 @@
sendMails(group, mailService, from, cc, bcc, subject,
mailBody, alreadySendMail);
}
String email = author.getProperty("email");
- if (email != null && alreadySendMail.containsKey(email) &&
!"".equals(email.trim()))
+ if (email != null && !alreadySendMail.containsKey(email) &&
!"".equals(email.trim()))
mailService.sendMessage(from, email, cc, bcc, subject,
mailBody);
}
}
@@ -762,7 +767,7 @@
while (iterator.hasNext()) {
JahiaUser user = (JahiaUser) iterator.next();
String email = user.getProperty("email");
- if (email != null && alreadySendMail.containsKey(email) &&
!"".equals(email.trim())) {
+ if (email != null && !alreadySendMail.containsKey(email) &&
!"".equals(email.trim())) {
mailService.sendMessage(from, email, cc, bcc, subject,
mailBody);
alreadySendMail.put(email, email);
}