diff options
author | Struan Donald <struan@exo.org.uk> | 2012-04-24 16:13:29 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-04-24 16:13:29 +0100 |
commit | 65e4864f4408a1560beca8746046c8a08a3971f4 (patch) | |
tree | d50ecd588e2030d1fb6794688d7f7162ae3af331 /perllib/Open311.pm | |
parent | afa97893b54edd890527a80392492f0d10a739a1 (diff) |
Revert "correct misunderstanding of bromley spec"
Turns out I was correct the first time round :(
This reverts commit afa97893b54edd890527a80392492f0d10a739a1.
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r-- | perllib/Open311.pm | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm index 4e1cb933e..23208df1b 100644 --- a/perllib/Open311.pm +++ b/perllib/Open311.pm @@ -19,7 +19,6 @@ has debug => ( is => 'ro', isa => 'Bool', default => 0 ); has debug_details => ( is => 'rw', 'isa' => 'Str', default => '' ); has success => ( is => 'rw', 'isa' => 'Bool', default => 0 ); has error => ( is => 'rw', 'isa' => 'Str', default => '' ); -has extended_sendrequest => ( is => 'ro', isa => 'Bool', default => 0 ); sub get_service_list { my $self = shift; @@ -98,32 +97,14 @@ sub _populate_service_request_params { $params->{media_url} = $extra->{image_url}; } - if ( $self->extended_sendrequest ) { - $params->{northing} = $extra->{northing}; - $params->{easting} = $extra->{easting}; - $params->{report_url} = $extra->{url}; - $params->{service_request_id_ext} = $problem->id; - $params->{report_title} = $problem->title; - $params->{email_alerts_requested} = 'FALSE'; # always false - $params->{requested_datetime} = $problem->confirmed; - - $params->{public_anonymity_required} = $problem->anonymous ? 'TRUE' : 'FALSE'; - } - if ( $problem->extra ) { my $extras = $problem->extra; for my $attr ( @$extras ) { my $attr_name = $attr->{name}; - if ( $self->extended_sendrequest ) { - if ( $attr_name eq 'first_name' || $attr_name eq 'last_name' ) { - $params->{$attr_name} = $attr->{value} if $attr->{value}; - next; - } - if ( $attr_name eq 'fms_extra_title' ) { - $params->{title} = $attr->{value} if $attr->{value}; - next; - } + if ( $attr_name eq 'first_name' || $attr_name eq 'last_name' ) { + $params->{$attr_name} = $attr->{value} if $attr->{value}; + next; } $attr_name =~ s/fms_extra_//; my $name = sprintf( 'attribute[%s]', $attr_name ); |