diff options
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Comment.pm | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 958194eb8..195fe4019 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -132,21 +132,12 @@ sub confirm { =head2 get_photo_params Returns a hashref of details of any attached photo for use in templates. -Hashref contains height, width and url keys. =cut sub get_photo_params { my $self = shift; - - return {} unless $self->photo; - - my $photo = {}; - ( $photo->{width}, $photo->{height} ) = - Image::Size::imgsize( \$self->photo ); - $photo->{url} = '/photo?c=' . $self->id; - - return $photo; + return FixMyStreet::App::get_photo_params($self, 'c'); } =head2 meta_problem_state |