瀏覽代碼

Fixed bug that would cause e-mails dated in the future to be displayed with
only the time.

jangliss 22 年之前
父節點
當前提交
d80c698811
共有 2 個文件被更改,包括 4 次插入1 次删除
  1. 2 0
      ChangeLog
  2. 2 1
      functions/date.php

+ 2 - 0
ChangeLog

@@ -52,6 +52,8 @@ Version 1.5.0 -- CVS
     of cyrus. (#766577).
   - Added feature to allow user to switch on full date display in mailboxes instead
     of just partial date/time based on time of email, and current date.
+  - Fixed bug that would cause e-mails dated in the future to be displayed with only
+    the time.
 
 **************************************
 *** SquirrelMail Stable Series 1.4 ***

+ 2 - 1
functions/date.php

@@ -294,8 +294,9 @@ function getDateString( $stamp ) {
         $dateZ = - $dateZ;
     }
     $midnight = $now - ($now % 86400) - $dateZ;
+    $nextmid = $midnight + 86400;
     
-    if ($show_full_date == 1) {
+    if (($show_full_date == 1) || ($nextmid < $stamp)) {
         $date_format = _("M j, Y");
     } else if ($midnight < $stamp) {
         /* Today */