Cleaning up when enabling and / or disabling.
clemens.tolboom - October 10, 2008 - 10:24
| Project: | Drush Module Manager |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | clemens.tolboom |
| Status: | closed |
Jump to:
Description
From a drush patch proposal #304783: Add `pm enable` and `pm disable` functionality to Drush these calls are made
<?php
// Enable and install the schema of each module.
module_enable($packages);
drupal_install_modules($packages);
module_invoke('locale', 'system_update', $packages);
actions_synchronize();
drupal_clear_css_cache();
drupal_clear_js_cache();
drush_print(t('Project installation completed!'));
foreach ($packages as $package) {
module_invoke_all('drush_pm_post_enable', $package);
}
?>I'm not sure why all these calls are used. The clearing and synchronize seems logical. But first enable then install?
The patch uses also
<?php
$files = module_rebuild_cache();
?>If I go to use this I would loose drush mm dot. Is that bad? I tried to fix this in (bad core patch alert;-) #310898: Making module_enable and module_disable API functions where chx in #10 is about to fix it.
Do we have bugs about this?

#1
As Dries uses these in the 6.7 release and I ran into stale javascripts I need to implement these.
> // $Id: system.admin.inc,v 1.63.2.5 2008/11/26 13:54:33 dries Exp $
1349,1351d1348
< $form['#submit'][] = 'drupal_clear_css_cache';
< $form['#submit'][] = 'drupal_clear_js_cache';
#2
I added these lines to enable, disable and uninstall
<?phpdrupal_clear_css_cache();
drupal_clear_js_cache();
actions_synchronize();
?>
#3
Automatically closed -- issue fixed for two weeks with no activity.