diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-11-29 10:33:16 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-11-29 10:33:16 +0000 |
commit | dde80e874b756975dc9e568ead500fec70af56d0 (patch) | |
tree | 02c981f6c6e2f0f254e4b498777d6e0fe6c2545d /modules/tracker/tracker.module | |
parent | 500b2a0022c68eb11263699c57d706beb8ec84e3 (diff) | |
download | brdo-dde80e874b756975dc9e568ead500fec70af56d0.tar.gz brdo-dde80e874b756975dc9e568ead500fec70af56d0.tar.bz2 |
- Patch #642178 by mfb: fixed two comment updates bug.
Diffstat (limited to 'modules/tracker/tracker.module')
-rw-r--r-- | modules/tracker/tracker.module | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index ebf2370a3..8b011ed66 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -191,11 +191,10 @@ function tracker_node_delete($node, $arg = 0) { * comments so we need to check for those here. */ function tracker_comment_update($comment) { - $comment = (array) $comment; // comment_save() calls hook_comment_publish() for all published comments // so we to handle all other values here. - if ($comment['status'] != COMMENT_PUBLISHED) { - _tracker_remove($comment['nid'], $comment['uid'], $comment['timestamp']); + if ($comment->status != COMMENT_PUBLISHED) { + _tracker_remove($comment->nid, $comment->uid, $comment->changed); } } @@ -309,9 +308,10 @@ function _tracker_remove($nid, $uid = NULL, $changed = NULL) { // Comments are a second reason to keep the user's subscription. if (!$keep_subscription) { // Check if the user has commented at least once on the given nid - $keep_subscription = db_query_range('SELECT COUNT(*) FROM {comment} WHERE nid = :nid AND uid = :uid AND status = 0', 0, 1, array( + $keep_subscription = db_query_range('SELECT COUNT(*) FROM {comment} WHERE nid = :nid AND uid = :uid AND status = :status', 0, 1, array( ':nid' => $nid, ':uid' => $uid, + ':status' => COMMENT_PUBLISHED, ))->fetchField(); } |