diff options
Diffstat (limited to 'perllib/FixMyStreet/App')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/JSON.pm | 3 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Model/DB.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Model/PhotoSet.pm | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/JSON.pm b/perllib/FixMyStreet/App/Controller/JSON.pm index 959ead245..be738bb8b 100644 --- a/perllib/FixMyStreet/App/Controller/JSON.pm +++ b/perllib/FixMyStreet/App/Controller/JSON.pm @@ -8,7 +8,6 @@ use JSON; use DateTime; use DateTime::Format::ISO8601; use List::MoreUtils 'uniq'; -use FixMyStreet::App; =head1 NAME @@ -81,7 +80,7 @@ sub problems : Local { $date_col = 'lastupdate'; } - my $dt_parser = FixMyStreet::App->model('DB')->schema->storage->datetime_parser; + my $dt_parser = $c->model('DB')->schema->storage->datetime_parser; my $one_day = DateTime::Duration->new( days => 1 ); my $query = { diff --git a/perllib/FixMyStreet/App/Model/DB.pm b/perllib/FixMyStreet/App/Model/DB.pm index f9e43172f..ac1f98dc9 100644 --- a/perllib/FixMyStreet/App/Model/DB.pm +++ b/perllib/FixMyStreet/App/Model/DB.pm @@ -8,7 +8,7 @@ use FixMyStreet; __PACKAGE__->config( schema_class => 'FixMyStreet::DB', - connect_info => FixMyStreet->dbic_connect_info, + connect_info => sub { FixMyStreet::DB->storage->dbh }, ); =head1 NAME diff --git a/perllib/FixMyStreet/App/Model/PhotoSet.pm b/perllib/FixMyStreet/App/Model/PhotoSet.pm index b18460821..f1334ff38 100644 --- a/perllib/FixMyStreet/App/Model/PhotoSet.pm +++ b/perllib/FixMyStreet/App/Model/PhotoSet.pm @@ -56,7 +56,7 @@ has upload_dir => ( lazy => 1, default => sub { my $self = shift; - my $cache_dir = path( $self->c->config->{UPLOAD_DIR} ); + my $cache_dir = path( FixMyStreet->config('UPLOAD_DIR') ); $cache_dir->mkpath; unless ( -d $cache_dir && -w $cache_dir ) { warn "Can't find/write to photo cache directory '$cache_dir'"; |