aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report/Update.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-12-13 15:48:48 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-12-15 00:11:06 +0000
commit9fb130a0ab1bd36e977439b7697fba5fec5b1f00 (patch)
treee9c8f3fce2ecf110172b9359e48c436b10e66fee /perllib/FixMyStreet/App/Controller/Report/Update.pm
parent48d290abd549a623e3af4b62127668cf92018d9c (diff)
Rename council column to bodies_str, and all the related code.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/Update.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/Update.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm
index c3843c9af..4467a7036 100644
--- a/perllib/FixMyStreet/App/Controller/Report/Update.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm
@@ -201,14 +201,14 @@ sub process_update : Private {
if ( $params{state} ) {
$params{state} = 'fixed - council'
- if $params{state} eq 'fixed' && $c->user && $c->user->belongs_to_body( $update->problem->council );
+ if $params{state} eq 'fixed' && $c->user && $c->user->belongs_to_body( $update->problem->bodies_str );
$update->problem_state( $params{state} );
}
my @extra; # Next function fills this, but we don't need it here.
# This is just so that the error checkign for these extra fields runs.
# TODO Use extra here as it is used on reports.
- $c->cobrand->process_extras( $c, $update->problem->council, \@extra );
+ $c->cobrand->process_extras( $c, $update->problem->bodies_str, \@extra );
if ( $c->req->param('fms_extra_title') ) {
my %extras = ();
@@ -246,7 +246,7 @@ sub check_for_errors : Private {
# they have to be an authority user to update the state
if ( $c->req->param('state') ) {
my $error = 0;
- $error = 1 unless $c->user && $c->user->belongs_to_body( $c->stash->{update}->problem->council );
+ $error = 1 unless $c->user && $c->user->belongs_to_body( $c->stash->{update}->problem->bodies_str );
my $state = $c->req->param('state');
$error = 1 unless ( grep { $state eq $_ } ( qw/confirmed closed fixed investigating planned/, 'in progress', 'fixed', 'fixed - user', 'fixed - council' ) );