--- loncom/interface/lonmsg.pm 2004/05/03 19:10:39 1.98 +++ loncom/interface/lonmsg.pm 2004/05/10 22:39:51 1.100 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging # -# $Id: lonmsg.pm,v 1.98 2004/05/03 19:10:39 sakharuk Exp $ +# $Id: lonmsg.pm,v 1.100 2004/05/10 22:39:51 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -172,13 +172,15 @@ sub unpackagemsg { } } if ($content{'attachmenturl'}) { - my ($fname,$ft)=($content{'attachmenturl'}=~/\/(\w+)\.(\w+)$/); + my ($fname)=($content{'attachmenturl'}=~m|/([^/]+)$|); if ($notoken) { - $content{'message'}.='

'.&mt('Attachment').': '.$fname.'.'.$ft.''; + $content{'message'}.='

'.&mt('Attachment').': '.$fname.''; } else { - $content{'message'}.='

'.&mt('Attachment').': '.$fname.'.'.$ft.''; + &Apache::lonnet::allowuploaded('/adm/msg', + $content{'attachmenturl'}); + $content{'message'}.='

'.&mt('Attachment'). + ': '. + $fname.''; } } return %content;