kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2009-09-09 01:18 am

[dw-free] Recent Comments page uses old URL structure for anchors

[commit: http://hg.dwscoalition.org/dw-free/rev/e0fda35223d3]

http://bugs.dwscoalition.org/show_bug.cgi?id=1704

Fix thread anchors on the Recent Comments page.

Patch by [personal profile] yvi.

Files modified:
  • htdocs/tools/recent_comments.bml
--------------------------------------------------------------------------------
diff -r de69dffa3c00 -r e0fda35223d3 htdocs/tools/recent_comments.bml
--- a/htdocs/tools/recent_comments.bml	Tue Sep 08 15:03:19 2009 -0500
+++ b/htdocs/tools/recent_comments.bml	Tue Sep 08 20:18:11 2009 -0500
@@ -141,7 +141,8 @@ body<=
         my $talkid = ($r->{'jtalkid'} << 8) + $lrow->{'anum'};
 
         my $ditemid = "$root/$lrow->{ditemid}.html";
-        my $talkurl = "$root/$lrow->{ditemid}.html?thread=$talkid\#t$talkid";
+        my $commentanchor = LJ::Talk::comment_anchor( $talkid );
+        my $talkurl = "$root/$lrow->{ditemid}.html?thread=$talkid$commentanchor";
 
         my $bgcolor = "transparent";
         my $state = "";
@@ -258,7 +259,8 @@ body<=
             my $talkid = ($r->{'jtalkid'} << 8) + $lrow->{'anum'};
 
             my $logurl = $ju->journal_base . "/$lrow->{ditemid}.html";
-            my $talkurl = "$logurl?thread=$talkid\#t$talkid";
+            my $commentanchor = LJ::Talk::comment_anchor( $talkid );
+            my $talkurl = "$logurl?thread=$talkid$commentanchor";
 
             my $hr_ago = LJ::ago_text($now - $r->{'posttime'});
             my $subject;
--------------------------------------------------------------------------------