svn commit: r236709 - user/des/fbce/lib/FBCE/Controller
Dag-Erling Smorgrav
des at FreeBSD.org
Thu Jun 7 09:22:42 UTC 2012
Author: des
Date: Thu Jun 7 09:22:41 2012
New Revision: 236709
URL: http://svn.freebsd.org/changeset/base/236709
Log:
Access the model through our context rather than directly from FBCE.
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 Thu Jun 7 09:21:48 2012 (r236708)
+++ user/des/fbce/lib/FBCE/Controller/Root.pm Thu Jun 7 09:22:41 2012 (r236709)
@@ -30,10 +30,10 @@ sub auto :Private {
my ($self, $c) = @_;
# Stash schedule information etc.
- $c->stash(title => FBCE->config->{'title'});
+ $c->stash(title => $c->config->{'title'});
my $now = DateTime->now();
$c->stash(now => $now);
- my $schedule = FBCE->model('Schedule');
+ my $schedule = $c->model('Schedule');
foreach my $phase ("nominating", "voting") {
foreach my $endpoint ("${phase}_starts", "${phase}_ends") {
$c->stash($endpoint => $schedule->{$endpoint});
@@ -45,7 +45,7 @@ sub auto :Private {
$c->stash(voting => $schedule->voting($now));
$c->stash(announced => $schedule->announced($now));
- my $rules = FBCE->model('Rules');
+ my $rules = $c->model('Rules');
$c->stash(max_votes => $rules->{'max_votes'});
# Authentication
More information about the svn-src-user
mailing list