comment_save

Versions
4.6
comment_save($id, $edit)
4.7 – 6
comment_save($edit)
7
comment_save($comment)

▾ 1 function calls comment_save()

comment_admin_edit in modules/comment.module
Menu callback; edit a comment from the administrative interface.

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
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.