diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-10 12:23:28 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-10 12:23:28 +0100 |
commit | 58096757d4d232ef0e848efc934fb846ef805539 (patch) | |
tree | de747e2c2e5715ff6ddb088eb0673b0d9bb635e3 /perllib/FixMyStreet/App/Controller | |
parent | 1a25ba193b2c387934721947d1d59d2d92814c08 (diff) |
IF on an arrayref in a template returns true, so need to check size.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Around.pm | 16 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 3 |
2 files changed, 8 insertions, 11 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm index 370fe7b89..2bfd52633 100644 --- a/perllib/FixMyStreet/App/Controller/Around.pm +++ b/perllib/FixMyStreet/App/Controller/Around.pm @@ -195,15 +195,13 @@ sub display_location : Private { } @$on_map_all, @$around_map; } - { # FIXME - ideally this indented code should be in the templates - FixMyStreet::Map::display_map( - $c, - latitude => $latitude, - longitude => $longitude, - clickable => 1, - pins => \@pins, - ); - } + FixMyStreet::Map::display_map( + $c, + latitude => $latitude, + longitude => $longitude, + clickable => 1, + pins => \@pins, + ); return 1; } diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 4d9bcd672..078b0b994 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -875,8 +875,7 @@ Add the html needed to for the map to the stash. =cut -# FIXME - much of this should not happen here or in maps code but in the -# templates. Perhaps also create a map 'None' to use when map is skipped. +# Perhaps also create a map 'None' to use when map is skipped. sub generate_map : Private { my ( $self, $c ) = @_; |