Kevin M. Brooks (lucretio) wrote in lj_dev,
Kevin M. Brooks
lucretio
lj_dev

PATCH: fix links on talkread.bml

Right now, if a journal is clustered, and one of it's entries has enough comments to do threading, the "(Thread)" link points to a nonexistent post.

Example: http://www.livejournal.com/talkread.bml?journal=news&itemid=52336

Shouldn't itemid be replaced with ditemid in most places?

lucretio@goathack:~/htdocs$ cvsreport.pl -d htdocs/talkread.bml | less
main -> cvs          htdocs/talkread.bml
--- /home/lucretio/cvs/livejournal/htdocs/talkread.bml  Tue Feb  5 12:42:21 2002
+++ /home/lucretio/htdocs/talkread.bml  Wed Feb  6 04:38:56 2002
@@ -485,10 +485,10 @@

                $$ret .= "<p><font size='-2'>";
                if ($post->{'parenttalkid'} != 0 && $post_count >= $PAGE_SIZE) {
-                   $$ret .= "<a href='$SELF?${jargent}itemid=$itemid&thread=$post->{'parenttalkid'}'>(Parent)</a> ";
+                   $$ret .= "<a href='$SELF?${jargent}itemid=$ditemid&thread=$post->{'parenttalkid'}'>(Parent)</a> ";
                }
                if (defined $opts->{'children'}->{$tid} && $post_count >= $PAGE_SIZE) {
-                   $$ret .= "<a href='$SELF?${jargent}itemid=$itemid&thread=$tid'>(Thread)</a> ";
+                   $$ret .= "<a href='$SELF?${jargent}itemid=$ditemid&thread=$tid'>(Thread)</a> ";
                }

                my $dtid = $clustered ? ($tid * 256 + $init->{'anum'}) : $tid;
@@ -498,7 +498,7 @@
                # link to message
                $$ret .= "<a name='t$tid'></a><table><tr>";
                $$ret .= "<td><img src='$LJ::IMGPREFIX/dot.gif' height='1' width='" . ($opts->{'depth'} * 25) . "'></td>";
-               $$ret .= "<td><a href='$SELF?${jargent}itemid=$itemid&thread=$tid'>" . BML::eall($post->{'subject'} || "(no subject)") . "</a> - $user, <i>$post->{'datepost'}</i></td></tr></table>\n";
+               $$ret .= "<td><a href='$SELF?${jargent}itemid=$ditemid&thread=$tid'>" . BML::eall($post->{'subject'} || "(no subject)") . "</a> - $user, <i>$post->{'datepost'}</i></td></tr></table>\n";
            }
        }
     }
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 5 comments