[livejournal] r21646: LJSUP-11259: Create another alert when c...
Committer: nnikulochkina
LJSUP-11259: Create another alert when can't delete commentU trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl 2012-04-05 09:02:40 UTC (rev 21645)
+++ trunk/cgi-bin/ljprotocol.pl 2012-04-05 09:25:38 UTC (rev 21646)
@@ -121,7 +121,7 @@
"323" => [ E_PERM, "Root entry is suspended; action is prohibited"],
"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."],
+ "326" => [ E_PERM, "Can't delete specified comment"],
"327" => [ E_PERM, "Selected comment has been already deleted"],
# Limit errors
@@ -809,7 +809,7 @@
my @comment_tree = $comment->entry->comment_list;
my @children = ($comment);
while(my $item = shift @children){
- return fail($err, 326, 'dtalkid:'.$item->dtalkid) unless $item->user_can_delete($u);
+ return fail($err, 326, 'Thread contains somebody else\'s comment. dtalkid:'.$item->dtalkid) unless $item->user_can_delete($u);
$map_delete{$item->dtalkid} = $item;
push @children, grep { $_->{parenttalkid} == $item->{jtalkid} } @comment_tree;
}
