diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-04-15 16:01:18 +0100 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-04-15 16:01:18 +0100 |
commit | 4cb5b632afa97850f5dda1e94dc513ee1515cd2c (patch) | |
tree | 05c4175b8582a2fe52ed74e5dc1a3e3a70506891 /perllib/FixMyStreet/App.pm | |
parent | d6f984e78bba58710d03aba15b41b897aa078040 (diff) |
change cobrand url to uri and change all c.cobrand.url to c.uri_for in templates
Diffstat (limited to 'perllib/FixMyStreet/App.pm')
-rw-r--r-- | perllib/FixMyStreet/App.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm index a5ba6bc5d..ea22179b7 100644 --- a/perllib/FixMyStreet/App.pm +++ b/perllib/FixMyStreet/App.pm @@ -11,6 +11,9 @@ use mySociety::Email; use FixMyStreet::Map; use FixMyStreet::FakeQ; +use URI; +use URI::QueryParam; + use Catalyst ( 'Static::Simple', # 'Unicode', @@ -315,13 +318,10 @@ sub uri_for { my $uri = $c->next::method(@args); - # Currently the cobrand expect and return the url as a string. - my $cobranded_uri = $c->cobrand->url( $uri->as_string ); + my $cobranded_uri = $c->cobrand->uri($uri); - # check to see if the returned string looks like a url (cities does not) - return $cobranded_uri =~ m{^https?://} - ? URI->new($cobranded_uri) - : $cobranded_uri; + # note that the returned uri may be a string not an object (eg cities) + return $cobranded_uri; } =head2 uri_for_email |