function _vud_comment_get_node_type in Vote Up/Down 6.3
Same name and namespace in other branches
- 6.2 vud_comment/vud_comment.module \_vud_comment_get_node_type()
- 7 vud_comment/vud_comment.module \_vud_comment_get_node_type()
Function to return the node type of a particular node ID.
1 call to _vud_comment_get_node_type()
- vud_comment_comment in vud_comment/
vud_comment.module - Implementation of hook_comment().
File
- vud_comment/
vud_comment.module, line 157 - Adds a voting widget to comments.
Code
function _vud_comment_get_node_type($nid) {
static $node_types_by_nid = array();
if (!isset($node_types_by_nid[$nid])) {
$node_types_by_nid[$nid] = db_result(db_query("SELECT type from {node} WHERE nid = %d", $nid));
}
return $node_types_by_nid[$nid];
}