aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-29 09:45:03 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-29 22:40:21 +0100
commit889d95a77db67081127bc84a51059916dfcc4997 (patch)
tree153d9762bf40621f4f381abe76ab20e430a58697 /perllib/FixMyStreet/App.pm
parenta1b105eeacf5ff4bf550a55e86983418ce32763a (diff)
Allow a hostname to set the map class.
Diffstat (limited to 'perllib/FixMyStreet/App.pm')
-rw-r--r--perllib/FixMyStreet/App.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 47b290eff..a63ac1fb4 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -181,7 +181,8 @@ sub setup_request {
Memcached::set_namespace( FixMyStreet->config('BCI_DB_NAME') . ":" );
- FixMyStreet::Map::set_map_class( $c->request->param('map') );
+ my $map = $host =~ /^osm\./ ? 'OSM' : $c->req->param('map');
+ FixMyStreet::Map::set_map_class( $map );
return $c;
}