Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
311a25ca
Commit
311a25ca
authored
Jan 3, 2010
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
#423822
by JamesAn, agentrickard, and michaelfavia: Update node module to use drupal_static().
parent
acae21fe
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/node/node.module
+4
-4
4 additions, 4 deletions
modules/node/node.module
with
4 additions
and
4 deletions
modules/node/node.module
+
4
−
4
View file @
311a25ca
...
@@ -318,7 +318,7 @@ function node_tag_new($nid) {
...
@@ -318,7 +318,7 @@ function node_tag_new($nid) {
*/
*/
function
node_last_viewed
(
$nid
)
{
function
node_last_viewed
(
$nid
)
{
global
$user
;
global
$user
;
static
$history
;
$history
=
&
drupal_static
(
__FUNCTION__
,
array
())
;
if
(
!
isset
(
$history
[
$nid
]))
{
if
(
!
isset
(
$history
[
$nid
]))
{
$history
[
$nid
]
=
db_query
(
"SELECT timestamp FROM
{
history
}
WHERE uid = :uid AND nid = :nid"
,
array
(
':uid'
=>
$user
->
uid
,
':nid'
=>
$nid
))
->
fetchObject
();
$history
[
$nid
]
=
db_query
(
"SELECT timestamp FROM
{
history
}
WHERE uid = :uid AND nid = :nid"
,
array
(
':uid'
=>
$user
->
uid
,
':nid'
=>
$nid
))
->
fetchObject
();
...
@@ -339,7 +339,7 @@ function node_last_viewed($nid) {
...
@@ -339,7 +339,7 @@ function node_last_viewed($nid) {
*/
*/
function
node_mark
(
$nid
,
$timestamp
)
{
function
node_mark
(
$nid
,
$timestamp
)
{
global
$user
;
global
$user
;
static
$cache
;
$cache
=
&
drupal_static
(
__FUNCTION__
,
array
())
;
if
(
!
$user
->
uid
)
{
if
(
!
$user
->
uid
)
{
return
MARK_READ
;
return
MARK_READ
;
...
@@ -744,7 +744,7 @@ function _node_types_build() {
...
@@ -744,7 +744,7 @@ function _node_types_build() {
* A node type object.
* A node type object.
*/
*/
function
node_type_set_defaults
(
$info
=
array
())
{
function
node_type_set_defaults
(
$info
=
array
())
{
static
$type
;
$type
=
&
drupal_static
(
__FUNCTION__
)
;
if
(
!
isset
(
$type
))
{
if
(
!
isset
(
$type
))
{
$type
=
new
stdClass
();
$type
=
new
stdClass
();
...
@@ -2658,7 +2658,7 @@ function node_access_grants($op, $account = NULL) {
...
@@ -2658,7 +2658,7 @@ function node_access_grants($op, $account = NULL) {
* Determine whether the user has a global viewing grant for all nodes.
* Determine whether the user has a global viewing grant for all nodes.
*/
*/
function
node_access_view_all_nodes
()
{
function
node_access_view_all_nodes
()
{
static
$access
;
$access
=
&
drupal_static
(
__FUNCTION__
)
;
if
(
!
isset
(
$access
))
{
if
(
!
isset
(
$access
))
{
// If no modules implement the node access system, access is always true.
// If no modules implement the node access system, access is always true.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment