Commit c8907ebc authored by alexpott's avatar alexpott

Issue #2421663 by timmillwood, dmitrii, amateescu, dawehner, xjm: Statistics...

Issue #2421663 by timmillwood, dmitrii, amateescu, dawehner, xjm: Statistics module installs {node_counter} even if Node is uninstalled
parent bd1964cb
......@@ -5,3 +5,5 @@ package: Core
version: VERSION
core: 8.x
configure: statistics.settings
dependencies:
- node
......@@ -57,3 +57,17 @@ function statistics_schema() {
return $schema;
}
/**
* Disable the Statistics module if the node module is not enabled.
*/
function statistics_update_8001() {
if (!\Drupal::moduleHandler()->moduleExists('node')) {
if (\Drupal::service('module_installer')->uninstall(array('statistics'), TRUE)) {
return 'The statistics module depends on the node module and has therefore been uninstalled.';
}
else {
return 'There was an error uninstalling the statistcs module.';
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment