diff options
author | Dave Arter <davea@mysociety.org> | 2016-08-01 12:03:45 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2016-08-01 12:03:45 +0100 |
commit | 1af9684e54aedb7f9935cdc4d38a28c61ec7d1f5 (patch) | |
tree | d6b044f54e070f8dbf265083534e849eb9ad6ead /perllib/FixMyStreet/Map.pm | |
parent | 14aaf6fafaa9aa8736f49851e95fa2c3c566c056 (diff) | |
parent | 27e0c74321f48f9997745bf00647e3958f34d8e2 (diff) |
Merge branch '1281-html-emails'
Diffstat (limited to 'perllib/FixMyStreet/Map.pm')
-rw-r--r-- | perllib/FixMyStreet/Map.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Map.pm b/perllib/FixMyStreet/Map.pm index 355fd8666..a850492b9 100644 --- a/perllib/FixMyStreet/Map.pm +++ b/perllib/FixMyStreet/Map.pm @@ -47,7 +47,8 @@ sub reload_allowed_maps { =head2 map_class -Set and return the appropriate class given a query parameter string. +Sets the appropriate class given a query parameter string. +Returns the old map class, if any. =cut @@ -57,7 +58,9 @@ sub set_map_class { $str = __PACKAGE__.'::'.$str if $str; my %avail = map { $_ => 1 } @ALL_MAP_CLASSES; $str = $ALL_MAP_CLASSES[0] unless $str && $avail{$str}; + my $old_map_class = $map_class; $map_class = $str; + return $old_map_class; } sub display_map { |