aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script/Reports.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-04-08 21:11:48 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-04-08 22:05:21 +0100
commitb7099e8e513fe64ec183b1403515f46a7cc25f19 (patch)
tree8a0399a49f90acfe5b74cf19d86585cc050455d7 /perllib/FixMyStreet/Script/Reports.pm
parent0802b7f04091c1022dce0d77cc806a46ecc4ebba (diff)
Add PNG image support.
Store image type along with hash in photo column, and use that when outputting images / generating URLs. Make sure all public photo URL generation goes through appropriate functions, and change temp URLs so the filename can be output directly from the list.
Diffstat (limited to 'perllib/FixMyStreet/Script/Reports.pm')
-rw-r--r--perllib/FixMyStreet/Script/Reports.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Script/Reports.pm b/perllib/FixMyStreet/Script/Reports.pm
index e1eb5e2c5..58788119a 100644
--- a/perllib/FixMyStreet/Script/Reports.pm
+++ b/perllib/FixMyStreet/Script/Reports.pm
@@ -83,7 +83,7 @@ sub send(;$) {
$h{phone_line} = $h{phone} ? _('Phone:') . " $h{phone}\n\n" : '';
if ($row->photo) {
$h{has_photo} = _("This web page also contains a photo of the problem, provided by the user.") . "\n\n";
- $h{image_url} = $email_base_url . '/photo/' . $row->id . '.full.jpeg';
+ $h{image_url} = $email_base_url . $row->photos->[0]->{url_full};
} else {
$h{has_photo} = '';
$h{image_url} = '';