function nodereference_count_update_count in Nodereference Count 7
Same name and namespace in other branches
- 6 nodereference_count.module \nodereference_count_update_count()
Trigger an update of the fields on a particular node.
Parameters
$nid: The nid of the node being referenced.
2 calls to nodereference_count_update_count()
- nodereference_count_exit in ./
nodereference_count.module - Implements hook_exit().
- nodereference_count_references_update in ./
nodereference_count.module - Identify counted node references on a node and trigger an update of the referenced nodes.
File
- ./
nodereference_count.module, line 400 - Defines a field type for counting the references to a node.
Code
function nodereference_count_update_count($nid) {
$node = node_load($nid);
field_attach_presave('node', $node);
field_attach_update('node', $node);
}