--- loncom/interface/lonmsg.pm 2004/03/26 17:13:59 1.94
+++ loncom/interface/lonmsg.pm 2004/04/06 15:56:37 1.97
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.94 2004/03/26 17:13:59 www Exp $
+# $Id: lonmsg.pm,v 1.97 2004/04/06 15:56:37 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -101,6 +101,7 @@ use Apache::lontexconvert();
use HTML::Entities();
use Mail::Send;
use Apache::lonlocal;
+use Apache::loncommunicate;
# Querystring component with sorting type
my $sqs;
@@ -109,15 +110,15 @@ my $sqs;
sub packagemsg {
my ($subject,$message,$citation,$baseurl,$attachmenturl)=@_;
- $message =&HTML::Entities::encode($message);
- $citation=&HTML::Entities::encode($citation);
- $subject =&HTML::Entities::encode($subject);
+ $message =&HTML::Entities::encode($message,'<>&"');
+ $citation=&HTML::Entities::encode($citation,'<>&"');
+ $subject =&HTML::Entities::encode($subject,'<>&"');
#remove machine specification
$baseurl =~ s|^http://[^/]+/|/|;
- $baseurl =&HTML::Entities::encode($baseurl);
+ $baseurl =&HTML::Entities::encode($baseurl,'<>&"');
#remove machine specification
$attachmenturl =~ s|^http://[^/]+/|/|;
- $attachmenturl =&HTML::Entities::encode($attachmenturl);
+ $attachmenturl =&HTML::Entities::encode($attachmenturl,'<>&"');
my $now=time;
$msgcount++;
@@ -204,7 +205,7 @@ sub sendemail {
my $msg = new Mail::Send;
$msg->to($to);
$msg->subject('[LON-CAPA] '.$subject);
- if (my $fh = $msg->open('smtp',Server => 'localhost')) {
+ if (my $fh = $msg->open()) {
print $fh $body;
$fh->close;
}
@@ -1249,13 +1250,15 @@ sub handler {
$r->print($thismsg.'
');
$sendstatus.=' '.$thismsg;
}
+ } else {
+ &printheader($r,'','No messages sent.');
}
if ($sendstatus=~/^(\s*(?:ok|con_delayed)\s*)*$/) {
$r->print('
'.&mt('Completed.').'');
if ($ENV{'form.displayedcrit'}) {
&discrit($r);
} else {
- &disall($r);
+ &Apache::loncommunicate::menu($r);
}
} else {
$r->print(