aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-07-13 13:58:05 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-07-13 13:58:05 +0100
commitdbeb763d227b011b42ccd44a8cb72a01dcea24ca (patch)
treee34d4c652e8293121255af0edf0fdc7a852ece35 /perllib/FixMyStreet
parenteb0afb86462032b1fd8a380a3d237c72602ade43 (diff)
Always allow OSM as an allowed map type, even if none given.
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/Map.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Map.pm b/perllib/FixMyStreet/Map.pm
index 08bba3285..d36b91ffe 100644
--- a/perllib/FixMyStreet/Map.pm
+++ b/perllib/FixMyStreet/Map.pm
@@ -18,7 +18,6 @@ use Module::Pluggable
# Get the list of maps we want and load map classes at compile time
my @ALL_MAP_CLASSES = allowed_maps();
-use mySociety::Config;
use mySociety::Gaze;
use mySociety::Locale;
use Utils;
@@ -31,7 +30,8 @@ are permitted by the config.
=cut
sub allowed_maps {
- my @allowed = split /,/, mySociety::Config::get('MAP_TYPE');
+ my @allowed = split /,/, ( FixMyStreet->config('MAP_TYPE') or "");
+ push @allowed, 'OSM'; # OSM is always allowed
@allowed = map { __PACKAGE__.'::'.$_ } @allowed;
my %avail = map { $_ => 1 } __PACKAGE__->maps;
return grep { $avail{$_} } @allowed;