Commit 0f3085c3 authored by Dries's avatar Dries

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

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