vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[ljcom] r9542: LJSUP-6899: Remove useless 'confirm you ...

Committer: vsukhanov
LJSUP-6899: Remove useless 'confirm you are human' error from remotelog-watch
U   trunk/cgi-bin/LJ/SUP/RPC/Command/add_comment.pm
Modified: trunk/cgi-bin/LJ/SUP/RPC/Command/add_comment.pm
===================================================================
--- trunk/cgi-bin/LJ/SUP/RPC/Command/add_comment.pm	2010-09-23 08:07:15 UTC (rev 9541)
+++ trunk/cgi-bin/LJ/SUP/RPC/Command/add_comment.pm	2010-09-23 09:41:03 UTC (rev 9542)
@@ -34,7 +34,7 @@
     return { error => "Message is a spam" }
         if LJ::Comment->is_text_spam( \ $params->{body} );
 
-    my $comment        = LJ::Comment->create(
+    my $comment = eval { LJ::Comment->create(
                                 journal      => $self->journal,
                                 ditemid      => $params->{ditemid},
                                 parenttalkid => ($params->{parenttalkid} || int($params->{parent} / 256)),
@@ -48,7 +48,8 @@
                                                     picture_keyword 
                                                                  => $params->{prop_picture_keyword},
                                                 }
-                                );
+                                ) };
+    return { error => $@ } if $@;
 
     #
     # Comment Added

Tags: ljcom, pm, vadvs
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