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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 10 May 2004 22:39:51 -0000


albertel		Mon May 10 18:39:51 2004 EDT

  Modified files:              
    /loncom/interface	lonmsg.pm 
  Log:
  - feedback message attachements now work
  
  
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.99 loncom/interface/lonmsg.pm:1.100
--- loncom/interface/lonmsg.pm:1.99	Fri May  7 08:03:53 2004
+++ loncom/interface/lonmsg.pm	Mon May 10 18:39:51 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging
 #
-# $Id: lonmsg.pm,v 1.99 2004/05/07 12:03:53 albertel Exp $
+# $Id: lonmsg.pm,v 1.100 2004/05/10 22:39:51 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -172,15 +172,15 @@
        }
     }
     if ($content{'attachmenturl'}) {
-       my ($fname,$ft)=($content{'attachmenturl'}=~/\/(\w+)\.(\w+)$/);
+       my ($fname)=($content{'attachmenturl'}=~m|/([^/]+)$|);
        if ($notoken) {
-	   $content{'message'}.='<p>'.&mt('Attachment').': <tt>'.$fname.'.'.$ft.'</tt>';
+	   $content{'message'}.='<p>'.&mt('Attachment').': <tt>'.$fname.'</tt>';
        } else {
 	   &Apache::lonnet::allowuploaded('/adm/msg',
 					  $content{'attachmenturl'});
 	   $content{'message'}.='<p>'.&mt('Attachment').
 	       ': <a href="'.$content{'attachmenturl'}.'"><tt>'.
-	       $fname.'.'.$ft.'</tt></a>';
+	       $fname.'</tt></a>';
        }
     }
     return %content;