aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Contact.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/Contact.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/Contact.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Contact.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Contact.pm b/perllib/FixMyStreet/App/Controller/Contact.pm
index 06566a8ab..8477dd694 100644
--- a/perllib/FixMyStreet/App/Controller/Contact.pm
+++ b/perllib/FixMyStreet/App/Controller/Contact.pm
@@ -93,11 +93,11 @@ sub determine_contact_type : Private {
} elsif ($id) {
$c->forward( '/report/load_problem_or_display_error', [ $id ] );
if ($update_id) {
- my $update = $c->model('DB::Comment')->search(
+ my $update = $c->cobrand->updates->search(
{
- id => $update_id,
+ "me.id" => $update_id,
problem_id => $id,
- state => 'confirmed',
+ "me.state" => 'confirmed',
}
)->first;