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

raeburn raeburn@source.lon-capa.org
Sat, 14 Feb 2009 00:27:08 -0000


raeburn		Sat Feb 14 00:27:08 2009 EDT

  Modified files:              
    /loncom/interface	lonmsgdisplay.pm 
  Log:
  Bug 5865.
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.113 loncom/interface/lonmsgdisplay.pm:1.114
--- loncom/interface/lonmsgdisplay.pm:1.113	Tue Feb 10 09:30:16 2009
+++ loncom/interface/lonmsgdisplay.pm	Sat Feb 14 00:27:08 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.113 2009/02/10 09:30:16 schafran Exp $
+# $Id: lonmsgdisplay.pm,v 1.114 2009/02/14 00:27:08 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -838,6 +838,7 @@
     }
 
     foreach my $msgid (@messages) {
+        next if ($msgid eq '');
 	my $esc_msgid=&escape($msgid);
 	my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$fromcid,$processid,$symb,$error) =
 	    &Apache::lonmsg::unpackmsgid($esc_msgid,$folder,undef,
@@ -1078,11 +1079,13 @@
     $r->print("</tr>\n");
 
     my $suffix = &Apache::lonmsg::foldersuffix($folder);
+    my $count = 0;
     for (my $n=$firstdis;$n<=$lastdis;$n++) {
 	my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID,
 	    $description,$recv_name,$recv_domain)= 
 		@{$temp[$n]};
 	if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) {
+            $count ++;
 	    if ($status eq 'new') {
 		$r->print('<tr class="LC_mail_new">');
 	    } elsif ($status eq 'read') {
@@ -1114,7 +1117,6 @@
 		}
 	    }
             my $localsenttime = &Apache::lonlocal::locallocaltime($sendtime);
-            my $count = $n +1;
 	    $r->print('<td align="right"><span class="LC_nobreak">'.(($status eq 'new')?'<b>':'').
                       $count.'.'.(($status eq 'new')?'</b>':'').'&nbsp;'.
                       '<input type="checkbox" name="delmark"'.