Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jun 2012 09:22:42 +0000 (UTC)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r236709 - user/des/fbce/lib/FBCE/Controller
Message-ID:  <201206070922.q579Mg8o073599@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206070922.q579Mg8o073599>