Same name and namespace in other branches
- 4.7.x modules/comment.module \comment_save()
- 5.x modules/comment/comment.module \comment_save()
- 6.x modules/comment/comment.module \comment_save()
- 7.x modules/comment/comment.module \comment_save()
1 call to comment_save()
- comment_admin_edit in modules/
comment.module - Menu callback; edit a comment from the administrative interface.
File
- modules/
comment.module, line 1000 - Enables users to comment on published content.
Code
function comment_save($id, $edit) {
db_query("UPDATE {comments} SET subject = '%s', comment = '%s', status = %d, format = '%s', name = '%s', mail = '%s', homepage = '%s' WHERE cid = %d", $edit['subject'], $edit['comment'], $edit['status'], $edit['format'], $edit['name'], $edit['mail'], $edit['homepage'], $id);
watchdog('content', t('Comment: modified %subject.', array(
'%subject' => theme('placeholder', $edit['subject']),
)));
drupal_set_message(t('The comment has been saved.'));
_comment_update_node_statistics($edit['nid']);
// Allow modules to respond to the updating of a comment.
module_invoke_all('comment', 'update', $edit);
}