Updates the 'last viewed' timestamp of the specified node for current user.
$node: A node object.
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();
}
}