Committer: amyshkin
LJSUP-10226: Test notifications templateU trunk/cgi-bin/LJ/Hooks/ESN.pm
Modified: trunk/cgi-bin/LJ/Hooks/ESN.pm =================================================================== --- trunk/cgi-bin/LJ/Hooks/ESN.pm 2011-10-25 09:10:18 UTC (rev 11115) +++ trunk/cgi-bin/LJ/Hooks/ESN.pm 2011-10-25 10:33:01 UTC (rev 11116) @@ -12,14 +12,14 @@ my ($self, $opts, $ev) = @_; my $u = $self->u; - my $frame_filename = '"$ENV{LJHOME}/templates/ESN/frame.tmpl"'; + my $frame_filename = "$ENV{LJHOME}/templates/ESN/frame.tmpl"; return unless -e $frame_filename; my $plain_body = $ev->as_email_string($u); return undef unless $plain_body; my $html_body = $ev->as_email_html($u); - return undef $html_body; + return undef unless $html_body; my $email_subject = $ev->as_email_subject($u); return undef unless $email_subject; @@ -36,7 +36,8 @@ my $frame_tmpl = LJ::HTML::Template->new(filename => $frame_filename); return unless $frame_tmpl; - $html_body = $frame_tmpl->output( message => $html_body ); + $frame_tmpl->param( message => $html_body ); + $html_body = $frame_tmpl->output(); } my %headers = (