function node_tag_new in Drupal 4
Same name and namespace in other branches
- 5 modules/node/node.module \node_tag_new()
- 6 modules/node/node.module \node_tag_new()
- 7 modules/node/node.module \node_tag_new()
Update the 'last viewed' timestamp of the specified node for current user.
1 call to node_tag_new()
- node_show in modules/
node.module - Generate a page displaying a single node, along with its comments.
File
- modules/
node.module, line 90 - The core that allows content to be submitted to the site.
Code
function node_tag_new($nid) {
global $user;
if ($user->uid) {
if (node_last_viewed($nid)) {
db_query('UPDATE {history} SET timestamp = %d WHERE uid = %d AND nid = %d', time(), $user->uid, $nid);
}
else {
@db_query('INSERT INTO {history} (uid, nid, timestamp) VALUES (%d, %d, %d)', $user->uid, $nid, time());
}
}
}