function comment_node_delete

cis7 comment.module comment_node_delete($node)
cle7 comment.module comment_node_delete($node)
elmsmedia7 comment.module comment_node_delete($node)
icor7 comment.module comment_node_delete($node)
meedjum_blog7 comment.module comment_node_delete($node)
mooc7 comment.module comment_node_delete($node)

Implements hook_node_delete().

File

modules/comment/comment.module, line 1321
Enables users to comment on published content.

Code

function comment_node_delete($node) {
  $cids = db_query('SELECT cid FROM {comment} WHERE nid = :nid', array(':nid' => $node->nid))->fetchCol();
  comment_delete_multiple($cids);
  db_delete('node_comment_statistics')->condition('nid', $node->nid)->execute();
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.