Index: modules/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system.module,v retrieving revision 1.239 diff -u -r1.239 system.module --- modules/system.module 9 Oct 2005 10:39:15 -0000 1.239 +++ modules/system.module 14 Oct 2005 20:54:24 -0000 @@ -773,6 +773,11 @@ if (is_array($values['status'])) { foreach ($values['status'] as $key => $choice) { if ($choice) { + // If theme status is being set to 1 from 0, initialize block data for this theme if necessary. + if (db_num_rows(db_query("SELECT status FROM {system} WHERE type = 'theme' AND name = '%s' AND status = 0", $key))) { + system_initialize_theme_blocks($key); + } + db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' and name = '%s'", $key); } }