version 1.230, 2010/11/10 14:44:50
|
version 1.232, 2011/03/05 21:32:02
|
Line 527 sub sendnotification {
|
Line 527 sub sendnotification {
|
to access the full message.',$url); |
to access the full message.',$url); |
my %userenv = &Apache::lonnet::get('environment',['notifywithhtml'],$toudom,$touname); |
my %userenv = &Apache::lonnet::get('environment',['notifywithhtml'],$toudom,$touname); |
my $subject = &mt_user($user_lh,"'New' $critical message from ").$sender; |
my $subject = &mt_user($user_lh,"'New' $critical message from ").$sender; |
|
unless ($subj eq '') { |
|
$subject = $subj; |
|
} |
|
|
my ($blocked,$blocktext); |
my ($blocked,$blocktext); |
if (!$crit) { |
if (!$crit) { |
Line 578 sub make_htmlfree {
|
Line 581 sub make_htmlfree {
|
|
|
sub mynewmail{ |
sub mynewmail{ |
&newmail(); |
&newmail(); |
return $env{'user.mailcheck.lastnewmassagetime'} > $env{'user.mailcheck.lastvisit'}; |
return $env{'user.mailcheck.lastnewmessagetime'} > $env{'user.mailcheck.lastvisit'}; |
} |
} |
|
|
|
|
Line 586 sub newmail {
|
Line 589 sub newmail {
|
if ((time-$env{'user.mailcheck.time'})>300) { |
if ((time-$env{'user.mailcheck.time'})>300) { |
my %what=&Apache::lonnet::get('email_status',['recnewemail']); |
my %what=&Apache::lonnet::get('email_status',['recnewemail']); |
&Apache::lonnet::appenv({'user.mailcheck.time'=>time}); |
&Apache::lonnet::appenv({'user.mailcheck.time'=>time}); |
&Apache::lonnet::appenv({'user.mailcheck.lastnewmassagetime'=> $what{'recnewemail'}}); |
&Apache::lonnet::appenv({'user.mailcheck.lastnewmessagetime'=> $what{'recnewemail'}}); |
if ($what{'recnewemail'}>0) { return 1; } |
if ($what{'recnewemail'}>0) { return 1; } |
} |
} |
return 0; |
return 0; |