diff options
author | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-02-22 11:29:17 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-02-22 11:29:17 +0000 |
commit | aa0611663f2852f48b8a77481bc9d6da406b2cc1 (patch) | |
tree | 6fd2604b8fc1e9e6aed3d883d5f2475e8d5a6664 /perllib/Page.pm | |
parent | dfe4984c0ea5d9e1793f75aa7cb2574a877e9aa8 (diff) |
Map JS only when map is being shown.
Diffstat (limited to 'perllib/Page.pm')
-rw-r--r-- | perllib/Page.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm index 8135d1306..06c543f7c 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -204,7 +204,7 @@ sub template_vars ($%) { 'lang_url' => $lang_url, 'title' => $params{title}, 'rss' => '', - map_js => FixMyStreet::Map::header_js(), + map_js => $params{js} || '', ); if ($params{rss}) { @@ -271,7 +271,7 @@ sub header ($%) { my $default_params = Cobrand::header_params(get_cobrand($q), $q, %params); my %default_params = %{$default_params}; %params = (%default_params, %params); - my %permitted_params = map { $_ => 1 } qw(title rss expires lastmodified template cachecontrol context status_code robots); + my %permitted_params = map { $_ => 1 } qw(title rss expires lastmodified template cachecontrol context status_code robots js); foreach (keys %params) { croak "bad parameter '$_'" if (!exists($permitted_params{$_})); } |