diff -rp -u3 slash/Slash/DB/Static/MySQL/MySQL.pm slash_mod/Slash/DB/Static/MySQL/MySQL.pm --- slash/Slash/DB/Static/MySQL/MySQL.pm Tue May 25 15:59:11 2004 +++ slash_mod/Slash/DB/Static/MySQL/MySQL.pm Wed May 26 11:06:06 2004 @@ -635,6 +635,7 @@ sub getTop10Comments { ($constants->{comment_minscore}, $constants->{comment_maxscore}); my $num_wanted = $constants->{top10comm_num} || 10; + my $daysback = $constants->{top10comm_days} || 1; my $cids = []; my $comments = []; @@ -655,7 +656,7 @@ sub getTop10Comments { 'cid', 'comments', "cid >= $min_cid - AND date >= DATE_SUB(NOW(), INTERVAL 1 DAY) + AND date >= DATE_SUB(NOW(), INTERVAL $daysback DAY) AND points >= $max_score", 'ORDER BY date DESC'); diff -rp -u3 slash/sql/mysql/upgrades slash_mod/sql/mysql/upgrades --- slash/sql/mysql/upgrades Tue May 25 17:40:23 2004 +++ slash_mod/sql/mysql/upgrades Wed May 26 11:08:53 2004 @@ -2276,3 +2276,6 @@ INSERT INTO vars (name, value, descripti # End of T_2_3_0_151, Start of T_2_3_0_152 - 2004/04/27 +INSERT INTO vars (name, value, description) VALUES ('top10comm_days','1','Look back (n) days to display the top 10 comments'); + +