--- loncom/interface/lonmsgdisplay.pm 2006/12/18 00:16:27 1.53
+++ loncom/interface/lonmsgdisplay.pm 2006/12/23 06:22:36 1.56.2.1
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.53 2006/12/18 00:16:27 raeburn Exp $
+# $Id: lonmsgdisplay.pm,v 1.56.2.1 2006/12/23 06:22:36 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -178,7 +178,7 @@ sub folderlist {
my %userfolders;
foreach my $key (keys(%gotfolders)) {
- $key =~ s/(['"])/\$1/g;
+ $key =~ s/(['"])/\$1/g; #' stupid emacs
$userfolders{$key} = $key;
}
my @userorder = sort(keys(%userfolders));
@@ -301,20 +301,16 @@ sub scrollbuttons {
$start++; $maxdis++;$first++;$finish++;
my %statushash = &get_msgstatus_types();
- my $status;
- if ($msgstatus eq '') {
- $status = &mt('All');
- } else {
- $status = $statushash{$msgstatus};
- }
+
return
- ''.&mt('Page').': '.
- ''.
- ''.
- ' of '.$maxdis.
- ''.
- '
'.
- &mt('[_1] messages: showing messages [_2] through [_3] of [_4].',$status,$first,$finish,$total).'';
+ ''.&mt('Page').': '.
+ ''.
+ ''.
+ ' of '.$maxdis.
+ ''.
+ '
'.
+ &mt('_location_in_mail_folder',$msgstatus,$statushash{$msgstatus},
+ $first,$finish,$total).'';
}
# =============================================================== Status Change
@@ -381,20 +377,20 @@ sub deletefolder {
my ($folder)=@_;
my %permfolders = &get_permanent_folders();
if (defined($permfolders{$folder})) {
- return &mt('The folder [_1] may not be deleted',$folder);
+ return &mt('The folder "[_1]" may not be deleted',$folder);
}
my %userfolders = &Apache::lonmsg::get_user_folders();
if (!defined($userfolders{$folder})) {
- return &mt('The folder [_1] does not exist so deletion is not required.',
+ return &mt('The folder "[_1]" does not exist so deletion is not required.',
$folder);
}
# check folder is empty;
my $suffix=&Apache::lonmsg::foldersuffix($folder);
my @messages = &Apache::lonnet::getkeys('nohist_email'.$suffix);
if (@messages > 0) {
- return &mt('The folder [_1] contains messages so it may not be deleted.').
- '
'.
- &mt('Delete or move the messages to a different folder first.');
+ return &mt('The folder "[_1]" contains messages so it may not be deleted.',$folder).
+ '
'.
+ &mt('Delete or move the messages to a different folder first.');
}
my $delresult = &Apache::lonnet::del('email_folders',[$folder]);
return $delresult;
@@ -960,19 +956,14 @@ sub disfolder {
ENDDISHEADER
- my %gotfolders = &Apache::lonmsg::get_user_folders();
- my %userfolders;
+
my $fsqs='&folder='.$folder;
my @temp=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus);
my $totalnumber=$#temp+1;
if ($totalnumber < 1) {
- if ($msgstatus eq '') {
- $r->print('