? includes/table.inc
Index: commands/core/drupal/environment_5.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/core/drupal/environment_5.inc,v
retrieving revision 1.9
diff -u -r1.9 environment_5.inc
--- commands/core/drupal/environment_5.inc	17 Mar 2010 13:30:16 -0000	1.9
+++ commands/core/drupal/environment_5.inc	4 Apr 2010 09:47:22 -0000
@@ -165,23 +165,34 @@
 /**
  * Enable a list of themes.
  *
+ * This function is based on system_themes_submit().
+ *
+ * @see system_themes_submit()
  * @param $themes
  *  Array of theme names.
  */
 function drush_theme_enable($themes) {
+  foreach ($themes as $theme) {
+    system_initialize_theme_blocks($theme);
+  }
   $placeholder = implode(',', array_fill(0, count($themes), "'%s'"));
   db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' AND name IN (".$placeholder.")", $themes);
+  menu_rebuild();
 }
 
 /**
  * Disable a list of themes.
  *
+ * This function is based on system_themes_submit().
+ *
+ * @see system_themes_submit()
  * @param $themes
  *  Array of theme names.
  */
 function drush_theme_disable($themes) {
   $placeholder = implode(',', array_fill(0, count($themes), "'%s'"));
   db_query("UPDATE {system} SET status = 0 WHERE type = 'theme' AND name IN (".$placeholder.")", $themes);
+  menu_rebuild();
 }
 
 /**
Index: commands/core/drupal/environment_6.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/core/drupal/environment_6.inc,v
retrieving revision 1.8
diff -u -r1.8 environment_6.inc
--- commands/core/drupal/environment_6.inc	17 Mar 2010 13:30:16 -0000	1.8
+++ commands/core/drupal/environment_6.inc	4 Apr 2010 09:47:22 -0000
@@ -148,21 +148,39 @@
 /**
  * Enable a list of themes.
  *
+ * This function is based on system_themes_form_submit().
+ *
+ * @see system_themes_form_submit()
  * @param $themes
  *  Array of theme names.
  */
 function drush_theme_enable($themes) {
+  drupal_clear_css_cache();
+  foreach ($themes as $theme) {
+    system_initialize_theme_blocks($theme);
+  }
   db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' AND name IN (".db_placeholders($themes, 'text').")", $themes);
+  list_themes(TRUE);
+  menu_rebuild();
+  module_invoke('locale', 'system_update', $themes);
 }
 
 /**
  * Disable a list of themes.
  *
+ * This function is based on system_themes_form_submit().
+ *
+ * @see system_themes_form_submit()
  * @param $themes
  *  Array of theme names.
  */
 function drush_theme_disable($themes) {
+  drupal_clear_css_cache();
   db_query("UPDATE {system} SET status = 0 WHERE type = 'theme' AND name IN (".db_placeholders($themes, 'text').")", $themes);
+  list_themes(TRUE);
+  menu_rebuild();
+  drupal_rebuild_theme_registry();
+  module_invoke('locale', 'system_update', $themes);
 }
 
 /**
