aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2019-10-07 09:27:27 +0100
committerDave Arter <davea@mysociety.org>2019-10-07 11:53:29 +0100
commit0ad08dfddf926227ab94e2342d378d6d5a52368d (patch)
treeeb293dacc5c1ebe21a09ea74c482c00173a31434 /perllib/FixMyStreet/App/Controller/Report.pm
parent96e9445b939ee81b040a94221d6cf0285515924f (diff)
Respect cobrand updates_restriction when dealing with comments
Allows limiting display, moderation and photos of comments.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index eb6050fde..662f865c3 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -183,9 +183,9 @@ sub load_problem_or_display_error : Private {
sub load_updates : Private {
my ( $self, $c ) = @_;
- my $updates = $c->model('DB::Comment')->search(
- { problem_id => $c->stash->{problem}->id, state => 'confirmed' },
- { order_by => [ 'confirmed', 'id' ] }
+ my $updates = $c->cobrand->updates->search(
+ { problem_id => $c->stash->{problem}->id, "me.state" => 'confirmed' },
+ { order_by => [ 'me.confirmed', 'me.id' ] }
);
my $questionnaires_still_open = $c->model('DB::Questionnaire')->search(