sunnyman's (sunnyman) wrote in changelog,
sunnyman's
sunnyman
changelog

[livejournal] r21604: LJSUP-11286: LJ.XMLRPC.deletecomments ne...

Committer: vtroitsky
LJSUP-11286: LJ.XMLRPC.deletecomments need display when trying to delete a remote comment
U   trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2012-03-30 08:15:46 UTC (rev 21603)
+++ trunk/cgi-bin/ljprotocol.pl	2012-03-30 10:20:45 UTC (rev 21604)
@@ -122,8 +122,8 @@
      "324" => [ E_PERM, "Parent comment is frozen; action is prohibited"],
      "325" => [ E_PERM, "Can't edit that comment."],
      "326" => [ E_PERM, "Can't delete specified comment."],
+     "327" => [ E_PERM, "Selected comment has been already deleted"],
 
-
      # Limit errors
      "402" => [ E_TEMP, "Your IP address is temporarily banned for exceeding the login failure rate." ],
      "404" => [ E_TEMP, "Cannot post" ],
@@ -795,7 +795,8 @@
 
     my @comments = map { LJ::Comment->new($journal, dtalkid => $_) } @ids;
 
-    foreach my $comm (@comments) { 
+    foreach my $comm (@comments) {
+        return fail($err, 327, 'dtalkid:'.$comm->dtalkid) if $comm->is_deleted;
         return fail($err, 326, 'dtalkid:'.$comm->dtalkid) unless $comm->user_can_delete($u);
     }   
 

Tags: livejournal, pl, sunnyman, vtroitsky
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