aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm8
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm8
2 files changed, 8 insertions, 8 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++,
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index 780a30e69..764f381a2 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -875,12 +875,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/$id.$i.$format?$cachebust",
url_full => "/photo/$id.$i.full.$format?$cachebust",
url_tn => "/photo/$id.$i.tn.$format?$cachebust",