diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2008-12-03 22:39:57 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2008-12-03 22:39:57 +0000 |
commit | 7bb4b6029df8b17ef8a2ba9c8ce8d6c7b3e015c3 (patch) | |
tree | 49dec269a2297339ea4cf3abc96e994be6843d15 /core/controllers/items.php | |
parent | d8511f2fde7baabe15687e38589eb17933ac9aa4 (diff) |
Add a MY_file class that extends the file helper by creating an unlink method that deletes a file or an album directory.
Modify Items_Controller::_delete to call this new helper method when deleting an item
Diffstat (limited to 'core/controllers/items.php')
-rw-r--r-- | core/controllers/items.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/controllers/items.php b/core/controllers/items.php index 6cf27fbf..6ba7db65 100644 --- a/core/controllers/items.php +++ b/core/controllers/items.php @@ -100,7 +100,9 @@ class Items_Controller extends REST_Controller { $parent = $item->parent(); if ($parent->id) { module::event("{$item->type}_before_delete", $item); + $item->delete(); + file::unlink($item->file_path()); } url::redirect("{$parent->type}s/{$parent->id}"); |