From 0d190daf11c8ff29fd53b3a342d0717f5b73da05 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Thu, 17 Apr 2014 16:48:18 +0100 Subject: 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 --- perllib/FixMyStreet/DB/Result/Problem.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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')) { '' . $name . ''; } else { $name; -- cgit v1.2.3