Date: Wed, 30 May 2012 00:57:03 +0000 (UTC) From: Dag-Erling Smorgrav <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r236271 - user/des/fbce/lib/FBCE/Controller Message-ID: <201205300057.q4U0v3Jq015338@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Wed May 30 00:57:03 2012 New Revision: 236271 URL: http://svn.freebsd.org/changeset/base/236271 Log: Get max_votes from the correct place. This unbreaks voting. Modified: user/des/fbce/lib/FBCE/Controller/Root.pm Modified: user/des/fbce/lib/FBCE/Controller/Root.pm ============================================================================== --- user/des/fbce/lib/FBCE/Controller/Root.pm Wed May 30 00:56:26 2012 (r236270) +++ user/des/fbce/lib/FBCE/Controller/Root.pm Wed May 30 00:57:03 2012 (r236271) @@ -33,7 +33,7 @@ sub auto :Private { $c->stash(title => FBCE->config->{'title'}); my $now = DateTime->now(); $c->stash(now => $now); - my $schedule = $c->comp('FBCE::Model::Schedule'); + my $schedule = FBCE->model('Schedule'); foreach my $phase ("nominating", "voting") { foreach my $endpoint ("${phase}_starts", "${phase}_ends") { $c->stash($endpoint => $schedule->{$endpoint}); @@ -44,8 +44,9 @@ sub auto :Private { $c->stash(nominating => $schedule->nominating($now)); $c->stash(voting => $schedule->voting($now)); $c->stash(announced => $schedule->announced($now)); - # XXX does not really belong in FBCE::Schedule - $c->stash(max_votes => $schedule->{'max_votes'}); + + my $rules = FBCE->model('Rules'); + $c->stash(max_votes => $rules->{'max_votes'}); # Authentication if ($c->request->path !~ m/^(login|logout|bylaws|help|static\/.*)?$/) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205300057.q4U0v3Jq015338>