- made the date like Netscape Messenger: if today show time, if this week
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 23 Jul 2000 15:31:05 +0000 (15:31 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 23 Jul 2000 15:31:05 +0000 (15:31 +0000)
  show day and time, else show month day year.
- Fixed error in the way we send the "from" header -- had been sending:
  Luke Ehresman <luke@squirrelmail.org> without the quites.. needed them!
- Fixed error when parsing url messages.  If it is longer than the word
  wrap length, it doesn't wrap it.
- fixed bug reported to list about next/prev not working (needed urlMailbox)

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@622 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
INSTALL
functions/date.php
functions/page_header.php
functions/strings.php
src/compose.php
src/read_body.php

index c00e389eb2d357b02d9bc6d9a0cd7724b8be2a97..52043b39b6d9e6ae268785e1cc68da3a7840d88f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 Version 0.5pre1 -- DEVELOPMENT
 ------------------------------
+- Date display now is similar to Netscape Messenger
+- Many bugs have been reported to the list, and been squashed
+- Help system developed 
 - Folder list now shows configurable details about messages
 - It is now possible to select multiple subscribes/unsubscribes
 - Removed a bunch of annoying "success" screens, improved navigation
diff --git a/INSTALL b/INSTALL
index 77181a7e584b801baa48b59b5bac657f006f3aee..b15089c02c749469c82368c240ff81a5a08d8024 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,3 +1,6 @@
+Installing SquirrelMail
+=======================
+
 Table of Contents:
   1.  (PHP4)     Configure your webserver to work with PHP4
   2.  (IMAP)     Setting up IMAP (not covered)
index 6384d941aaba267b24590ae9e4846d1be3944457..21326aee6dda8ef92aea1f67c24c79af6500442a 100644 (file)
    }
 
    function getDateString($stamp) {
-      return date("M j, Y", $stamp);
+      $now = time();
+      $midnight = $now - ($now % 86400) + 14400;
+
+      if ($midnight < $stamp) {
+         // Today
+         return date("g:i a", $stamp);
+      } else if ($midnight - 604800 < $stamp) {
+         // This week
+         return date("D, g:i a", $stamp);
+      } else {
+         // before this week 
+         return date("M j, Y", $stamp);
+      }
    }
 
    function getTimeStamp($dateParts) {
index 57282df07dabeae9fe088965f8031728bbe7382f..7b15f38f860de34b16c8f3089f61c2902f024945 100644 (file)
@@ -62,7 +62,7 @@
 
       if ($target != "")
          $target = " target=\"$target\"";
-
+      
       echo '<a href="'.$base_uri.$path.'"'.$target.'>'.$text.'</a>';
    }
 
@@ -97,7 +97,7 @@
       echo "&nbsp;&nbsp;\n";
       displayInternalLink ("src/options.php", _("Options"), "right");
       echo "&nbsp;&nbsp;\n";
-      displayInternalLink ("src/webmail.php?right_frame=help.php", _("Help"), "Help Me!");
+      displayInternalLink ("src/help.php", _("Help"), "right");
       echo "&nbsp;&nbsp;\n";
 
       do_hook("menuline");
index 1270e0276fbfa7fe8e8a9da0e4db67901bf6380d..a11a6fabbf84c358530622d739e0349d98493849 100644 (file)
       $i = 0;
       $line_len = strlen($words[$i])+1;
       $line = "";
-      while ($i < count($words)) {
-         while ($line_len < $wrap) {
-            $line = "$line$words[$i] ";
-            $i++;
-            $line_len = $line_len + strlen($words[$i])+1;
-         }
-         $line_len = strlen($words[$i])+1;
-         if ($line_len < $wrap) {
-            if ($i < count($words)) // don't <BR> the last line
-               $line = "$line\n";
-         } else {
-            $endline = $words[$i];
-            while ($line_len >= $wrap) {
-               $bigline = substr($endline, 0, $wrap);
-               $endline = substr($endline, $wrap, strlen($endline));
-               $line_len = strlen($endline);
-               $line = "$line$bigline<BR>";
+      if (count($words) > 1) {   
+         while ($i < count($words)-1) {
+            while ($line_len < $wrap) {
+               $line = "$line$words[$i] ";
+               $i++;
+               $line_len = $line_len + strlen($words[$i])+1;
+            }
+            $line_len = strlen($words[$i])+1;
+            if ($line_len < $wrap) {
+               if ($i < count($words)) // don't <BR> the last line
+                  $line = "$line\n";
+            } else {
+               $endline = $words[$i];
+               while ($line_len >= $wrap) {
+                  $bigline = substr($endline, 0, $wrap);
+                  $endline = substr($endline, $wrap, strlen($endline));
+                  $line_len = strlen($endline);
+                  $line = "$line$bigline<BR>";
+               }
+               $line = "$line$endline<BR>";
+               $i++;
             }
-            $line = "$line$endline<BR>";
-            $i++;
          }
+      } else {
+         $line = $words[0];
       }
 
       $line = str_replace(">", "&gt;", $line);
index 85aba1815a9625b7b03d20f75de13e9de900e863..ccf4f7eb89b7d081815729e7934a5d747120f30d 100644 (file)
@@ -75,7 +75,7 @@
          $body = "";
          for ($i=0; $i < count($body_ary); $i++) {
             if ($i==0 && $forward_id) {
-               $tmp = "-------- " . _("Original Message") . " --------";
+               $tmp = "-------- " . _("Original Message") . " --------\n";
                $tmp .= _("Subject") . ": " . $orig_header->subject . "\n"; 
                $tmp .= "   " . _("From") . ": " . $orig_header->from . "\n"; 
                $tmp .= "     " . _("To") . ": " . $orig_header->to[0] . "\n"; 
          echo "// --></SCRIPT>\n\n";
       }
 
-      echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST>\n";
+      echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST ENCTYPE=\"multipart/form-data\">\n";
       if ($reply_id) {
          echo "<input type=hidden name=reply_id value=$reply_id>\n";
       }                 
index 4b7fbc18b4bba61cdd272fa489d76a0ffa3d847f..1440363b5ee3c722c52f127e6aafa9727459b79c 100644 (file)
    $subject = decodeHeader(htmlspecialchars(stripslashes($message->header->subject)));
 
    echo "<BR>";
-   echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=98% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";
+   echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=100% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";
    echo "   <TR><TD BGCOLOR=\"$color[9]\" WIDTH=100%>";
    echo "      <TABLE WIDTH=100% CELLSPACING=0 BORDER=0 COLS=2 CELLPADDING=3>";
    echo "         <TR>";
       $prev = findPreviousMessage();
       $next = findNextMessage();
       if ($prev != -1)
-         echo "<a href=\"read_body.php?passed_id=$prev&mailbox=$mailbox&sort=$sort&startMessage=$startMessage&show_more=0\">" . _("Previous") . "</A>&nbsp;|&nbsp;";
+         echo "<a href=\"read_body.php?passed_id=$prev&mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage&show_more=0\">" . _("Previous") . "</A>&nbsp;|&nbsp;";
       else
          echo _("Previous") . "&nbsp;|&nbsp;";
       if ($next != -1)
-         echo "<a href=\"read_body.php?passed_id=$next&mailbox=$mailbox&sort=$sort&startMessage=$startMessage&show_more=0\">" . _("Next") . "</A>";
+         echo "<a href=\"read_body.php?passed_id=$next&mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage&show_more=0\">" . _("Next") . "</A>";
       else
          echo _("Next");
    }
    }
    echo "</TABLE>";
    echo "   </TD></TR>";
+   echo "</table>";
+   echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=100% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";
 
    echo "   <TR><TD BGCOLOR=\"$color[4]\" WIDTH=100%>\n";
    $body = formatBody($imapConnection, $message, $color, $wrap_at);
    echo "$body";
 
    echo "   </TD></TR>\n";
+   echo "</table>";
+   echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=100% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";
    echo "   <TR><TD BGCOLOR=\"$color[9]\">&nbsp;</TD></TR>";
    echo "</TABLE>\n";