aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorHakim Cassimally <hakim@mysociety.org>2015-03-25 15:32:28 +0000
committerDave Arter <davea@mysociety.org>2015-10-06 09:09:23 +0100
commit792cb7d7d373c7f6560365f40fd6988ed0f3c946 (patch)
treeef977a8526049131dba3600ba2206e348b3bf973 /perllib
parentef096dbe0fb71a00aaa23b69f7077ea999ae7116 (diff)
[Zurich] Make stats export media column blank if no photo.
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index f49d8517e..ca92470f2 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -763,6 +763,9 @@ sub admin_stats {
$detail =~ s{\r?\n}{ <br/> }g;
$public_response =~ s{\r?\n}{ <br/> }g;
+ # Assemble photo URL, if report has a photo
+ my $media_url = $report->get_photo_params->{url} ? ($c->cobrand->base_url . $report->get_photo_params->{url}) : '';
+
my @columns = (
$report->id,
$report->created,
@@ -773,7 +776,7 @@ sub admin_stats {
$body_name,
$report->title,
$detail,
- $c->cobrand->base_url . $report->get_photo_params->{url},
+ $media_url,
$report->service || 'Web interface',
$public_response,
);