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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
5834887f
Commit
5834887f
authored
13 years ago
by
catch
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1418008
by timmillwood: Added change 'reads' to 'views'.
parent
912b5513
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
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/modules/statistics/statistics.module
+1
-1
1 addition, 1 deletion
core/modules/statistics/statistics.module
core/modules/statistics/statistics.test
+4
-4
4 additions, 4 deletions
core/modules/statistics/statistics.test
with
5 additions
and
5 deletions
core/modules/statistics/statistics.module
+
1
−
1
View file @
5834887f
...
...
@@ -119,7 +119,7 @@ function statistics_node_view($node, $view_mode) {
if
(
user_access
(
'view post access counter'
))
{
$statistics
=
statistics_get
(
$node
->
nid
);
if
(
$statistics
)
{
$links
[
'statistics_counter'
][
'title'
]
=
format_plural
(
$statistics
[
'totalcount'
],
'1
read
'
,
'@count
read
s'
);
$links
[
'statistics_counter'
][
'title'
]
=
format_plural
(
$statistics
[
'totalcount'
],
'1
view
'
,
'@count
view
s'
);
$node
->
content
[
'links'
][
'statistics'
]
=
array
(
'#theme'
=>
'links__node__statistics'
,
'#links'
=>
$links
,
...
...
This diff is collapsed.
Click to expand it.
core/modules/statistics/statistics.test
+
4
−
4
View file @
5834887f
...
...
@@ -327,12 +327,12 @@ class StatisticsAdminTestCase extends DrupalWebTestCase {
$this
->
assertText
(
'node/1'
,
t
(
'Test node found.'
));
// Hit the node again (the counter is incremented after the hit, so
// "1
read
" will actually be shown when the node is hit the second time).
// "1
view
" will actually be shown when the node is hit the second time).
$this
->
drupalGet
(
'node/'
.
$this
->
test_node
->
nid
);
$this
->
assertText
(
'1
read
'
,
t
(
'Node is
rea
d once.'
));
$this
->
assertText
(
'1
view
'
,
t
(
'Node is
viewe
d once.'
));
$this
->
drupalGet
(
'node/'
.
$this
->
test_node
->
nid
);
$this
->
assertText
(
'2
read
s'
,
t
(
'Node is
rea
d 2 times.'
));
$this
->
assertText
(
'2
view
s'
,
t
(
'Node is
viewe
d 2 times.'
));
}
/**
...
...
@@ -398,7 +398,7 @@ class StatisticsAdminTestCase extends DrupalWebTestCase {
$this
->
drupalGet
(
'node/'
.
$this
->
test_node
->
nid
);
$this
->
drupalGet
(
'node/'
.
$this
->
test_node
->
nid
);
$this
->
assertText
(
'1
read
'
,
t
(
'Node is
rea
d once.'
));
$this
->
assertText
(
'1
view
'
,
t
(
'Node is
viewe
d once.'
));
$this
->
drupalGet
(
'admin/reports/pages'
);
$this
->
assertText
(
'node/'
.
$this
->
test_node
->
nid
,
t
(
'Hit URL found.'
));
...
...
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