aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Admin.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-05-18 11:52:30 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-05-18 11:52:30 +0100
commit66d93ceaed9df6ff3e0e28a62e655ad769c99614 (patch)
treef1942a5ffc598106e74fc38b44aee960ca28a6a9 /perllib/FixMyStreet/App/Controller/Admin.pm
parent5154fa740d3eca75534bd1be7a40f07342419fb7 (diff)
parentf19221e0cd17d02159c01a6ddc2c55b28ce4d730 (diff)
Merge branch '1400-remove-glob'
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') || '' );