function subscriptions_comment_taxa in Subscriptions 5
given a comment, return an array of associated taxonomies
1 call to subscriptions_comment_taxa()
- subscriptions_comment in ./
subscriptions.module - Implementation of hook_comment().
File
- ./
subscriptions.module, line 752
Code
function subscriptions_comment_taxa($comment) {
$nid = is_null($comment->nid) ? $comment['nid'] : $comment->nid;
$result = db_query('SELECT tid FROM {term_node} WHERE nid = %d', $nid);
while ($row = db_fetch_object($result)) {
$taxa[] = $row->tid;
}
return $taxa ? $taxa : array();
}