holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[ljcom] r12127: LJSUP-12413: New promo product - Promo i...

Committer: akanashin
LJSUP-12413: New promo product - Promo in notifications
U   trunk/cgi-bin/LJ/Hooks/ESN.pm
Modified: trunk/cgi-bin/LJ/Hooks/ESN.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/ESN.pm	2012-06-18 14:44:53 UTC (rev 12126)
+++ trunk/cgi-bin/LJ/Hooks/ESN.pm	2012-06-19 05:46:29 UTC (rev 12127)
@@ -85,6 +85,7 @@
     my $params;
     my $str;
 
+    eval {
     return if $LJ::DISABLED{notificationpromo};
 
     my $active_region = lc($u->prop('country') || LJ::GeoLocation->get_country_info_by_ip());
@@ -105,9 +106,19 @@
     my $tmpl = LJ::HTML::Template->new({use_expr => 1}, filename => "$ENV{LJHOME}/templates/Shop/$tmpl_file");
     $tmpl->param( 'data_notificationpromo' => [$params] );
 
-    return $tmpl->output();
+    $str = $tmpl->output();
+    };
+
+    if ($@) {
+        warn $@;
+        return '';
+    }
+
+    return $str;
+
 });
 
+
 LJ::register_hook('subscriptions_manage_friend_pending_extra', sub {
     my $remote = shift;
     return LJ::Subscription::Pending->new(

Tags: akanashin, holyandrew, ljcom, pm
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments