diff options
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Harrogate.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Stevenage.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/UKCouncils.pm | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Harrogate.pm b/perllib/FixMyStreet/Cobrand/Harrogate.pm index afda52385..519521867 100644 --- a/perllib/FixMyStreet/Cobrand/Harrogate.pm +++ b/perllib/FixMyStreet/Cobrand/Harrogate.pm @@ -11,6 +11,11 @@ sub council_name { return 'Harrogate Borough Council'; } sub council_url { return 'harrogate'; } sub is_two_tier { return 1; } # with North Yorkshire CC 2235 +sub base_url { + return FixMyStreet->config('BASE_URL') if FixMyStreet->config('STAGING_SITE'); + return 'http://fix.harrogate.gov.uk'; +} + sub disambiguate_location { my $self = shift; my $string = shift; diff --git a/perllib/FixMyStreet/Cobrand/Stevenage.pm b/perllib/FixMyStreet/Cobrand/Stevenage.pm index 5e2f07341..1f90e0498 100644 --- a/perllib/FixMyStreet/Cobrand/Stevenage.pm +++ b/perllib/FixMyStreet/Cobrand/Stevenage.pm @@ -10,6 +10,11 @@ sub council_name { return 'Stevenage Council'; } sub council_url { return 'stevenage'; } sub is_two_tier { return 1; } +sub base_url { + return FixMyStreet->config('BASE_URL') if FixMyStreet->config('STAGING_SITE'); + return 'http://fixmystreet.stevenage.gov.uk'; +} + sub disambiguate_location { my $self = shift; return { diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index c8512f852..6bf70e091 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -55,9 +55,8 @@ sub base_url { my $base_url = FixMyStreet->config('BASE_URL'); my $u = $self->council_url; if ( $base_url !~ /$u/ ) { - # council cobrands are not https so transform to http as well - $base_url =~ s{(https?)://(?!www\.)}{http://$u.}g; - $base_url =~ s{(https?)://www\.}{http://$u.}g; + $base_url =~ s{(https?://)(?!www\.)}{$1$u.}g; + $base_url =~ s{(https?://)www\.}{$1$u.}g; } return $base_url; } |