From 8a478d5068e96f7af4a00b0244a426a9aff9b77c Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 8 Oct 2006 06:34:12 +0000 Subject: - Patch #87057 by chx and profix898: fixed problem with not being able to configure blocks per theme. --- modules/block/block.module | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'modules') diff --git a/modules/block/block.module b/modules/block/block.module index 1f7079d38..0f2fb1e4e 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -88,16 +88,18 @@ function block_menu($may_cache) { 'callback' => 'drupal_get_form', 'callback arguments' => array('block_box_form'), 'type' => MENU_LOCAL_TASK); + $default = variable_get('theme_default', 'bluemarine'); foreach (list_themes() as $key => $theme) { if ($theme->status) { - if ($key == variable_get('theme_default', 'bluemarine')) { - $items[] = array('path' => 'admin/build/block/list/'. $key, 'title' => t('!key settings', array('!key' => $key)), - 'access' => user_access('administer blocks'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - } - else { - $items[] = array('path' => 'admin/build/block/list/'. $key, 'title' => t('!key settings', array('!key' => $key)), - 'access' => user_access('administer blocks'), 'type' => MENU_LOCAL_TASK); - } + $items[] = array( + 'path' => 'admin/build/block/list/'. $key, + 'title' => t('!key settings', array('!key' => $key)), + 'callback' => 'drupal_get_form', + 'callback arguments' => array('block_admin_display', $key), + 'access' => user_access('administer blocks'), + 'type' => $key== $default ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK, + 'weight' => $key == $default ? -10 : 0, + ); } } } -- cgit v1.2.3