February 27th, 2002

livejournal: old URL support & use anum-ified IDs in more places for consistency

Module Name: livejournal
Committed By: bradfitz
Date: Wed Feb 27 18:06:58 UTC 2002

Modified Files:
livejournal/cgi-bin: talklib.pl
livejournal/htdocs: delcomment.bml talkread.bml

Log Message:

This patch does three things:
1) makes links of the form

continue to work after the journal has been clusterised.

2) makes talkread.bml use ditemid-style links for "thread=" arguments,
associated #name anchor tags, and "id=" argument to delcomment.bml,
for all posts.

Just like currently with "replyto", the code uses the anum value of
the post in order to create a "dtalkid", seeing that individual
comments don't have anum's of their own (for some reason I thought
they did, but I seem to've been mistaken).

A different way to achieve consistency would be to have 'replyto' use
the real talkid instead of dtalkid. But that would mean: 1) much less
trivial changes in the code; 2) inconsistency between "public-style"
itemid's and "real-style" talkid's; 3) ability of everyone to see
immediately how many comments the user has in the journal -- which is
something we don't want to happen for events, anyway, so might as well
"hide" it here.

3) makes delcomment.bml handle the dtalkid-style of its argument.

I think I tested it pretty well.


If there are bugs, they might be in my changes to the patch. :)

To generate a diff of this commit:
cvs rdiff -r1.13 -r1.14 livejournal/cgi-bin/talklib.pl
cvs rdiff -r1.12 -r1.13 livejournal/htdocs/delcomment.bml
cvs rdiff -r1.56 -r1.57 livejournal/htdocs/talkread.bml