[Bps-public-commit] App-Changeloggr branch, master, updated. 31b00a5ac22c878c400ecac6094a7631d04d0902
sartak at bestpractical.com
sartak at bestpractical.com
Thu Jul 30 16:09:12 EDT 2009
The branch, master has been updated
via 31b00a5ac22c878c400ecac6094a7631d04d0902 (commit)
via d3c5ae246eec23b8ed1d5880c0f09de209686dbf (commit)
from 8f398d32b72e41ac6008e06545b0099e4772addc (commit)
Summary of changes:
lib/App/Changeloggr/Model/User.pm | 3 ++-
lib/App/Changeloggr/View/Leaderboard.pm | 2 ++
2 files changed, 4 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit d3c5ae246eec23b8ed1d5880c0f09de209686dbf
Author: Shawn M Moore <sartak at gmail.com>
Date: Thu Jul 30 16:08:27 2009 -0400
Don't increase votes for private tag (like skip)
diff --git a/lib/App/Changeloggr/Model/User.pm b/lib/App/Changeloggr/Model/User.pm
index 17b12c5..7da6d60 100644
--- a/lib/App/Changeloggr/Model/User.pm
+++ b/lib/App/Changeloggr/Model/User.pm
@@ -71,11 +71,12 @@ sub votes {
sub vote_placement {
my $self = shift;
- my $votes = $self->votes->count;
+ my $votes = $self->votes->limit_to_visible('tag')->count;
my $place = Jifty->handle->simple_query(<<"EOSQL")->fetch->[0];
select count(*)
from (select user_id
from votes
+ where votes.tag not like E'\\\\_%'
group by votes.user_id
having count(*) >= $votes) as v;
EOSQL
commit 31b00a5ac22c878c400ecac6094a7631d04d0902
Author: Shawn M Moore <sartak at gmail.com>
Date: Thu Jul 30 16:08:58 2009 -0400
Exclude private tags from leaderboard
diff --git a/lib/App/Changeloggr/View/Leaderboard.pm b/lib/App/Changeloggr/View/Leaderboard.pm
index 08f52a9..d8b3e8b 100644
--- a/lib/App/Changeloggr/View/Leaderboard.pm
+++ b/lib/App/Changeloggr/View/Leaderboard.pm
@@ -20,7 +20,9 @@ template '/changelog' => page {
sub show_leaderboard {
my $votes = shift;
+ $votes->limit_to_visible('tag');
$votes->group_by_voter;
+
ol {
for (0 .. 25) {
my $vote = $votes->next
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list