diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-12-13 21:19:20 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-12-15 00:11:06 +0000 |
commit | 40fa72eefc47cf5356d719d6b3b85d22c6937fb8 (patch) | |
tree | 74ca47f95d6bfc9adf09326cec1d870a0fb5b78f /perllib/FixMyStreet | |
parent | 0b94fccf4d41d674c9544b17983ed6bba12ddf95 (diff) |
Rename a few more less important variables.
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/User.pm | 10 | ||||
-rw-r--r-- | perllib/FixMyStreet/SendReport/Barnet.pm | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/perllib/FixMyStreet/DB/Result/User.pm b/perllib/FixMyStreet/DB/Result/User.pm index 62bea1dd4..997577b69 100644 --- a/perllib/FixMyStreet/DB/Result/User.pm +++ b/perllib/FixMyStreet/DB/Result/User.pm @@ -164,19 +164,19 @@ sub body { =head2 belongs_to_body - $belongs_to_body = $user->belongs_to_body( $council_list ); + $belongs_to_body = $user->belongs_to_body( $bodies ); -Returns true if the user belongs to the comma seperated list of council ids passed in +Returns true if the user belongs to the comma seperated list of body ids passed in =cut sub belongs_to_body { my $self = shift; - my $council = shift; + my $bodies = shift; - my %councils = map { $_ => 1 } split ',', $council; + my %bodies = map { $_ => 1 } split ',', $bodies; - return 1 if $self->from_body && $councils{ $self->from_body }; + return 1 if $self->from_body && $bodies{ $self->from_body }; return 0; } diff --git a/perllib/FixMyStreet/SendReport/Barnet.pm b/perllib/FixMyStreet/SendReport/Barnet.pm index 4bee50e57..21d4a06a5 100644 --- a/perllib/FixMyStreet/SendReport/Barnet.pm +++ b/perllib/FixMyStreet/SendReport/Barnet.pm @@ -80,9 +80,9 @@ sub send { ? $h{query} : $nearest_postcode; # use given postcode if available # note: endpoint can be of form 'https://username:password@url' - my $council_config = FixMyStreet::App->model("DB::Body")->search( { area_id => COUNCIL_ID_BARNET} )->first; - if ($council_config and $council_config->endpoint) { - $interface->set_proxy($council_config->endpoint); + my $body = FixMyStreet::App->model("DB::Body")->search( { area_id => COUNCIL_ID_BARNET} )->first; + if ($body and $body->endpoint) { + $interface->set_proxy($body->endpoint); # Barnet web service doesn't like namespaces in the elements so use a prefix $interface->set_prefix('urn'); # uncomment these lines to print XML that will be sent rather |