aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm7
-rw-r--r--perllib/FixMyStreet/App/View/Web.pm7
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/FiksGataMi.pm2
-rw-r--r--perllib/FixMyStreet/Geocode.pm1
-rw-r--r--perllib/FixMyStreet/Map.pm1
-rw-r--r--perllib/FixMyStreet/Map/Tilma/Original.pm1
8 files changed, 4 insertions, 19 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 579ee9b41..b76447233 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -73,7 +73,7 @@ sub index : Path : Args(0) {
$c->stash->{alerts} = \%alert_counts;
- my $contacts = $c->model('DB::Contact')->summary_count;
+ my $contacts = $c->model('DB::Contact')->summary_count( $c->cobrand->contact_restriction );
my %contact_counts =
map { $_->confirmed => $_->get_column('confirmed_count') } $contacts->all;
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index c14b7e9b1..5c52d0257 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -118,13 +118,6 @@ sub report_import : Path('/import') {
# anything else we return is plain text
$c->res->content_type('text/plain; charset=utf-8');
- # use strict;
- # use Standard;
- # use mySociety::AuthToken;
- # use mySociety::Config;
- # use mySociety::EvEl;
- # use mySociety::Locale;
-
my %input =
map { $_ => $c->req->param($_) || '' } (
'service', 'subject', 'detail', 'name', 'email', 'phone',
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm
index 5b20e286b..358e280c3 100644
--- a/perllib/FixMyStreet/App/View/Web.pm
+++ b/perllib/FixMyStreet/App/View/Web.pm
@@ -84,12 +84,7 @@ sub display_crosssell_advert {
my ( $self, $c, $email, $name, %data ) = @_;
return unless $c->cobrand->allow_crosssell_adverts();
-
- # fake up the old style $q
- my $q = { site => $c->cobrand->moniker, };
- $q->{site} = 'fixmystreet' if $q->{site} eq 'default';
-
- return CrossSell::display_advert( $q, $email, $name, %data );
+ return CrossSell::display_advert( $c, $email, $name, %data );
}
=head2 Utils::prettify_epoch
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index e02b208dc..b002dd7f2 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -87,7 +87,7 @@ FixMyStreet contact data.
=cut
sub contact_restriction {
- '';
+ {};
}
=head2 base_url_for_emails
diff --git a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
index 4dd2ef49a..eb7ea89a5 100644
--- a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
+++ b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
@@ -16,7 +16,7 @@ sub set_lang_and_domain {
}
sub enter_postcode_text {
- my ( $self, $q ) = @_;
+ my ( $self ) = @_;
return _('Enter a nearby postcode, or street name and area');
}
diff --git a/perllib/FixMyStreet/Geocode.pm b/perllib/FixMyStreet/Geocode.pm
index 50a7ba339..a520a2daa 100644
--- a/perllib/FixMyStreet/Geocode.pm
+++ b/perllib/FixMyStreet/Geocode.pm
@@ -17,7 +17,6 @@ use LWP::Simple;
use Digest::MD5 qw(md5_hex);
use URI::Escape;
-use Cobrand;
use Utils;
use mySociety::Config;
use mySociety::Locale;
diff --git a/perllib/FixMyStreet/Map.pm b/perllib/FixMyStreet/Map.pm
index fc3f318c2..6b41c8d0d 100644
--- a/perllib/FixMyStreet/Map.pm
+++ b/perllib/FixMyStreet/Map.pm
@@ -20,7 +20,6 @@ use Module::Pluggable
my @ALL_MAP_CLASSES = allowed_maps();
use Problems;
-use Cobrand;
use mySociety::Config;
use mySociety::Gaze;
use mySociety::Locale;
diff --git a/perllib/FixMyStreet/Map/Tilma/Original.pm b/perllib/FixMyStreet/Map/Tilma/Original.pm
index 75177f3af..486a7c739 100644
--- a/perllib/FixMyStreet/Map/Tilma/Original.pm
+++ b/perllib/FixMyStreet/Map/Tilma/Original.pm
@@ -11,7 +11,6 @@ package FixMyStreet::Map::Tilma::Original;
use strict;
use LWP::Simple;
-use Cobrand;
use mySociety::GeoUtil;
use mySociety::Locale;
use mySociety::Web qw(ent NewURL);