summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-02-24 19:52:01 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-02-24 19:52:01 +0000
commit585ea819579405bbfe772d2e7fa647f54d5a17e2 (patch)
tree1c7ef1e513ad1ecb3f0ae3972457513b32ae0b96 /core
parent550d46da666a1159eda58fba17b1f3d920682d0c (diff)
Fix for ticket #98.
The problem was that item::delete was deleting the parent album
Diffstat (limited to 'core')
-rw-r--r--core/models/item.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/models/item.php b/core/models/item.php
index 8898e923..329f9c43 100644
--- a/core/models/item.php
+++ b/core/models/item.php
@@ -100,9 +100,9 @@ class Item_Model extends ORM_MPTT {
// If there is no name, the path is invalid so don't try to delete
if (!empty($this->name)) {
if ($this->is_album()) {
- dir::unlink(dirname($original_path));
- dir::unlink(dirname($original_resize_path));
- dir::unlink(dirname($original_thumb_path));
+ dir::unlink($original_path);
+ dir::unlink($original_resize_path);
+ dir::unlink($original_thumb_path);
} else {
unlink($original_path);
unlink($original_resize_path);