August 9th, 2002

livejournal

Module Name: livejournal
Committed By: bradfitz
Date: Fri Aug 9 18:46:00 UTC 2002

Modified Files:
---------------
livejournal/cgi-bin: ljlib.pl

Log Message:
------------
avva: shouldn't call such BML functions from non-BML-land,
as those work on a cached or unset $r object

Fixes Deadjournal errors and random logouts.


To generate a diff of this commit:
cvs rdiff -r1.236 -r1.237 livejournal/cgi-bin/ljlib.pl
http://cvs.livejournal.org/browse.cgi/livejournal/cgi-bin/ljlib.pl.diff?r1=1.236&r2=1.237

livejournal

Module Name: livejournal
Committed By: bradfitz
Date: Sat Aug 10 03:20:32 UTC 2002

Modified Files:
---------------
livejournal/bin/upgrading: base-data.sql
livejournal/cgi-bin: ljviews.pl talklib.pl
livejournal/htdocs: delcomment.bml talkpost_do.bml talkscreen.bml

Log Message:
------------
avva: This patch fixes replycounts so they don't include screened comments.
Fixes this: http://zilla.livejournal.org/show_bug.cgi?id=13

Tested.


To generate a diff of this commit:
cvs rdiff -r1.26 -r1.27 livejournal/bin/upgrading/base-data.sql
http://cvs.livejournal.org/browse.cgi/livejournal/bin/upgrading/base-data.sql.diff?r1=1.26&r2=1.27
cvs rdiff -r1.65 -r1.66 livejournal/cgi-bin/ljviews.pl
http://cvs.livejournal.org/browse.cgi/livejournal/cgi-bin/ljviews.pl.diff?r1=1.65&r2=1.66
cvs rdiff -r1.19 -r1.20 livejournal/cgi-bin/talklib.pl
http://cvs.livejournal.org/browse.cgi/livejournal/cgi-bin/talklib.pl.diff?r1=1.19&r2=1.20
cvs rdiff -r1.17 -r1.18 livejournal/htdocs/delcomment.bml
http://cvs.livejournal.org/browse.cgi/livejournal/htdocs/delcomment.bml.diff?r1=1.17&r2=1.18
cvs rdiff -r1.73 -r1.74 livejournal/htdocs/talkpost_do.bml
http://cvs.livejournal.org/browse.cgi/livejournal/htdocs/talkpost_do.bml.diff?r1=1.73&r2=1.74
cvs rdiff -r1.2 -r1.3 livejournal/htdocs/talkscreen.bml
http://cvs.livejournal.org/browse.cgi/livejournal/htdocs/talkscreen.bml.diff?r1=1.2&r2=1.3

livejournal

Module Name: livejournal
Committed By: bradfitz
Date: Sat Aug 10 06:27:54 UTC 2002

Modified Files:
---------------
livejournal/bin/upgrading: base-data.sql
livejournal/htdocs: userinfo.bml

Log Message:
------------
BF> New non-UI userprop needed: "dont_load_members", so it won't even try to
BF> suck that info down. Maybe instead do a SELECT COUNT(*) , but don't
BF> populate the data structure and all.

avva:
Attached. I tried to preserve all existing conditions and outputs, yet
simplify the logic to allow much easier tweaking in the future.
There're two hashes, %friends and %friendsof, and their values
determine how lists are loaded and displayed, according to keys:
'load'=1 - request to load, 'loaded'=1 - the list's been loaded,
'display'=1 - request to display the full list and not just the count,
'count' - total number, filled in even if the list itself isn't
loaded.

The logic is much less ugly now.

To load the total, I used a simpler dumber query over friends w/o
joining with user and checking statusvis='V' (for example) - I rooted
for speed as you asked me.

Tested, but please review carefully, there're lots of various
conditions, I might've missed some.


To generate a diff of this commit:
cvs rdiff -r1.27 -r1.28 livejournal/bin/upgrading/base-data.sql
http://cvs.livejournal.org/browse.cgi/livejournal/bin/upgrading/base-data.sql.diff?r1=1.27&r2=1.28
cvs rdiff -r1.64 -r1.65 livejournal/htdocs/userinfo.bml
http://cvs.livejournal.org/browse.cgi/livejournal/htdocs/userinfo.bml.diff?r1=1.64&r2=1.65