diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-03-31 13:53:00 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-03-31 13:53:00 +0100 |
commit | 6702f44f92e9c74fe6d2dd1c69c5418a15af178c (patch) | |
tree | eb6c54b26fee9e15ed31e476f4ceadce256c908e /perllib | |
parent | ca306d7bbb0bf0baa8d800ea1482b1faa3431022 (diff) |
[fixmystreet.com] Move country lookup client side.
There's no need for the IP->country lookup, only used in JavaScript
to display a banner, to require a call to the FixMyStreet server.
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Location.pm | 16 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 4 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FixMyStreet.pm | 8 |
3 files changed, 0 insertions, 28 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Location.pm b/perllib/FixMyStreet/App/Controller/Location.pm index 6def423ce..c457c8fce 100644 --- a/perllib/FixMyStreet/App/Controller/Location.pm +++ b/perllib/FixMyStreet/App/Controller/Location.pm @@ -134,22 +134,6 @@ sub check_location : Private { return 1; } -=head2 country_message - -Displays the country_message template, used for displaying a message to -people using the site from outside the host country. - -=cut - -sub country_message : Path('/country_message') : Args(0) { - my ( $self, $c ) = @_; - - # we do not want to cache this as we always want to check if displaying this - # is the right thing to do. - $c->res->header( 'Cache_Control' => 'max-age=0' ); - $c->stash->{template} = 'front/international_banner.html'; -} - # Utility function for if someone (rarely) enters a grid reference sub gridref_to_latlon { my ( $a, $b, $num ) = @_; diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index b3b830f06..c76ee0f7d 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -936,10 +936,6 @@ sub updates_as_hashref { return {}; } -sub get_country_for_ip_address { - return 0; -} - sub jurisdiction_id_example { my $self = shift; return $self->moniker; diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm index 159f2f5db..99fe6da15 100644 --- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm +++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm @@ -1,6 +1,5 @@ package FixMyStreet::Cobrand::FixMyStreet; use base 'FixMyStreet::Cobrand::UK'; -use mySociety::Gaze; use constant COUNCIL_ID_BROMLEY => 2482; @@ -52,13 +51,6 @@ sub extra_contact_validation { return %errors; } -sub get_country_for_ip_address { - my $self = shift; - my $ip = shift; - - return mySociety::Gaze::get_country_from_ip($ip); -} - sub report_form_extras { ( { name => 'gender', required => 0 }, { name => 'variant', required => 0 } ) } |