Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
d86d5546
Commit
d86d5546
authored
Feb 26, 2010
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#704362
by catch, andypost: fixed notices/warnings when comment module is disabled
parent
b297dc27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
modules/node/node.module
modules/node/node.module
+7
-15
No files found.
modules/node/node.module
View file @
d86d5546
...
...
@@ -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
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment