comment_save
- Versions
- 4.6
comment_save($id, $edit)- 4.7 – 6
comment_save($edit)- 7
comment_save($comment)
Code
modules/comment.module, line 1000
<?php
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);
}
?>Login or register to post comments 