[dw-free] identify deleted replies to journal
[commit: http://hg.dwscoalition.org/dw-free/rev/7b5e08b1f2f2]
http://bugs.dwscoalition.org/show_bug.cgi?id=2877
Present more information about deleted replies in the inbox, in the form of:
Deleted comment to post from x weeks/days/seconds ago in journal: comment by
poster in "subject of entry"
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2877
Present more information about deleted replies in the inbox, in the form of:
Deleted comment to post from x weeks/days/seconds ago in journal: comment by
poster in "subject of entry"
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/LJ/Event/JournalNewComment.pm
-------------------------------------------------------------------------------- diff -r bb1e29820f6f -r 7b5e08b1f2f2 cgi-bin/LJ/Event/JournalNewComment.pm --- a/cgi-bin/LJ/Event/JournalNewComment.pm Tue May 17 00:09:13 2011 +0800 +++ b/cgi-bin/LJ/Event/JournalNewComment.pm Tue May 17 00:38:21 2011 +0800 @@ -253,20 +253,25 @@ my $comment = $self->comment; my $journal = $self->u; - return sprintf("(Deleted comment in %s)", $journal->ljuser_display) - unless $comment && $comment->valid && !$comment->is_deleted; - my $entry = $comment->entry; return sprintf("(Comment on a deleted entry in %s)", $journal->ljuser_display) unless $entry && $entry->valid; + my $entry_subject = $entry->subject_text || "an entry"; + return sprintf(qq{(Deleted comment to post from %s in %s: comment by %s in "%s")}, + LJ::diff_ago_text( $entry->logtime_unix ), + $journal->ljuser_display, + $comment->poster->ljuser_display, + $entry_subject + ) + unless $comment && $comment->valid && !$comment->is_deleted; + return "(You are not authorized to view this comment)" unless $comment->visible_to($target); my $ju = LJ::ljuser($journal); my $pu = LJ::ljuser($comment->poster); my $url = $comment->url; - my $entry_subject = $entry->subject_text || "an entry"; my $in_text = '<a href="' . $entry->url . "\">$entry_subject</a>"; my $subject = $comment->subject_text ? ' "' . $comment->subject_text . '"' : ''; --------------------------------------------------------------------------------
no subject
no subject