diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-07-19 13:20:08 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-07-19 13:20:08 -0700 |
commit | c46188111015a128ac4ffa1882a63924cd49b25e (patch) | |
tree | 970639f6e391e26be3db225a82f771fbc189a0d6 | |
parent | 0e4a7a5133dab7d834657c67fcf5d07bc1ea3211 (diff) |
Don't post the item_updated() event if we're just updating the view count.
-rw-r--r-- | modules/gallery/models/item.php | 5 |
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; |