Skip to content
Snippets Groups Projects
Commit 230c5bf0 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2834796 by timmillwood: Remove statistics access_log settings

parent 765c10b6
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
access_log:
enabled: false
max_lifetime: 259200
count_content_views: 0
display_max_age: 3600
......@@ -4,16 +4,6 @@ statistics.settings:
type: config_object
label: 'Statistics settings'
mapping:
access_log:
type: mapping
label: 'Access log settings'
mapping:
enabled:
type: boolean
label: 'Enable'
max_lifetime:
type: integer
label: 'Maximum lifetime'
count_content_views:
type: integer
label: 'Count content views'
......
......@@ -10,8 +10,6 @@ source:
- statistics_flush_accesslog_timer
- statistics_count_content_views
process:
'access_log/enabled': statistics_enable_access_log
'access_log/max_lifetime': statistics_flush_accesslog_timer
'count_content_views': statistics_count_content_views
destination:
plugin: config
......
......@@ -56,9 +56,8 @@ protected function setUp() {
$this->drupalCreateContentType(array('type' => 'page'));
$this->node = $this->drupalCreateNode(array('type' => 'page'));
// Enable access logging.
// Enable counting of content views.
$this->config('statistics.settings')
->set('access_log.enabled', 1)
->set('count_content_views', 1)
->save();
......
......@@ -79,3 +79,10 @@ function statistics_update_8002() {
// Set the new configuration setting for max age to the initial value.
\Drupal::configFactory()->getEditable('statistics.settings')->set('display_max_age', 3600)->save();
}
/**
* Remove access_log settings.
*/
function statistics_update_8300() {
\Drupal::configFactory()->getEditable('statistics.settings')->clear('access_log')->save();
}
......@@ -32,8 +32,6 @@ protected function setUp() {
*/
public function testStatisticsSettings() {
$config = $this->config('statistics.settings');
$this->assertIdentical(FALSE, $config->get('access_log.enabled'));
$this->assertIdentical(259200, $config->get('access_log.max_lifetime'));
$this->assertIdentical(0, $config->get('count_content_views'));
$this->assertConfigSchema(\Drupal::service('config.typed'), 'statistics.settings', $config->get());
}
......
......@@ -32,8 +32,6 @@ protected function setUp() {
*/
public function testStatisticsSettings() {
$config = $this->config('statistics.settings');
$this->assertIdentical(TRUE, $config->get('access_log.enabled'));
$this->assertIdentical(3600, $config->get('access_log.max_lifetime'));
$this->assertIdentical(1, $config->get('count_content_views'));
$this->assertConfigSchema(\Drupal::service('config.typed'), 'statistics.settings', $config->get());
}
......
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