comment_num_replies

  1. drupal
    1. 4.7
    2. 5 comment.module
    3. 6 comment.module
Versions
4.7 – 6 comment_num_replies($pid)

▾ 1 function calls comment_num_replies()

comment_access in modules/comment.module
This is *not* a hook_access() implementation. This function is called to determine whether the current user has access to a particular comment.

Code

modules/comment.module, line 1117

<?php
function comment_num_replies($pid) {
  static $cache;

  if (!isset($cache[$pid])) {
    $cache[$pid] = db_result(db_query('SELECT COUNT(cid) FROM {comments} WHERE pid = %d AND status = %d', $pid, COMMENT_PUBLISHED));
  }

  return $cache[$pid];
}
?>