From 2a3744c572ac0e309b422ac087efcd50f40d16c0 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 5 Jun 2007 09:22:22 +0000 Subject: - Patch #149339 by Ted: removed unnecessary heavy query. --- modules/comment/comment.module | 7 ------- 1 file changed, 7 deletions(-) (limited to 'modules') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 871386974..7654be15b 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -750,13 +750,6 @@ function comment_save($edit) { watchdog('content', 'Comment: updated %subject.', array('%subject' => $edit['subject']), WATCHDOG_NOTICE, l(t('view'), 'node/'. $edit['nid'], array('fragment' => 'comment-'. $edit['cid']))); } else { - // Check for duplicate comments. Note that we have to use the - // validated/filtered data to perform such check. - $duplicate = db_result(db_query("SELECT COUNT(cid) FROM {comments} WHERE pid = %d AND nid = %d AND subject = '%s' AND comment = '%s'", $edit['pid'], $edit['nid'], $edit['subject'], $edit['comment']), 0); - if ($duplicate != 0) { - watchdog('content', 'Comment: duplicate %subject.', array('%subject' => $edit['subject']), WATCHDOG_WARNING); - } - // Add the comment to database. $status = user_access('post comments without approval') ? COMMENT_PUBLISHED : COMMENT_NOT_PUBLISHED; $roles = variable_get('comment_roles', array()); -- cgit v1.2.3