roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r782269 - in /roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2: admin/GlobalCommentManagementBean.java editor/CommentsBean.java
Date Sat, 06 Jun 2009 15:11:41 GMT
Author: snoopdave
Date: Sat Jun  6 15:11:40 2009
New Revision: 782269

URL: http://svn.apache.org/viewvc?rev=782269&view=rev
Log:
Fix to ensure all comments on end-date are shown:
    https://issues.apache.org/jira/browse/ROL-1803

Modified:
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/admin/GlobalCommentManagementBean.java
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/CommentsBean.java

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/admin/GlobalCommentManagementBean.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/admin/GlobalCommentManagementBean.java?rev=782269&r1=782268&r2=782269&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/admin/GlobalCommentManagementBean.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/admin/GlobalCommentManagementBean.java
Sat Jun  6 15:11:40 2009
@@ -25,6 +25,7 @@
 import java.util.Iterator;
 import java.util.List;
 import org.apache.commons.lang.StringUtils;
+import org.apache.roller.util.DateUtil;
 import org.apache.roller.weblogger.pojos.WeblogEntryComment;
 import org.apache.roller.weblogger.util.Utilities;
 
@@ -99,10 +100,13 @@
     }
 
     public Date getEndDate() {
-        if(!StringUtils.isEmpty(getEndDateString())) try {
-            DateFormat df = new SimpleDateFormat("MM/dd/yy");
-            return df.parse(getEndDateString());
-        } catch(Exception e) { }
+        if (!StringUtils.isEmpty(getEndDateString())) {
+            try {
+                DateFormat df = new SimpleDateFormat("MM/dd/yy");
+                Date day = df.parse(getEndDateString());
+                return DateUtil.getEndOfDay(day);
+            } catch (Exception e) {}
+        }
         return null;
     }
     

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/CommentsBean.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/CommentsBean.java?rev=782269&r1=782268&r2=782269&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/CommentsBean.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/CommentsBean.java
Sat Jun  6 15:11:40 2009
@@ -25,6 +25,7 @@
 import java.util.Iterator;
 import java.util.List;
 import org.apache.commons.lang.StringUtils;
+import org.apache.roller.util.DateUtil;
 import org.apache.roller.weblogger.pojos.WeblogEntryComment;
 import org.apache.roller.weblogger.util.Utilities;
 
@@ -108,10 +109,13 @@
     }
 
     public Date getEndDate() {
-        if(!StringUtils.isEmpty(getEndDateString())) try {
-            DateFormat df = new SimpleDateFormat("MM/dd/yy");
-            return df.parse(getEndDateString());
-        } catch(Exception e) { }
+        if (!StringUtils.isEmpty(getEndDateString())) {
+            try {
+                DateFormat df = new SimpleDateFormat("MM/dd/yy");
+                Date day = df.parse(getEndDateString());
+                return DateUtil.getEndOfDay(day);
+            } catch (Exception e) {}
+        }
         return null;
     }
     



Mime
View raw message