[ljcom] r9443: LJSUP-6632. Changes to the email sent to...
Committer: gprochaev
LJSUP-6632. Changes to the email sent to the recipient of a custom userheadU trunk/cgi-bin/LJ/Pay/Payment/PayItem/Addon.pm U trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm
Modified: trunk/cgi-bin/LJ/Pay/Payment/PayItem/Addon.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/Payment/PayItem/Addon.pm 2010-08-30 10:35:40 UTC (rev 9442)
+++ trunk/cgi-bin/LJ/Pay/Payment/PayItem/Addon.pm 2010-08-30 10:49:28 UTC (rev 9443)
@@ -833,7 +833,8 @@
}
# note that this user's bill changed
- $note_rec_change->($rcpt_u, $payment);
+ $note_rec_change->($rcpt_u, $payment)
+ if $self->is_recbillable;
# send notification email to user
my ($subj, $msg) = $self->_delivering_message($rcpt_u, $buyer_u);
Modified: trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm 2010-08-30 10:35:40 UTC (rev 9442)
+++ trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm 2010-08-30 10:49:28 UTC (rev 9443)
@@ -124,12 +124,16 @@
my $self = shift;
my ($rcpt_u, $buyer_u) = @_;
- my $msg;
+ my $msg = "Dear " . $rcpt_u->{user} . ",\n\n";
- unless ($buyer_u && $buyer_u->userid != $self->get_rcptid) {
- $msg = "You have received a $LJ::SITENAMESHORT userhead.\n"
+ my $from;
+ if ($self->{anon} != 1 && $buyer_u && $rcpt_u->{userid} != $buyer_u->{userid}) {
+ my $username = $buyer_u ? $buyer_u->user : '';
+ $from = "from $username";
}
+ $msg .= "You have received a $LJ::SITENAMESHORT userhead $from for your account!\n";
+
$msg .= "Please visit your Edit Profile page to view your new userhead.\n\n";
$msg .= "$LJ::SITEROOT/manage/profile/\n\n";
$msg .= "Sincerely,\n";
