RFE for making an user's inbox filterable by the person who sent it.

Includes template changes, i18n, help and tests.
This commit is contained in:
Colin Kuskie 2009-05-13 17:20:40 +00:00
commit 385d35c13b
8 changed files with 196 additions and 70 deletions

View file

@ -97,12 +97,22 @@ Email message to use rather than inbox message contents.
Email subject to use rather than inbox message subject.
=head3 options
A hash reference containing options for handling the message.
=head4 testing
If testing is true, then no email will be made or sent. Only
the inbox message will be made.
=cut
sub create {
my $class = shift;
my $session = shift;
my $properties = shift;
my $class = shift;
my $session = shift;
my $properties = shift;
my $options = shift || {};
my $self = {};
$self->{_properties}{messageId} = "new";
$self->{_properties}{status} = $properties->{status} || "pending";
@ -149,11 +159,13 @@ sub create {
}
my $subject = (defined $properties->{emailSubject}) ? $properties->{emailSubject} : $self->{_properties}{subject};
my $mail = WebGUI::Mail::Send->create($session, {
toUser=>$self->{_properties}{userId},
toGroup=>$self->{_properties}{groupId},
subject=>$subject,
});
my $mail = $options->{testing}
? undef
: WebGUI::Mail::Send->create($session, {
toUser=>$self->{_properties}{userId},
toGroup=>$self->{_properties}{groupId},
subject=>$subject,
});
if (defined $mail) {
my $preface = "";
my $fromUser = WebGUI::User->new($session, $properties->{sentBy});