diff options
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Comment.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 5734ff8d5..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++, @@ -187,14 +187,14 @@ sub photos { return \@photos; } -=head2 meta_problem_state +=head2 problem_state_display Returns a string suitable for display lookup in the update meta section. Removes the '- council/user' bit from fixed states. =cut -sub meta_problem_state { +sub problem_state_display { my $self = shift; my $state = $self->problem_state; |