Issue #2834796 by timmillwood: Remove statistics access_log settings
parent
765c10b69f
commit
230c5bf0e1
|
|
@ -1,5 +1,2 @@
|
|||
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 @@ class IntegrationTest extends ViewTestBase {
|
|||
$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 @@ class MigrateStatisticsConfigsTest extends MigrateDrupal6TestBase {
|
|||
*/
|
||||
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 @@ class MigrateStatisticsConfigsTest extends MigrateDrupal7TestBase {
|
|||
*/
|
||||
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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue