summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/gallery/models/item.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php
index 05c4e656..129bd77f 100644
--- a/modules/gallery/models/item.php
+++ b/modules/gallery/models/item.php
@@ -353,11 +353,12 @@ class Item_Model extends ORM_MPTT {
$this->created = $this->updated;
$r = ORM::factory("item")->select("MAX(weight) as max_weight")->find();
$this->weight = $r->max_weight + 1;
- $created = 1;
+ } else {
+ $send_event = 1;
}
}
parent::save();
- if (!isset($created)) {
+ if (isset($send_event)) {
module::event("item_updated", $this);
}
return $this;