aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Admin.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-04-24 19:02:49 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-05-07 15:30:12 +0100
commit8246580437ca944f361789dc72bf74b624f06c36 (patch)
tree70497fd011275f3e4ee92140e7246767d9586782 /perllib/FixMyStreet/App/Controller/Admin.pm
parent28d1bb38e430588f0c19b2366cc14d52e98b02d0 (diff)
Improve non_public photo handling.
Clear the photo cache if the non_public flag is switched on, do not cache non_public or LOGIN_REQUIRED photos, remove non_public photos from memcached recent lists, pass through any cookies on non_public reports/updates, and check the non_public flag on photo lookup.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 2f4669456..5ba3e1da4 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -535,7 +535,7 @@ sub report_edit : Path('report_edit') : Args(1) {
$self->remove_photo($c, $problem, $remove_photo_param);
}
- if ($problem->state eq 'hidden') {
+ if ($problem->state eq 'hidden' || $problem->non_public) {
$problem->get_photoset->delete_cached;
}