summaryrefslogtreecommitdiff
path: root/modules/comment/models
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-08-03 21:41:38 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-08-03 21:41:38 -0600
commit9104fa7b55d4613792208956bbd0098bd89b033c (patch)
tree4d0af426fcbaf3a169a9b94fab02de7e3c9cf259 /modules/comment/models
parentcc2711dce99972f60bf590fe858b2eaa9d0d2397 (diff)
parent7ad0808a117fd1db4e94da8d7763ccca1d69350a (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/comment/models')
-rw-r--r--modules/comment/models/comment.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/comment/models/comment.php b/modules/comment/models/comment.php
index d052a39c..83d0888a 100644
--- a/modules/comment/models/comment.php
+++ b/modules/comment/models/comment.php
@@ -64,17 +64,17 @@ class Comment_Model extends ORM {
$created = true;
}
}
+ $visible_change = $this->original()->state == "published" || $this->state == "published";
parent::save();
if (isset($created)) {
module::event("comment_created", $this);
} else {
- module::event("comment_updated", $this);
+ module::event("comment_updated", $this->original(), $this);
}
- // We only notify on the related items if we're making a visible change, which means moving in
- // or out of a published state
- if ($this->original("state") == "published" || $this->state == "published") {
+ // We only notify on the related items if we're making a visible change.
+ if ($visible_change) {
module::event("item_related_update", $this->item());
}