Browse Source

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

jangliss 22 years ago
parent
commit
d80c698811
2 changed files with 4 additions and 1 deletions
  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).
     of cyrus. (#766577).
   - Added feature to allow user to switch on full date display in mailboxes instead
   - 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.
     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 ***
 *** SquirrelMail Stable Series 1.4 ***

+ 2 - 1
functions/date.php

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