You are here

function fivestar_comment_load in Fivestar 6

Same name and namespace in other branches
  1. 5 fivestar_comment.module \fivestar_comment_load()
  2. 6.2 fivestar_comment.module \fivestar_comment_load()

Get a current rating for a comment.

2 calls to fivestar_comment_load()
fivestar_comment in ./fivestar_comment.module
Implementation of hook_comment().
fivestar_comment_form_alter in ./fivestar_comment.module
Form alter specification for comments.

File

./fivestar_comment.module, line 162

Code

function fivestar_comment_load($cid, $nid, $reset = FALSE) {
  global $user;
  static $cids = array();
  if (!isset($cids[$cid]) || $reset) {
    $cids[$cid] = db_fetch_array(db_query('SELECT * FROM {fivestar_comment} WHERE cid = %d', $cid));
  }
  return $cids[$cid];
}