diff options
author | Dave Arter <davea@mysociety.org> | 2019-10-07 09:27:27 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2019-10-07 11:53:29 +0100 |
commit | 0ad08dfddf926227ab94e2342d378d6d5a52368d (patch) | |
tree | eb293dacc5c1ebe21a09ea74c482c00173a31434 /perllib/FixMyStreet/App/Controller/Photo.pm | |
parent | 96e9445b939ee81b040a94221d6cf0285515924f (diff) |
Respect cobrand updates_restriction when dealing with comments
Allows limiting display, moderation and photos of comments.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Photo.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Photo.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Photo.pm b/perllib/FixMyStreet/App/Controller/Photo.pm index d7a5b4bb3..5507e3a94 100644 --- a/perllib/FixMyStreet/App/Controller/Photo.pm +++ b/perllib/FixMyStreet/App/Controller/Photo.pm @@ -52,7 +52,7 @@ sub index :LocalRegex('^(c/)?([1-9]\d*)(?:\.(\d+))?(?:\.(full|tn|fp))?\.(?:jpeg| my $item; if ( $is_update ) { - ($item) = $c->model('DB::Comment')->search( { + ($item) = $c->cobrand->updates->search( { 'me.id' => $id, 'me.state' => 'confirmed', 'problem.state' => [ FixMyStreet::DB::Result::Problem->visible_states() ], |