roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1478522 - /roller/branches/roller_5.0/weblogger-business/src/main/java/org/apache/roller/weblogger/util/MailUtil.java
Date Thu, 02 May 2013 20:42:56 GMT
Author: gmazza
Date: Thu May  2 20:42:55 2013
New Revision: 1478522

URL: http://svn.apache.org/r1478522
Log:
ROL-1946 Add commenter's email addr to notification emails.

Modified:
    roller/branches/roller_5.0/weblogger-business/src/main/java/org/apache/roller/weblogger/util/MailUtil.java

Modified: roller/branches/roller_5.0/weblogger-business/src/main/java/org/apache/roller/weblogger/util/MailUtil.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_5.0/weblogger-business/src/main/java/org/apache/roller/weblogger/util/MailUtil.java?rev=1478522&r1=1478521&r2=1478522&view=diff
==============================================================================
--- roller/branches/roller_5.0/weblogger-business/src/main/java/org/apache/roller/weblogger/util/MailUtil.java
(original)
+++ roller/branches/roller_5.0/weblogger-business/src/main/java/org/apache/roller/weblogger/util/MailUtil.java
Thu May  2 20:42:55 2013
@@ -332,15 +332,16 @@ public class MailUtil {
         StringBuffer ownermsg = new StringBuffer();
         boolean escapeHtml = !WebloggerRuntimeConfig.getBooleanProperty("users.comments.htmlenabled");
         
-        // first the commenter message
-        
+        // first the commenter message        
         if (!escapeHtml) {
             msg.append("<html><body style=\"background: white; ");
             msg.append(" color: black; font-size: 12px\">");
         }
         
         if (!StringUtils.isEmpty(commentObject.getName())) {
-            msg.append(commentObject.getName() + " "
+            String emailAddress = StringUtils.isBlank(commentObject.getEmail()) ? " " :
+                    " (" + commentObject.getEmail() + ") ";
+            msg.append(commentObject.getName() + emailAddress
                     + resources.getString("email.comment.wrote")+": ");
         } else {
             msg.append(resources.getString("email.comment.anonymous")+": ");



Mime
View raw message