Update of
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/publisher
In directory james.mmbase.org:/tmp/cvs-serv9355
Modified Files:
Tag: b1_5
NewsletterPublisher.java
Removed Files:
Tag: b1_5
HtmlBodyParser.java
Log Message:
CMSC-1084, Newsletter: sending test email contains empty body,allow not
contained-Aticle content email sended
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/publisher
See also: http://www.mmbase.org/jira/browse/CMSC-1084
Index: NewsletterPublisher.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/publisher/NewsletterPublisher.java,v
retrieving revision 1.34.2.5
retrieving revision 1.34.2.6
diff -u -b -r1.34.2.5 -r1.34.2.6
--- NewsletterPublisher.java 13 Nov 2008 11:49:16 -0000 1.34.2.5
+++ NewsletterPublisher.java 14 Nov 2008 07:01:17 -0000 1.34.2.6
@@ -164,16 +164,12 @@
}
String content = " ";
if ((subscription.getTerms() == null) || (subscription.getTerms().size()
== 0) || !cache.contains(url)) {
- if (!containAticle(publication)) {
- content = publication.getNewsletter().getTxtempty();
- log.info("the newsletter use textEmpty" + content);
- } else {
- log.info("url---->" + url);
- content = NewsletterGenerator.generate(url,
subscription.getMimeType());
- }
if (null != getPersonalise()) {
content = getPersonalise().personalise(content, subscription,
publication);
log.info("the content sended is Personalised :" + content);
+ }else {
+ log.info("url---->" + url);
+ content = NewsletterGenerator.generate(url,
subscription.getMimeType());
}
cache.add(url, content);
} else {
@@ -183,15 +179,6 @@
return content + "\n";
}
- private boolean containAticle(Publication publication) {
- int articleCounts =
NewsletterUtil.countArticlesByNewsletter(publication.getNewsletterId());
- if (articleCounts == 0 ) {
- return false;
- }else{
- return true;
- }
- }
-
private void setSenderInfomation(Message message, String fromAddress,
String fromName, String replyAddress, String replyName)
throws MessagingException, UnsupportedEncodingException {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs