summaryrefslogtreecommitdiff
path: root/modules/gallery/models
diff options
context:
space:
mode:
authorRomain LE DISEZ <romain.git@ledisez.net>2009-07-20 10:49:47 +0200
committerRomain LE DISEZ <romain.git@ledisez.net>2009-07-20 10:49:47 +0200
commitd3fa2bed687438ead8ea64b40c23f90e231b6b61 (patch)
tree193da0d7977ced6736b15793c30a92a7c50a61c7 /modules/gallery/models
parentaeff79b6345d01d74d8389bb6d2a3a6f401f2183 (diff)
parent33d0b82d024df8fd85798cc4f6b9bab377f4f783 (diff)
Merge commit 'upstream/master'
Diffstat (limited to 'modules/gallery/models')
-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 c7311081..58ac8f18 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;