diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-09 11:22:54 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-09 11:22:54 +0100 |
commit | 5d60e828ccd46a805e9463d14f388188efef9f4e (patch) | |
tree | 7d2a7b88a8cb7b0dc963a133f3d3230d8878ff94 /perllib/FixMyStreet/App/Controller/Contact.pm | |
parent | 2f905f6b8f74a5a892b3974e4f0b4076f9b58ddf (diff) |
Centralise problem report loading, 404/410 checking.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Contact.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Contact.pm | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Contact.pm b/perllib/FixMyStreet/App/Controller/Contact.pm index bd7d415e7..047de7691 100644 --- a/perllib/FixMyStreet/App/Controller/Contact.pm +++ b/perllib/FixMyStreet/App/Controller/Contact.pm @@ -63,16 +63,8 @@ sub determine_contact_type : Private { $update_id = undef unless $update_id && $update_id =~ /^[1-9]\d*$/; if ($id) { - my $problem = $c->cobrand->problems->find( - { id => $id }, - { - 'select' => [ - 'title', 'detail', 'name', - 'anonymous', 'id', - 'user_id', 'confirmed', - ] - } - ); + + $c->forward( '/report/load_problem_or_display_error', [ $id ] ); if ($update_id) { my $update = $c->model('DB::Comment')->find( @@ -81,9 +73,6 @@ sub determine_contact_type : Private { $c->stash->{update} = $update; } - elsif ($problem) { - $c->stash->{problem} = $problem; - } } return 1; |