summaryrefslogtreecommitdiff
path: root/modules/gallery/models
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/models')
-rw-r--r--modules/gallery/models/item.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php
index 94e2fcf7..6512e9e5 100644
--- a/modules/gallery/models/item.php
+++ b/modules/gallery/models/item.php
@@ -122,8 +122,8 @@ class Item_Model extends ORM_MPTT {
/**
* Move this item to the specified target.
* @chainable
- * @param Item_Model $target Target item (must be an album
- * @return ORM_MTPP
+ * @param Item_Model $target Target item (must be an album)
+ * @return ORM_MPTT
*/
function move_to($target) {
if (!$target->is_album()) {
@@ -137,6 +137,7 @@ class Item_Model extends ORM_MPTT {
$original_path = $this->file_path();
$original_resize_path = $this->resize_path();
$original_thumb_path = $this->thumb_path();
+ $original_parent = $this->parent();
parent::move_to($target, true);
$this->relative_path_cache = null;
@@ -154,6 +155,7 @@ class Item_Model extends ORM_MPTT {
@rename($original_thumb_path, $this->thumb_path());
}
+ module::event("item_moved", $this, $original_parent);
return $this;
}