diff options
Diffstat (limited to 'perllib/FixMyStreet/Cobrand')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/UKCouncils.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 9541f2601..48c997047 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -682,7 +682,7 @@ sub get_body_sender { if ( $body->can_be_devolved ) { # look up via category - my $config = FixMyStreet::App->model("DB::Contact")->search( { body_id => $body->id, category => $category } )->first; + my $config = $body->result_source->schema->resultset("Contact")->search( { body_id => $body->id, category => $category } )->first; if ( $config->send_method ) { return { method => $config->send_method, config => $config }; } else { diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index 074da0915..66d8bd472 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -113,7 +113,7 @@ sub owns_problem { if (ref $report eq 'HASH') { return unless $report->{bodies_str}; @bodies = split /,/, $report->{bodies_str}; - @bodies = FixMyStreet::App->model('DB::Body')->search({ id => \@bodies })->all; + @bodies = FixMyStreet::DB->resultset('Body')->search({ id => \@bodies })->all; } else { # Object @bodies = values %{$report->bodies}; } diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index 6da3e566c..8c08b82b1 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -850,7 +850,7 @@ sub admin_report_edit { # Add new update from status_update if (my $update = $c->get_param('status_update')) { - FixMyStreet::App->model('DB::Comment')->create( { + $c->model('DB::Comment')->create( { text => $update, user => $c->user->obj, state => 'unconfirmed', @@ -1010,10 +1010,10 @@ sub _admin_send_email { } sub munge_sendreport_params { - my ($self, $c, $row, $h, $params) = @_; + my ($self, $row, $h, $params) = @_; if ($row->state =~ /^(closed|investigating)$/ && $row->get_extra_metadata('publish_photo')) { # we attach images to reports sent to external bodies - my $photoset = $row->get_photoset($c); + my $photoset = $row->get_photoset(); my @images = $photoset->all_images or return; my $index = 0; |