Index: modules/block/block.module =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.module,v retrieving revision 1.366 diff -u -p -r1.366 block.module --- modules/block/block.module 24 Aug 2009 00:14:19 -0000 1.366 +++ modules/block/block.module 24 Aug 2009 12:30:52 -0000 @@ -179,11 +179,10 @@ function block_menu() { } /** - * Menu item access callback - only admin or enabled themes can be accessed. + * Menu item access callback - only enabled themes can be accessed. */ function _block_themes_access($theme) { - $admin_theme = variable_get('admin_theme'); - return user_access('administer blocks') && ($theme->status || ($admin_theme && ($theme->name == $admin_theme))); + return user_access('administer blocks') && $theme->status; } /** Index: modules/block/block.test =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.test,v retrieving revision 1.25 diff -u -p -r1.25 block.test --- modules/block/block.test 3 Aug 2009 03:04:33 -0000 1.25 +++ modules/block/block.test 24 Aug 2009 12:30:52 -0000 @@ -268,33 +268,27 @@ class NewDefaultThemeBlocks extends Drup } /** - * Test the block system with admin themes. + * Test the block system with disabled themes. */ -class BlockAdminThemeTestCase extends DrupalWebTestCase { +class DisabledBlockAdmin extends DrupalWebTestCase { public static function getInfo() { return array( - 'name' => 'Admin theme block admin accessibility', - 'description' => "Check whether the block administer page for a disabled theme acccessible if and only if it's the admin theme.", + 'name' => 'Disabled theme admin', + 'description' => "Check the administer page for disabled theme.", 'group' => 'Block', ); } - + /** - * Check for the accessibility of the admin theme on the block admin page. + * Check the block admin page accessibility for a disabled theme. */ - function testAdminTheme() { + function testDisabledBlockAdmin() { // Create administrative user. $admin_user = $this->drupalCreateUser(array('administer blocks', 'administer site configuration')); $this->drupalLogin($admin_user); // Ensure that access to block admin page is denied when theme is disabled. $this->drupalGet('admin/structure/block/list/stark'); - $this->assertResponse(403, t('The block admin page for a disabled theme can not be accessed')); - - // Enable admin theme and confirm that tab is accessible. - $edit['admin_theme'] = 'stark'; - $this->drupalPost('admin/appearance', $edit, t('Save configuration')); - $this->drupalGet('admin/structure/block/list/stark'); - $this->assertResponse(200, t('The block admin page for the admin theme can be accessed')); + $this->assertResponse(403, t('The block admin page for a disabled theme can not be accessed.')); } } Index: modules/system/system.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v retrieving revision 1.191 diff -u -p -r1.191 system.admin.inc --- modules/system/system.admin.inc 24 Aug 2009 00:14:22 -0000 1.191 +++ modules/system/system.admin.inc 24 Aug 2009 12:32:11 -0000 @@ -232,7 +232,7 @@ function system_themes_form() { ); $options[$theme->name] = $theme->info['name']; - if (!empty($theme->status) || $theme->name == variable_get('admin_theme', 0)) { + if (!empty($theme->status)) { $form[$theme->name]['operations'] = array('#markup' => l(t('configure'), 'admin/appearance/settings/' . $theme->name) ); } else { @@ -317,8 +317,9 @@ function system_themes_form_submit($form if ($form_state['values']['op'] == t('Save configuration')) { if (is_array($form_state['values']['status'])) { foreach ($form_state['values']['status'] as $key => $choice) { - // Always enable the default theme, despite its status checkbox being checked: - if ($choice || $form_state['values']['theme_default'] == $key) { + // Always enable the default theme and the admin theme, despite its + // status checkbox being checked. + if ($choice || ($form_state['values']['theme_default'] == $key) || ($form_state['values']['admin_theme'] == $key)) { $new_theme_list[] = $key; db_update('system') ->fields(array('status' => 1)) Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.766 diff -u -p -r1.766 system.module --- modules/system/system.module 24 Aug 2009 00:14:22 -0000 1.766 +++ modules/system/system.module 24 Aug 2009 12:30:52 -0000 @@ -1301,10 +1301,10 @@ function blocked_ip_load($iid) { } /** - * Menu item access callback - only admin or enabled themes can be accessed. + * Menu item access callback - only enabled themes can be accessed. */ function _system_themes_access($theme) { - return user_access('administer site configuration') && ($theme->status || $theme->name == variable_get('admin_theme', 0)); + return user_access('administer site configuration') && $theme->status; } /**