aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/App.pm8
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm3
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm8
-rw-r--r--perllib/FixMyStreet/Cobrand/FixMindelo.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/FixaMinGata.pm5
-rw-r--r--perllib/FixMyStreet/Cobrand/MakeMyIsland.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/SeeSomething.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/ZeroTB.pm2
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm2
9 files changed, 6 insertions, 28 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index fd70ffda8..769a6bb8f 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -12,6 +12,7 @@ use Memcached;
use mySociety::Email;
use mySociety::Random qw(random_bytes);
use FixMyStreet::Map;
+use Utils;
use Path::Class;
use URI;
@@ -388,10 +389,9 @@ sub send_email_cron {
$sig = Encode::decode('utf8', $sig);
$params->{_parameters_}->{signature} = $sig;
- $tt->process( 'site_name.txt', $params, \$site_name );
- $site_name = Encode::decode('utf8', $site_name);
- my $site_title = $cobrand ? $cobrand->site_title : '';
- $params->{_parameters_}->{site_name} = $site_name || $site_title;
+ $tt->process( 'site-name.txt', $params, \$site_name );
+ $site_name = Utils::trim_text(Encode::decode('utf8', $site_name));
+ $params->{_parameters_}->{site_name} = $site_name;
$params->{_line_indent} = '';
my $email = mySociety::Locale::in_gb_locale { mySociety::Email::construct_email($params) };
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index c20a6754a..88a49f6c9 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -112,9 +112,10 @@ sub load_problem_or_display_error : Private {
);
} elsif ( $problem->non_public ) {
if ( !$c->user || $c->user->id != $problem->user->id ) {
+ my $site_name = Utils::trim_text($c->render_fragment('site-name.html'));
$c->detach(
'/page_error_403_access_denied',
- [ sprintf(_('That report cannot be viewed on %s.'), $c->cobrand->site_title) ] #
+ [ sprintf(_('That report cannot be viewed on %s.'), $site_name) ] #
);
}
}
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index ec7a8a81d..7f1fba67a 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -146,14 +146,6 @@ Can be specified in template.
sub enter_postcode_text { }
-=head2 site_title
-
-The name of the site
-
-=cut
-
-sub site_title { return 'FixMyStreet'; }
-
=head2 set_lang_and_domain
my $set_lang = $cobrand->set_lang_and_domain( $lang, $unicode, $dir )
diff --git a/perllib/FixMyStreet/Cobrand/FixMindelo.pm b/perllib/FixMyStreet/Cobrand/FixMindelo.pm
index fd3a55c6c..59debf157 100644
--- a/perllib/FixMyStreet/Cobrand/FixMindelo.pm
+++ b/perllib/FixMyStreet/Cobrand/FixMindelo.pm
@@ -4,8 +4,6 @@ use base 'FixMyStreet::Cobrand::Default';
use strict;
use warnings;
-sub site_title { return 'FixMindelo'; }
-
sub country {
return 'CV';
}
diff --git a/perllib/FixMyStreet/Cobrand/FixaMinGata.pm b/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
index 98c157aef..60f98dd47 100644
--- a/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
+++ b/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
@@ -9,11 +9,6 @@ use mySociety::MaPit;
use FixMyStreet::Geocode::FixaMinGata;
use DateTime;
-sub site_title {
- my ($self) = @_;
- return 'FixaMinGata';
-}
-
sub country {
return 'SE';
}
diff --git a/perllib/FixMyStreet/Cobrand/MakeMyIsland.pm b/perllib/FixMyStreet/Cobrand/MakeMyIsland.pm
index ebeb15fbb..f263df4cc 100644
--- a/perllib/FixMyStreet/Cobrand/MakeMyIsland.pm
+++ b/perllib/FixMyStreet/Cobrand/MakeMyIsland.pm
@@ -4,8 +4,6 @@ use base 'FixMyStreet::Cobrand::Default';
use strict;
use warnings;
-sub site_title { return 'MakeMyIsland'; }
-
sub country {
return 'MV';
}
diff --git a/perllib/FixMyStreet/Cobrand/SeeSomething.pm b/perllib/FixMyStreet/Cobrand/SeeSomething.pm
index 5e6d3a8cd..775ba770b 100644
--- a/perllib/FixMyStreet/Cobrand/SeeSomething.pm
+++ b/perllib/FixMyStreet/Cobrand/SeeSomething.pm
@@ -9,8 +9,6 @@ sub council_area { return 'West Midlands'; }
sub council_name { return 'See Something Say Something'; }
sub council_url { return 'seesomething'; }
sub area_types { [ 'MTD' ] }
-sub site_title { return 'See Something, Say Something'; }
-
sub site_restriction {
my $self = shift;
diff --git a/perllib/FixMyStreet/Cobrand/ZeroTB.pm b/perllib/FixMyStreet/Cobrand/ZeroTB.pm
index 087bf0912..cdf4e5ad4 100644
--- a/perllib/FixMyStreet/Cobrand/ZeroTB.pm
+++ b/perllib/FixMyStreet/Cobrand/ZeroTB.pm
@@ -4,8 +4,6 @@ use base 'FixMyStreet::Cobrand::Default';
use strict;
use warnings;
-sub site_title { return 'ZeroTB'; }
-
sub enter_postcode_text { return _ ('Enter a nearby street name and area, postal code or district in Delhi'); }
sub country {
diff --git a/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm b/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm
index 646967bfc..63a91697d 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm
@@ -92,8 +92,6 @@ sub send_questionnaires_period {
. $row->user->email . "\n"
if $params->{verbose};
- $h{site_name} = $cobrand->site_title();
-
my $result = FixMyStreet::App->send_email_cron(
{
_template_ => $template,