aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Admin.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-05-17 11:28:07 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-05-18 09:53:42 +0100
commitfbae634bbb5e8caeeeb02fa296f3c68f955fe3d5 (patch)
tree996b1cc558b66ced35631bd84667212e72f92f1f /perllib/FixMyStreet/App/Controller/Admin.pm
parent8eaf26c962c4941a302975630035c24f1e5f55ef (diff)
Fix removal of cached update photos.
It was possible that rotating an update photo did not remove its cached copy.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 3e757f227..db9545830 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -784,7 +784,7 @@ sub report_edit : Path('report_edit') : Args(1) {
}
if ( $remove_photo_param || $new_state eq 'hidden' ) {
- unlink glob FixMyStreet->path_to( 'web', 'photo', $problem->id . '.*' );
+ $problem->get_photoset->delete_cached;
}
if ( $problem->is_visible() and $old_state eq 'unconfirmed' ) {
@@ -1005,7 +1005,7 @@ sub update_edit : Path('update_edit') : Args(1) {
}
if ( $remove_photo_param || $new_state eq 'hidden' ) {
- unlink glob FixMyStreet->path_to( 'web', 'photo', 'c', $update->id . '.*' );
+ $update->get_photoset->delete_cached;
}
$update->name( $c->get_param('name') || '' );