summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment')
-rw-r--r--modules/comment/controllers/admin_comments.php4
-rw-r--r--modules/comment/helpers/comment_event.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/comment/controllers/admin_comments.php b/modules/comment/controllers/admin_comments.php
index 3e8d3c46..ea76b188 100644
--- a/modules/comment/controllers/admin_comments.php
+++ b/modules/comment/controllers/admin_comments.php
@@ -113,8 +113,8 @@ class Admin_Comments_Controller extends Admin_Controller {
if ($comment->loaded) {
$comment->state = $state;
$comment->save();
- module::event("comment_updated", $orig, $comment);
- if ($orig->state == "published" || $comment->state == "published") {
+ module::event("comment_updated", $comment);
+ if ($comment->original("state") == "published" || $comment->state == "published") {
module::event("item_related_update", $comment->item());
}
}
diff --git a/modules/comment/helpers/comment_event.php b/modules/comment/helpers/comment_event.php
index a3beb27a..3850a001 100644
--- a/modules/comment/helpers/comment_event.php
+++ b/modules/comment/helpers/comment_event.php
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class comment_event_Core {
- static function item_before_delete($item) {
+ static function item_deleted($item) {
Database::instance()->delete("comments", array("item_id" => $item->id));
}
}