node_tag_new

5 node.module node_tag_new($nid)
6 node.module node_tag_new($nid)
7 node.module node_tag_new($node)
8 node.module node_tag_new(Node $node)

Update the 'last viewed' timestamp of the specified node for current user.

Parameters

$node: A node object.

1 call to node_tag_new()

File

modules/node/node.module, line 303
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.

Code

function node_tag_new($node) {
  global $user;
  if ($user->uid) {
    db_merge('history')
      ->key(array(
      'uid' => $user->uid, 
      'nid' => $node->nid,
    ))
      ->fields(array('timestamp' => REQUEST_TIME))
      ->execute();
  }
}
Login or register to post comments