You are here

function node_comment_mode in Drupal 4

Same name and namespace in other branches
  1. 5 modules/node/node.module \node_comment_mode()
  2. 6 modules/node/node.module \node_comment_mode()

Retrieve the comment mode for the given node ID (none, read, or read/write).

4 calls to node_comment_mode()
comment_links in modules/comment.module
comment_render in modules/comment.module
comment_reply in modules/comment.module
comment_save in modules/comment.module
Accepts a submission of new or changed comment content.

File

modules/node.module, line 813
The core that allows content to be submitted to the site.

Code

function node_comment_mode($nid) {
  static $comment_mode;
  if (!isset($comment_mode[$nid])) {
    $comment_mode[$nid] = db_result(db_query('SELECT comment FROM {node} WHERE nid = %d', $nid));
  }
  return $comment_mode[$nid];
}