summaryrefslogtreecommitdiff
path: root/core/controllers/items.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/controllers/items.php')
-rw-r--r--core/controllers/items.php2
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}");