Skip to content
Snippets Groups Projects
Commit d86d5546 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #704362 by catch, andypost: fixed notices/warnings when comment module is disabled

parent b297dc27
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -311,13 +311,6 @@ 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,
......@@ -327,7 +320,6 @@ function node_tag_new($node) {
->execute();
}
}
}
/**
* Retrieves the timestamp at which the current user last viewed the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment