Ignore the parent comment when editing a reply to a deleted comment.

        Codemerge from LJ; adapted for Dreamwidth by <user name=yvi>. 

diffs (33 lines):

diff -r 518b72120000 -r b742d4633e8c cgi-bin/LJ/S2/ReplyPage.pm
--- a/cgi-bin/LJ/S2/ReplyPage.pm        Thu Sep 09 19:24:25 2010 +0800
+++ b/cgi-bin/LJ/S2/ReplyPage.pm        Sat Sep 11 09:10:59 2010 -0500
@@ -109,6 +109,8 @@ sub ReplyPage
         }
 
         $parpost = $comment->parent;
+        # for comments where the parent comment is deleted, we pretend the 
parent comment doesn't exist so the user can edit
+        $parpost = undef if $parpost && $parpost->is_deleted;
         $replytoid = $parpost ? $comment->parent->dtalkid : 0;
 
         $comment_values{edit} = $editid;
diff -r 518b72120000 -r b742d4633e8c htdocs/talkpost.bml
--- a/htdocs/talkpost.bml       Thu Sep 09 19:24:25 2010 +0800
+++ b/htdocs/talkpost.bml       Sat Sep 11 09:10:59 2010 -0500
@@ -46,6 +46,8 @@ body<=
         return $errtxt unless $comment->remote_can_edit(\$errtxt);
 
         my $parent = $comment->parent;
+        # for comments where the parent comment is deleted, we pretend the 
parent comment doesn't exist so the user can edit
+        $parent = undef if $parent && $parent->is_deleted;
         $FORM{replyto} = $parent ? $comment->parent->dtalkid : 0;
 
         $FORM{subject} = $comment->subject_orig;
@@ -88,7 +90,7 @@ body<=
     my $parpost;
     my $reply;
 
-    if ($init->{'replyto'} || ($editid && $comment->parenttalkid))
+    if ( $init->{replyto} )
     {
         my $qparentid = $init->{'replyto'};
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to