]> git.mxchange.org Git - quix0rs-gnu-social.git/commit
Ticket 2141: bugs with weighted popularity lists across year boundary.
authorBrion Vibber <brion@status.net>
Mon, 4 Jan 2010 19:55:27 +0000 (11:55 -0800)
committerBrion Vibber <brion@status.net>
Mon, 4 Jan 2010 19:55:27 +0000 (11:55 -0800)
commit6911e1c7972c3adec53d0fe04ebdd7da0fbd8b12
tree014e47a5abc93e3c351f65922e5ef517ffcf1eef
parente3466ab51cf68bd62ecd914a3771ed33de824e52
Ticket 2141: bugs with weighted popularity lists across year boundary.

Consolidated several separate implementations of the same weighting algorithm into common_sql_weight() and fixed some bugs...
For MySQL, now using timestampdiff() instead of subtraction for the comparison, so we get sane results when the year doesn't match, and utc_timestamp() rather than now() so we don't get negative ages for recent items with local server timezone.
Unknown whether the same problems affect PostgreSQL, but note that it lacks the timestampdiff() SQL function.
actions/favorited.php
actions/publictagcloud.php
lib/grouptagcloudsection.php
lib/personaltagcloudsection.php
lib/popularnoticesection.php
lib/util.php