diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-02-24 16:30:19 +0000 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-02-24 16:30:19 +0000 |
commit | 7d6ca0183caf3a4bfaf8e776914732002f755592 (patch) | |
tree | e69eaa0e2b7f4c0246a9cfd238da719610e6a2c7 | |
parent | b85268ddae38bf9bd75ae1b32bfb8beba01e6e49 (diff) |
base_host method for conveniance
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index fc4581fa1..a40ae2c2d 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -3,6 +3,7 @@ package FixMyStreet::Cobrand::Default; use strict; use warnings; use FixMyStreet; +use URI; use Carp; @@ -142,6 +143,18 @@ Return the base url for the cobranded version of the site sub base_url { mySociety::Config::get('BASE_URL') } +=head2 base_host + +Return the base host for the cobranded version of the site + +=cut + +sub base_host { + my $self = shift; + my $uri = URI->new( $self->base_url ); + return $uri->host; +} + =head2 enter_postcode_text Return the text that prompts the user to enter their postcode/place name. |