- Fixed bug when one message left in message index, displayed wrong one
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 1 Aug 2000 10:58:39 +0000 (10:58 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 1 Aug 2000 10:58:39 +0000 (10:58 +0000)
- Added MOTD back in

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

config/conf.pl
config/config_default.php
functions/mailbox_display.php
functions/strings.php
src/login.php
src/right_main.php
src/webmail.php

index 1bb23ae2bbbe58e42afc3bdfc7ce85bea534b05b..df957213ae6e17681316d2761666263f0afb0186 100755 (executable)
@@ -396,9 +396,9 @@ while (($command ne "q") && ($command ne "Q")) {
          if    ($command == 1) { command61(); }
          elsif ($command == 2) { command62(); }
       } elsif ($menu == 7) {
-         if    ($command == 1) { $motd = command71(); }
+         if    ($command == 1) { $motd             = command71(); }
       } elsif ($menu == 8) {
-         if    ($command == 1) { $motd = command81(); }
+         if    ($command == 1) { $plugins = command81(); }
       }
    }   
 }
@@ -587,7 +587,7 @@ sub command18 {
 sub command71 {
    print "\nYou can now create the welcome message that is displayed\n";
    print "every time a user logs on.  You can use HTML or just plain\n";
-   print "text.\n\n(Type @ on a blank line to exit)\n";
+   print "text.  If you do not wish to have one, just make it blank.\n\n(Type @ on a blank line to exit)\n";
    
    $new_motd = "";
    do {
index 13e0c983ba491c6a63fb410019a4c6511d66bde9..79518ad395e8f8ea3886e77d938ba9ca6f503ee7 100644 (file)
@@ -41,7 +41,7 @@
 //    $sendmail_path = "/usr/sbin/sendmail";
 
 //  This is displayed right after they log in
-    $motd = "You are using SquirrelMail's web-based email client.  If you run into any bugs or have suggestions, please report them to our <A HREF=\"mailto:squirrelmail-list@sourceforge.net\">mailing list</A>";
+   $motd = "";
 
 //  Whether or not to use a special color for special folders.  If not, special
 //  folders will be the same color as the other folders
index ac5ba8e47e86dc2cb2626fb060a7ecbccd31f0e1..2a85413642b930c2da511fc50b419b7d9fc517a9 100644 (file)
       } else {
          $endMessage = $numMessages;
       }
-
       
       if ($endMessage < $startMessage) {
          $startMessage = $startMessage - $show_num;
       if ($numMessages == 0) { // if there's no messages in this folder
          echo "<TR><TD BGCOLOR=\"$color[4]\" COLSPAN=5><CENTER><BR><B>". _("THIS FOLDER IS EMPTY") ."</B><BR>&nbsp;</CENTER></TD></TR>";
       } else if ($startMessage == $endMessage) { // if there's only one message in the box, handle it different.
-         $i = $startMessage - 1;
+         $i = $startMessage;
          reset($msort);
          do {
             $key = key($msort);
index ca54ee843a3319feb355ffcab0b6838c3f850fc6..9a4bb5c0cf943d0c6cf8e0d6c5c5971693ee2b4d 100644 (file)
          $line = $body_ary[$i];
          $line = charset_decode($charset, $line);
          
+         if (strlen($line) - 2 >= $wrap_at) {
+            $line = wordWrap($line, $wrap_at);  
+         }
+         
          $line = str_replace(" ", "&nbsp;", $line);
          $line = str_replace("\t", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", $line);
          $line = nl2br($line);
index 09e3d6f0a28d34171709ca0e7a68893953160211..4b1e47c69d2e0b47aac83446096a3dd0accb5984 100644 (file)
@@ -98,6 +98,7 @@
    echo "      </TD>\n";
    echo "   </TR>\n";
    echo "</TABLE>\n";
+   echo "<input type=hidden name=just_logged_in value=1>\n";
    echo "</FORM>\n";
 ?>
 </BODY>
index c1f96f84feae32e419823ce69ab6daa07aab13fc..636ff5b11001da5cf2be233dc467bdf2ffe0a7f4 100644 (file)
    sqimap_mailbox_select($imapConnection, $mailbox);
    displayPageHeader($color, $mailbox);
 
+   if ($just_logged_in == 1 && strlen(trim($motd)) > 0) {
+      echo "<center><br>";
+      echo "<table width=70% cellpadding=0 cellspacing=0 border=0><tr><td bgcolor=\"$color[9]\">";
+      echo "<table width=100% cellpadding=5 cellspacing=1 border=0><tr><td bgcolor=\"$color[4]\">";
+      echo "$motd";
+      echo "</td></tr></table>";
+      echo "</td></tr></table>";
+      echo "</center><br>";
+   }
+
        if (isset($newsort)) {
                $sort = $newsort;
                session_register("sort");
index 773995d7e3d2ff95f631edded05de95918ef02f4..2831999e267d1267d933b038016c192482bd8f51 100644 (file)
@@ -94,7 +94,8 @@
       echo "<FRAME SRC=\"folders.php\" NAME=\"right\">";
    } else {
       echo "<FRAME SRC=\"left_main.php\" NAME=\"left\">";
-      echo "<FRAME SRC=\"right_main.php\" NAME=\"right\">";
+      if (!isset($just_logged_in)) $just_logged_in = 0;
+      echo "<FRAME SRC=\"right_main.php?just_logged_in=$just_logged_in\" NAME=\"right\">";
    }
 
 ?>