aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm23
1 files changed, 20 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 92c89a864..f02b2cbe3 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -154,6 +154,26 @@ sub load_problem_or_display_error : Private {
$c->stash->{problem} = $problem;
+ my $updates = $c->model('DB::Comment')->search(
+ { problem_id => $problem->id }, #, state => 'confirmed' },
+ {
+ select => [
+ 'id', 'name', 'text',
+ 'mark_fixed',
+ 'mark_open',
+ 'photo',
+ 'cobrand',
+ {
+ extract => 'epoch from confirmed',
+ -as => 'confirmed',
+ }
+ ],
+ order_by => 'confirmed'
+ }
+ );
+
+ $c->stash->{updates} = $updates;
+
return 1;
}
@@ -164,9 +184,6 @@ sub format_problem_for_display : Private {
$c->stash->{banner} = $c->cobrand->generate_problem_banner($problem);
- ( my $detail = $problem->detail ) =~ s/\r//g;
- my @detail = split /\n{2,}/, $detail;
- $c->stash->{detail} = \@detail;
$c->stash->{allow_photo_upload} = $c->cobrand->allow_photo_display;
$c->stash->{cobrand_alert_fields} = $c->cobrand->form_elements( '/alerts' );