Skip to content
Snippets Groups Projects
Commit 0f3085c3 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #210876 by deekayen, c960657: add logging of who installs/uninstalls a module.

parent ba93c491
No related branches found
No related tags found
No related merge requests found
...@@ -379,6 +379,7 @@ function module_enable($module_list, $enable_dependencies = TRUE) { ...@@ -379,6 +379,7 @@ function module_enable($module_list, $enable_dependencies = TRUE) {
drupal_set_installed_schema_version($module, $versions ? max($versions) : SCHEMA_INSTALLED); drupal_set_installed_schema_version($module, $versions ? max($versions) : SCHEMA_INSTALLED);
// Record the fact that it was installed. // Record the fact that it was installed.
$modules_installed[] = $module; $modules_installed[] = $module;
watchdog('system', '%module module installed.', array('%module' => $module), WATCHDOG_INFO);
} }
// Enable the module. // Enable the module.
......
...@@ -122,6 +122,7 @@ class EnableDisableTestCase extends ModuleTestCase { ...@@ -122,6 +122,7 @@ class EnableDisableTestCase extends ModuleTestCase {
$this->assertText(t('hook_modules_enabled fired for aggregator'), t('hook_modules_enabled fired.')); $this->assertText(t('hook_modules_enabled fired for aggregator'), t('hook_modules_enabled fired.'));
$this->assertModules(array('aggregator'), TRUE); $this->assertModules(array('aggregator'), TRUE);
$this->assertTableCount('aggregator', TRUE); $this->assertTableCount('aggregator', TRUE);
$this->assertLogMessage('system', "%module module installed.", array('%module' => 'aggregator'), WATCHDOG_INFO);
$this->assertLogMessage('system', "%module module enabled.", array('%module' => 'aggregator'), WATCHDOG_INFO); $this->assertLogMessage('system', "%module module enabled.", array('%module' => 'aggregator'), WATCHDOG_INFO);
// Disable aggregator, check tables, uninstall aggregator, check tables. // Disable aggregator, check tables, uninstall aggregator, check tables.
......
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