diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2015-03-25 15:32:28 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2015-10-06 09:09:23 +0100 |
commit | 792cb7d7d373c7f6560365f40fd6988ed0f3c946 (patch) | |
tree | ef977a8526049131dba3600ba2206e348b3bf973 | |
parent | ef096dbe0fb71a00aaa23b69f7077ea999ae7116 (diff) |
[Zurich] Make stats export media column blank if no photo.
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 5 |
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, ); |