diff options
author | Struan Donald <struan@exo.org.uk> | 2011-05-13 12:42:32 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-05-13 12:42:32 +0100 |
commit | 76715723f615a5858587586df395072745f9e5cb (patch) | |
tree | e20adac83ca5a01ff211b3fff4e0943e214df23d /perllib/FixMyStreet/App/Controller/Contact.pm | |
parent | 959acf33e06ea8ea3bae7fa89e800dfd8c45621e (diff) |
make problem report date pretty
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Contact.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Contact.pm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Contact.pm b/perllib/FixMyStreet/App/Controller/Contact.pm index 2980b3811..9a19f471e 100644 --- a/perllib/FixMyStreet/App/Controller/Contact.pm +++ b/perllib/FixMyStreet/App/Controller/Contact.pm @@ -80,7 +80,20 @@ sub determine_contact_type : Private { $update_id = undef unless $update_id && $update_id =~ /^[1-9]\d*$/; if ($id) { - my $problem = $c->model('DB::Problem')->find( { id => $id } ); + my $problem = $c->model('DB::Problem')->find( + { id => $id }, + { + 'select' => [ + 'title', 'detail', 'name', + 'anonymous', + 'user_id', + { + extract => 'epoch from confirmed', + -as => 'confirmed' + } + ] + } + ); if ( $update_id ) { # my $u = dbh()->selectrow_hashref( |