aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Comment.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index e5929ca57..85cdb29f0 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -173,12 +173,12 @@ sub photos {
my $i = 0;
my $id = $self->id;
my @photos = map {
- my $format = 'jpeg';
my $cachebust = substr($_, 0, 8);
+ my ($hash, $format) = split /\./, $_;
{
- id => $_,
- url_temp => "/photo/$_.temp.$format",
- url_temp_full => "/photo/$_.fulltemp.$format",
+ id => $hash,
+ url_temp => "/photo/temp.$hash.$format",
+ url_temp_full => "/photo/fulltemp.$hash.$format",
url => "/photo/c/$id.$i.$format?$cachebust",
url_full => "/photo/c/$id.$i.full.$format?$cachebust",
idx => $i++,