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/Cobrand/FiksGataMi.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/Cobrand/FiksGataMi.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FiksGataMi.pm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm index 00655afc9..1b9a1fab7 100644 --- a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm +++ b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm @@ -36,12 +36,13 @@ sub area_min_generation { # If lat/lon are present in the URL, OpenLayers will use that to centre the map. # Need to specify a zoom to stop it defaulting to null/0. -sub url { - my ( $self, $url ) = @_; - if ( $url =~ /lat=/ && $url !~ /zoom=/ ) { - $url .= ';zoom=2'; - } - return $url; +sub uri { + my ( $self, $uri ) = @_; + + $uri->query_param( zoom => 2 ) + if $uri->query_param('lat') && !$uri->query_param('zoom'); + + return $uri; } sub geocoded_string_check { |