aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/App/Controller/Around.pm1
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm1
-rw-r--r--perllib/FixMyStreet/Cobrand/Bexley.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/FixMyStreet.pm15
-rw-r--r--perllib/FixMyStreet/Cobrand/Peterborough.pm1
-rw-r--r--perllib/FixMyStreet/Map/MasterMap.pm (renamed from perllib/FixMyStreet/Map/Bexley.pm)8
-rw-r--r--perllib/FixMyStreet/Script/Alerts.pm2
7 files changed, 20 insertions, 10 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm
index 377449719..49ff13999 100644
--- a/perllib/FixMyStreet/App/Controller/Around.pm
+++ b/perllib/FixMyStreet/App/Controller/Around.pm
@@ -235,6 +235,7 @@ sub check_and_stash_category : Private {
my $csv = Text::CSV->new();
$csv->combine(@list_of_names);
$c->stash->{around_bodies} = \@bodies;
+ $c->stash->{bodies_ids} = [ map { $_->id } @bodies];
$c->{stash}->{list_of_names_as_string} = $csv->string;
my $where = { body_id => [ keys %bodies ], };
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index b748a34e0..270ad2ddb 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -749,6 +749,7 @@ sub setup_categories_and_bodies : Private {
$c->stash->{bodies} = \%bodies;
$c->stash->{contacts} = \@contacts;
$c->stash->{bodies_to_list} = \%bodies_to_list;
+ $c->stash->{bodies_ids} = [ map { $_->id } @bodies];
$c->stash->{category_options} = \@category_options;
$c->stash->{category_extras} = \%category_extras;
$c->stash->{category_extras_hidden} = \%category_extras_hidden;
diff --git a/perllib/FixMyStreet/Cobrand/Bexley.pm b/perllib/FixMyStreet/Cobrand/Bexley.pm
index eda276add..93484dc68 100644
--- a/perllib/FixMyStreet/Cobrand/Bexley.pm
+++ b/perllib/FixMyStreet/Cobrand/Bexley.pm
@@ -9,7 +9,7 @@ sub council_area { 'Bexley' }
sub council_name { 'London Borough of Bexley' }
sub council_url { 'bexley' }
sub get_geocoder { 'Bexley' }
-sub map_type { 'Bexley' }
+sub map_type { 'MasterMap' }
sub disambiguate_location {
my $self = shift;
diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
index 0d2bf3663..bf7690990 100644
--- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
+++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
@@ -256,10 +256,8 @@ sub about_hook {
}
}
-sub updates_disallowed {
- my $self = shift;
- my ($problem) = @_;
- my $c = $self->{c};
+sub updates_disallowed_config {
+ my ($self, $problem) = @_;
# This is a hash of council name to match, and what to do
my $cfg = $self->feature('updates_allowed') || {};
@@ -273,6 +271,15 @@ sub updates_disallowed {
last;
}
}
+ return ($type, $body);
+}
+
+sub updates_disallowed {
+ my $self = shift;
+ my ($problem) = @_;
+ my $c = $self->{c};
+
+ my ($type, $body) = $self->updates_disallowed_config($problem);
if ($type eq 'none') {
return 1;
diff --git a/perllib/FixMyStreet/Cobrand/Peterborough.pm b/perllib/FixMyStreet/Cobrand/Peterborough.pm
index eb4ab815c..fcdf44859 100644
--- a/perllib/FixMyStreet/Cobrand/Peterborough.pm
+++ b/perllib/FixMyStreet/Cobrand/Peterborough.pm
@@ -12,6 +12,7 @@ sub council_area_id { 2566 }
sub council_area { 'Peterborough' }
sub council_name { 'Peterborough City Council' }
sub council_url { 'peterborough' }
+sub map_type { 'MasterMap' }
sub send_questionnaires { 0 }
diff --git a/perllib/FixMyStreet/Map/Bexley.pm b/perllib/FixMyStreet/Map/MasterMap.pm
index d3c7a013a..a2e0acd54 100644
--- a/perllib/FixMyStreet/Map/Bexley.pm
+++ b/perllib/FixMyStreet/Map/MasterMap.pm
@@ -1,8 +1,8 @@
-# FixMyStreet:Map::Bexley
+# FixMyStreet:Map::MasterMap
#
# A combination of FMS OS maps and our own tiles
-package FixMyStreet::Map::Bexley;
+package FixMyStreet::Map::MasterMap;
use base 'FixMyStreet::Map::FMS';
use strict;
@@ -16,14 +16,14 @@ sub map_javascript { [
'/js/map-OpenLayers.js',
'/js/map-bing-ol.js',
'/js/map-fms.js',
- '/js/map-bexley.js',
+ '/js/map-mastermap.js',
] }
sub map_tiles {
my ( $self, %params ) = @_;
my ( $x, $y, $z ) = ( $params{x_tile}, $params{y_tile}, $params{zoom_act} );
if ($z >= 17) {
- my $base = "//%stilma.mysociety.org/bexley/%d/%d/%d.png";
+ my $base = "//%stilma.mysociety.org/mastermap/%d/%d/%d.png";
return [
sprintf($base, 'a.', $z, $x-1, $y-1),
sprintf($base, 'b.', $z, $x, $y-1),
diff --git a/perllib/FixMyStreet/Script/Alerts.pm b/perllib/FixMyStreet/Script/Alerts.pm
index 3d2d784b8..14d6ec479 100644
--- a/perllib/FixMyStreet/Script/Alerts.pm
+++ b/perllib/FixMyStreet/Script/Alerts.pm
@@ -97,7 +97,7 @@ sub send() {
!( $last_problem_state eq '' && $row->{item_problem_state} eq 'confirmed' ) &&
$last_problem_state ne $row->{item_problem_state}
) {
- my $state = FixMyStreet::DB->resultset("State")->display($row->{item_problem_state}, 1, $cobrand);
+ my $state = FixMyStreet::DB->resultset("State")->display($row->{item_problem_state}, 1, $cobrand->moniker);
my $update = _('State changed to:') . ' ' . $state;
$row->{item_text} = $row->{item_text} ? $row->{item_text} . "\n\n" . $update :