aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311.pm
diff options
context:
space:
mode:
authorJon Kristensen <info@jonkri.com>2014-02-14 18:30:20 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2014-03-11 17:31:30 +0000
commitcf20c709e13af0909620ac5387b7d070b66b8c52 (patch)
tree380727210ad56a3ae3049a0b8030fa105791d0b4 /perllib/Open311.pm
parentb06e459b7616ea508d273443cb66f81a30d05a74 (diff)
Alter Open311 description to only include English on FixMyStreet.
This could be made cobrand-customisable in future.
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r--perllib/Open311.pm25
1 files changed, 12 insertions, 13 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm
index 94d81e479..6c811d445 100644
--- a/perllib/Open311.pm
+++ b/perllib/Open311.pm
@@ -172,19 +172,18 @@ sub _generate_service_request_description {
my $problem = shift;
my $extra = shift;
- my $description = <<EOT;
-detail: @{[$problem->detail()]}
-
-url: $extra->{url}
-
-Submitted via FixMyStreet
-EOT
-;
- if ($self->extended_description ne 'oxfordshire') {
- $description = <<EOT . $description;
-title: @{[$problem->title()]}
-
-EOT
+ my $description = "";
+ if ($problem->cobrand eq 'fixmystreet') {
+ $description .= "detail: " . $problem->detail . "\n\n";
+ $description .= "url: " . $extra->{url} . "\n\n";
+ $description .= "Submitted via FixMyStreet\n";
+ if ($self->extended_description ne 'oxfordshire') {
+ $description = "title: " . $problem->title . "\n\n$description";
+ }
+ } else {
+ $description .= $problem->title . "\n\n";
+ $description .= $problem->detail . "\n\n";
+ $description .= $extra->{url} . "\n";
}
return $description;