Skip to content
Snippets Groups Projects
Commit 5834887f authored by catch's avatar catch
Browse files

Issue #1418008 by timmillwood: Added change 'reads' to 'views'.

parent 912b5513
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
......@@ -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 reads');
$links['statistics_counter']['title'] = format_plural($statistics['totalcount'], '1 view', '@count views');
$node->content['links']['statistics'] = array(
'#theme' => 'links__node__statistics',
'#links' => $links,
......
......@@ -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 read once.'));
$this->assertText('1 view', t('Node is viewed once.'));
$this->drupalGet('node/' . $this->test_node->nid);
$this->assertText('2 reads', t('Node is read 2 times.'));
$this->assertText('2 views', t('Node is viewed 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 read once.'));
$this->assertText('1 view', t('Node is viewed once.'));
$this->drupalGet('admin/reports/pages');
$this->assertText('node/' . $this->test_node->nid, t('Hit URL found.'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment