aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2014-06-11 14:23:09 +0100
committerStruan Donald <struan@exo.org.uk>2014-07-03 17:36:58 +0100
commit1877bf4e4ae679c70c2349d6b9ad15ea610e3dc9 (patch)
treeec4f2ed7fa73fba718ec3ecf76ca8bdee69132e7 /perllib/FixMyStreet/Cobrand/FixMyStreet.pm
parent291c66c7700b8e6c90052b6d4eb436909fbe0865 (diff)
Display a banner to non UK FixMyStreet visitors
only on FMS and only if from outside the uk Fixes #571
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/FixMyStreet.pm')
-rw-r--r--perllib/FixMyStreet/Cobrand/FixMyStreet.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
index ce62e206e..36f381085 100644
--- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
+++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
@@ -1,5 +1,6 @@
package FixMyStreet::Cobrand::FixMyStreet;
use base 'FixMyStreet::Cobrand::UK';
+use mySociety::Gaze;
use constant COUNCIL_ID_BROMLEY => 2482;
@@ -39,5 +40,12 @@ 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);
+}
+
1;