summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-06-05 09:22:22 +0000
committerDries Buytaert <dries@buytaert.net>2007-06-05 09:22:22 +0000
commit2a3744c572ac0e309b422ac087efcd50f40d16c0 (patch)
tree31a168659eeada52fdb2eb0e0beca872d3d1e852 /modules
parentc4d170c96170ec01606ae00ef28c308556acef8d (diff)
downloadbrdo-2a3744c572ac0e309b422ac087efcd50f40d16c0.tar.gz
brdo-2a3744c572ac0e309b422ac087efcd50f40d16c0.tar.bz2
- Patch #149339 by Ted: removed unnecessary heavy query.
Diffstat (limited to 'modules')
-rw-r--r--modules/comment/comment.module7
1 files changed, 0 insertions, 7 deletions
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());