aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Problem.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-03-14 13:11:55 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-03-14 13:11:55 +0000
commitf465e32109d6600887f1c5765b44347a4cfaa3d7 (patch)
tree3855e96d1d69683b388d82c27bad3f9e339f2792 /perllib/FixMyStreet/DB/Result/Problem.pm
parent1b15ca0aea334d20fb0f19fed36bc948668e2a14 (diff)
parentc9681f6bbc04659b9d6ed5eaa46b8c2edd704f9e (diff)
Merge branch 'redesign'
Conflicts: .gitignore notes/INSTALL perllib/FixMyStreet/App/Controller/Photo.pm perllib/FixMyStreet/Cobrand/FixMyStreet.pm
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm13
1 files changed, 2 insertions, 11 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index 7ceabf1da..ce7488703 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -329,7 +329,7 @@ sub check_for_errors {
|| $self->name =~ m/\ba\s*n+on+((y|o)mo?u?s)?(ly)?\b/i )
{
$errors{name} = _(
-'Please enter your full name, councils need this information - if you do not wish your name to be shown on the site, untick the box'
+'Please enter your full name, councils need this information – if you do not wish your name to be shown on the site, untick the box below'
);
}
@@ -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