Inbox messages now tell you who the message was from
This commit is contained in:
parent
f8f797fa24
commit
7cd3266462
3 changed files with 19 additions and 5 deletions
|
|
@ -29,7 +29,7 @@
|
|||
- fixed: Page Layout templates generate invalid HTML with description
|
||||
- fixed: Form/Integer now shows 0 in the results page
|
||||
- added: Email from field now prefixed with username
|
||||
|
||||
- added: Inbox messages now tell you who the message was from
|
||||
7.5.22
|
||||
- fixed: Layout template now gets prepared correctly
|
||||
- fixed: When user does not have permissions to search/edit a thing a proper error is shown.
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ package WebGUI::Inbox::Message;
|
|||
|
||||
use strict;
|
||||
use WebGUI::Mail::Send;
|
||||
|
||||
use WebGUI::International;
|
||||
=head1 NAME
|
||||
|
||||
Package WebGUI::Inbox::Message;
|
||||
|
|
@ -112,12 +112,14 @@ sub create {
|
|||
subject=>$subject,
|
||||
});
|
||||
if (defined $mail) {
|
||||
my $i18n = WebGUI::International->new($session, 'Inbox_Message');
|
||||
my $pref = $i18n->get("from user preface");
|
||||
$pref .= $session->db->quickScalar("SELECT username FROM users WHERE userid = ?",[$properties->{sentBy}]). ".";
|
||||
my $msg = (defined $properties->{emailMessage}) ? $properties->{emailMessage} : $self->{_properties}{message};
|
||||
|
||||
if ($msg =~ m/\<.*\>/) {
|
||||
$mail->addHtml($msg);
|
||||
$mail->addHtml("<p>$pref</p><br>".$msg);
|
||||
} else {
|
||||
$mail->addText($msg);
|
||||
$mail->addText($pref."\n\n".$msg);
|
||||
}
|
||||
$mail->addFooter;
|
||||
$mail->queue;
|
||||
|
|
|
|||
12
lib/WebGUI/i18n/English/Inbox_Message.pm
Normal file
12
lib/WebGUI/i18n/English/Inbox_Message.pm
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
package WebGUI::i18n::English::Inbox_Message;
|
||||
use strict;
|
||||
|
||||
our $I18N = {
|
||||
|
||||
'from user preface' => {
|
||||
message => q|You were sent a message from |,
|
||||
lastUpdated => 0
|
||||
},
|
||||
};
|
||||
|
||||
1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue