node_tag_new

Versions
4.6 – 7
node_tag_new($nid)

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

▾ 1 function calls node_tag_new()

node_show in modules/node/node.module
Generate an array which displays a node detail page.

Code

modules/node/node.module, line 273

<?php
function node_tag_new($nid) {
  global $user;

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

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.