Committer: ssafronova
LJSUP-6515: Custom Userheads - LJSUP-6597: Send as a gift: no need to apply userhead, LJSUP-6595: need to add variablesU 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-26 09:22:32 UTC (rev 9411) +++ trunk/cgi-bin/LJ/Pay/Payment/PayItem/Addon.pm 2010-08-26 09:25:23 UTC (rev 9412) @@ -832,7 +832,7 @@ $note_rec_change->($rcpt_u, $payment); # send notification email to user - my ($subj, $msg) = $self->_delivering_message($rcpt_u); + my ($subj, $msg) = $self->_delivering_message($rcpt_u, $buyer_u); warn "[$item_id]: _deliver_item is ok" if $::VERBOSE>1; return (1, $subj, $msg); @@ -840,7 +840,7 @@ sub _delivering_message { my $self = shift; - my $rcpt_u = shift; + my ($rcpt_u, $buyer_u) = @_; my $name = $self->product_name; Modified: trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm =================================================================== --- trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm 2010-08-26 09:22:32 UTC (rev 9411) +++ trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm 2010-08-26 09:25:23 UTC (rev 9412) @@ -102,9 +102,15 @@ sub _delivering_message { my $self = shift; - my $rcpt_u = shift; + my ($rcpt_u, $buyer_u) = @_; - my $msg = "Please visit your Edit Profile page to view your new userhead.\n\n"; + my $msg; + + unless ($buyer_u && $buyer_u->userid != $self->get_rcptid) { + $msg = "You have received a $LJ::SITENAMESHORT userhead.\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"; $msg .= "The $LJ::SITENAMESHORT Team\n";