Delete links to recent comments, so that you can easily delete a 
comment even on entries you can't access.

        Patch by yvi. 

diffs (47 lines):

diff -r 8f0d28279059 -r 8f122b5b2aef htdocs/tools/recent_comments.bml
--- a/htdocs/tools/recent_comments.bml  Fri Jun 26 13:25:29 2009 +0000
+++ b/htdocs/tools/recent_comments.bml  Fri Jun 26 13:47:43 2009 +0000
@@ -241,7 +241,7 @@ body<=
         $ret .= "<?h1 $ML{ '.latest.posted' } h1?><?p " . 
BML::ml('.last.num.posted.by', {num => $count, user => LJ::ljuser($u) }) . " 
p?>";
         my %jcount;  # jid -> ct
         $ret .= "<table style='text-align: left'>";
-        $ret .= "<tr><th>$ML{ '.time' }</th><th>$ML{ '.location' }</th></tr>";
+        $ret .= "<tr><th>$ML{ '.time' }</th><th>&nbsp;$ML{ '.location' 
}</th><th>&nbsp;$ML{ '.delete' }</th</tr>";
 
         foreach my $r (@posted) {
             $jcount{$r->{'journalid'}}++;
@@ -256,17 +256,18 @@ body<=
 
             my $hr_ago = LJ::ago_text($now - $r->{'posttime'});
             my $subject;
+            my $delete;
             if (defined $lrow->{ditemid}) {
                 $hr_ago = "<a href='$talkurl'>$hr_ago</a>";
                 $subject = $log_text->{"$r->{journalid} $r->{nodeid}"}[0] || 
"$lrow->{ditemid}.html";
                 LJ::CleanHTML::clean_subject(\$subject);
                 $subject = "$subject <a href='$logurl'>(link)</a>";
+                $delete = "&nbsp;<a 
href='$LJ::SITEROOT/delcomment.bml?journal=$ju->{'user'}&amp;id=$talkid'>$ML{ 
'.delete.link' }</a>";
             } else {
                 $subject = $ML{ '.post.deleted' };
             }
 
-            my $links = "[<a href='$talkurl'>$ML{ '.comment' }</a>] [<a 
href='$logurl'>$ML{ '.entry' }</a>]\n";
-            $ret .= "<tr><td>$hr_ago</td><td>" . LJ::ljuser($ju->{user}) . ": 
$subject</td></tr>";
+            $ret .= "<tr><td>$hr_ago</td><td>" . LJ::ljuser($ju->{user}) . ": 
$subject</td><td>$delete</td></tr>";
         }
         $ret .= "</table>";
     }
diff -r 8f0d28279059 -r 8f122b5b2aef htdocs/tools/recent_comments.bml.text
--- a/htdocs/tools/recent_comments.bml.text     Fri Jun 26 13:25:29 2009 +0000
+++ b/htdocs/tools/recent_comments.bml.text     Fri Jun 26 13:47:43 2009 +0000
@@ -7,6 +7,10 @@
 .comment.link=Comment Link
 
 .comment=Comment
+
+.delete=Delete
+
+.delete.link=delete
 
 .entry.link=Entry Link
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to