Committer: ailyin
LJSV-1145 (Cannot edit a comment if its parent comment has been deleted): in case the parent comment is non-existant, pretend that we're editing a first-tier replyU trunk/cgi-bin/LJ/S2/ReplyPage.pm U trunk/htdocs/talkpost.bml
Modified: trunk/cgi-bin/LJ/S2/ReplyPage.pm =================================================================== --- trunk/cgi-bin/LJ/S2/ReplyPage.pm 2010-09-10 07:45:36 UTC (rev 17339) +++ trunk/cgi-bin/LJ/S2/ReplyPage.pm 2010-09-10 07:50:13 UTC (rev 17340) @@ -85,6 +85,8 @@ } $parpost = $comment->parent; + $parpost = undef if $parpost && !$parpost->is_active; + $replytoid = $parpost ? $comment->parent->dtalkid : 0; $comment_values{edit} = $editid; Modified: trunk/htdocs/talkpost.bml =================================================================== --- trunk/htdocs/talkpost.bml 2010-09-10 07:45:36 UTC (rev 17339) +++ trunk/htdocs/talkpost.bml 2010-09-10 07:50:13 UTC (rev 17340) @@ -29,6 +29,8 @@ return $errtxt unless $comment->remote_can_edit(\$errtxt); my $parent = $comment->parent; + $parent = undef if $parent && !$parent->is_active; + $FORM{replyto} = $parent ? $comment->parent->dtalkid : 0; $FORM{subject} = $comment->subject_orig; @@ -75,7 +77,7 @@ my $parpost; my $reply; - if ($init->{'replyto'} || ($editid && $comment->parenttalkid)) + if ($init->{'replyto'}) { my $qparentid = $init->{'replyto'};