aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2014-04-17 16:48:18 +0100
committerMatthew Somerville <matthew@mysociety.org>2014-05-16 15:49:18 +0100
commit0d190daf11c8ff29fd53b3a342d0717f5b73da05 (patch)
tree78f2a9de68fc63a99e64e1370284f646d233bdb7 /perllib
parenteacd361ee298907b71cbf57b3b82cef98863d995 (diff)
Only return html from problem->body if we have context
this means we can use this in email templates and get the correct non html text back even if AREA_LINKS_FROM_PROBLEM is true
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index 7b5460c51..56a915c89 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -604,7 +604,7 @@ sub body {
$body = join( _(' and '),
map {
my $name = $_->name;
- if (mySociety::Config::get('AREA_LINKS_FROM_PROBLEMS')) {
+ if ($c and mySociety::Config::get('AREA_LINKS_FROM_PROBLEMS')) {
'<a href="' . $_->url($c) . '">' . $name . '</a>';
} else {
$name;