diff options
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index d0867c5ca..ce7488703 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -400,21 +400,12 @@ sub url { =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?id=' . $self->id; - - return $photo; + return FixMyStreet::App::get_photo_params($self, 'id'); } =head2 is_open |