mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 03:19:13 -04:00
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
This commit is contained in:
@@ -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}");
|
||||
|
||||
Reference in New Issue
Block a user