summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-02-26 15:18:17 +0000
committerDries Buytaert <dries@buytaert.net>2010-02-26 15:18:17 +0000
commitd86d55463347a9d29ca07b3f6c83f2b6fb98f398 (patch)
tree288a98cac34a99572bc92b8b3ee6950f2d61721b /modules/node/node.module
parentb297dc27e203d358edb2be81d793c35452169fdf (diff)
downloadbrdo-d86d55463347a9d29ca07b3f6c83f2b6fb98f398.tar.gz
brdo-d86d55463347a9d29ca07b3f6c83f2b6fb98f398.tar.bz2
- Patch #704362 by catch, andypost: fixed notices/warnings when comment module is disabled
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module22
1 files changed, 7 insertions, 15 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 5e6f0c11f..325fea047 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -311,21 +311,13 @@ function theme_node_list($variables) {
function node_tag_new($node) {
global $user;
if ($user->uid) {
- // To avoid multiple inserts if a user repeatedly requests the same page,
- // only update history if the node has been updated, a new comment has been
- // posted, or more than thirty minutes has elapsed since the last request.
- $last_viewed = node_last_viewed($node->nid);
- if (!$last_viewed
- || ($last_viewed <= $node->changed || $last_viewed <= $node->last_comment_timestamp)
- || $last_viewed <= REQUEST_TIME - variable_get('node_last_viewed_threshold', 1800)) {
- db_merge('history')
- ->key(array(
- 'uid' => $user->uid,
- 'nid' => $node->nid,
- ))
- ->fields(array('timestamp' => REQUEST_TIME))
- ->execute();
- }
+ db_merge('history')
+ ->key(array(
+ 'uid' => $user->uid,
+ 'nid' => $node->nid,
+ ))
+ ->fields(array('timestamp' => REQUEST_TIME))
+ ->execute();
}
}