[LON-CAPA-cvs] cvs: loncom /interface loncommunicate.pm lonmsg.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 16 Sep 2002 20:06:12 -0000


albertel		Mon Sep 16 16:06:12 2002 EDT

  Modified files:              
    /loncom/interface	lonmsg.pm loncommunicate.pm 
  Log:
  - should be better about silly messages (I keep get this message listed from 1969 that is ne no matter what I do with sending myself messages our trying to delete. With this it at least stops showing up.)
  
  
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.38 loncom/interface/lonmsg.pm:1.39
--- loncom/interface/lonmsg.pm:1.38	Sat Sep  7 09:57:26 2002
+++ loncom/interface/lonmsg.pm	Mon Sep 16 16:06:12 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging
 #
-# $Id: lonmsg.pm,v 1.38 2002/09/07 13:57:26 www Exp $
+# $Id: lonmsg.pm,v 1.39 2002/09/16 20:06:12 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -450,24 +450,24 @@
                                         $ENV{'user.home'}))) {
         my ($sendtime,$shortsubj,$fromname,$fromdomain,$status)=
 	    &Apache::lonmsg::unpackmsgid($_);
-       unless (($status eq 'deleted') || ($sendtime=~/error/)) {
-        if ($status eq 'new') {
-	    $r->print('<tr bgcolor="#FFBB77">');
-        } elsif ($status eq 'read') {
-	    $r->print('<tr bgcolor="#BBBB77">');
-        } elsif ($status eq 'replied') {
-	    $r->print('<tr bgcolor="#AAAA88">');
-	} else {
-	    $r->print('<tr bgcolor="#99BBBB">');
-        }
-        $r->print('<td><a href="/adm/email?display='.$_.
-                  '">Open</a></td><td><a href="/adm/email?markdel='.$_.
-                '">Delete</a><input type=checkbox name="delmark_'.$_.'"></td>'.
-                  '<td>'.localtime($sendtime).'</td><td>'.
-                  $fromname.'</td><td>'.$fromdomain.'</td><td>'.
+	if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) {
+	    if ($status eq 'new') {
+		$r->print('<tr bgcolor="#FFBB77">');
+	    } elsif ($status eq 'read') {
+		$r->print('<tr bgcolor="#BBBB77">');
+	    } elsif ($status eq 'replied') {
+		$r->print('<tr bgcolor="#AAAA88">');
+	    } else {
+		$r->print('<tr bgcolor="#99BBBB">');
+	    }
+	    $r->print('<td><a href="/adm/email?display='.$_.
+		      '">Open</a></td><td><a href="/adm/email?markdel='.$_.
+		      '">Delete</a><input type=checkbox name="delmark_'.$_.'"></td>'.
+		      '<td>'.localtime($sendtime).'</td><td>'.
+		      $fromname.'</td><td>'.$fromdomain.'</td><td>'.
 		      &Apache::lonnet::unescape($shortsubj).'</td><td>'.
                       $status.'</td></tr>');
-       }
+	}
     }
     $r->print('</table><p>'.
               '<a href="javascript:checkall()">Check All</a>&nbsp;'.
Index: loncom/interface/loncommunicate.pm
diff -u loncom/interface/loncommunicate.pm:1.11 loncom/interface/loncommunicate.pm:1.12
--- loncom/interface/loncommunicate.pm:1.11	Wed Aug 21 13:18:08 2002
+++ loncom/interface/loncommunicate.pm	Mon Sep 16 16:06:12 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Communicate
 #
-# $Id: loncommunicate.pm,v 1.11 2002/08/21 17:18:08 www Exp $
+# $Id: loncommunicate.pm,v 1.12 2002/09/16 20:06:12 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -90,7 +90,7 @@
     foreach (@msgids) {
         my ($sendtime,$shortsubj,$fromname,$fromdom,$status)=
 	    &Apache::lonmsg::unpackmsgid($_);
-       if ($sendtime!~/error/) {
+       if (defined($sendtime) && $sendtime!~/error/) {
         $sendtime = localtime($sendtime);
         if ($status eq 'new') {
             push @newmsgs, {