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

www lon-capa-cvs@mail.lon-capa.org
Sat, 01 Jan 2005 18:36:13 -0000


www		Sat Jan  1 13:36:13 2005 EDT

  Modified files:              
    /loncom/interface	lonmsg.pm 
  Log:
  Bug #3771: not loosing status anymore when moving messages between folders.
  
  
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.127 loncom/interface/lonmsg.pm:1.128
--- loncom/interface/lonmsg.pm:1.127	Sat Jan  1 13:24:12 2005
+++ loncom/interface/lonmsg.pm	Sat Jan  1 13:36:13 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging
 #
-# $Id: lonmsg.pm,v 1.127 2005/01/01 18:24:12 www Exp $
+# $Id: lonmsg.pm,v 1.128 2005/01/01 18:36:13 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -598,12 +598,9 @@
     &Apache::lonnet::put('nohist_email'.$trgsuffix,{$msgid => $message{$msgid}});
 
 # Copy status
-    my %status=&Apache::lonnet::get('email_status'.$srcsuffix,[$msgid]);
-    &Apache::lonnet::put('email_status'.$trgsuffix,{$msgid => $status{$msgid}});
-# See if was deleted -> becomes "read" in trash
-    my $currentstatus=(&unpackmsgid($status{$msgid}),$srcfolder);
-    if ($currentstatus eq 'deleted') {
-	&statuschange($msgid,'read',$trgfolder);
+    unless ($trgfolder eq 'trash') {
+	my %status=&Apache::lonnet::get('email_status'.$srcsuffix,[$msgid]);
+	&Apache::lonnet::put('email_status'.$trgsuffix,{$msgid => $status{$msgid}});
     }
 # Delete orginals
     &Apache::lonnet::del('nohist_email'.$srcsuffix,[$msgid]);