--- loncom/interface/lonfeedback.pm 2004/05/05 23:04:57 1.81 +++ loncom/interface/lonfeedback.pm 2004/05/07 12:03:53 1.82 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.81 2004/05/05 23:04:57 raeburn Exp $ +# $Id: lonfeedback.pm,v 1.82 2004/05/07 12:03:53 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -159,12 +159,13 @@ sub list_discussion { $subject=&Apache::lontexconvert::msgtexconverted($subject); } if ($contrib{$idx.':attachmenturl'}) { - my ($fname,$ft) - =($contrib{$idx.':attachmenturl'}=~/\/(\w+)\.(\w+)$/); - $message.='
'.&mt('Attachment').': '.$fname.'.'.$ft.'
'; + my ($fname) + =($contrib{$idx.':attachmenturl'}=~m|/([^/]+)$|); + &Apache::lonnet::allowuploaded('/adm/feedback', + $contrib{$idx.':attachmenturl'}); + $message.=''.&mt('Attachment'). + ': '. + $fname.'
'; } if ($message) { if ($hidden) { @@ -976,7 +977,7 @@ sub handler { my $attachmenturl=''; if ($ENV{'form.attachment.filename'}) { unless (length($ENV{'form.attachment'})>131072) { - $attachmenturl=&Apache::lonnet::userfileupload('attachment'); + $attachmenturl=&Apache::lonnet::userfileupload('attachment',undef,'feedback'); } } # Filter HTML out of message (could be nasty)