diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-10-08 06:34:12 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-10-08 06:34:12 +0000 |
commit | 8a478d5068e96f7af4a00b0244a426a9aff9b77c (patch) | |
tree | 5b0f6fd66b3e4b261a3c70df8d94f58fa19d9b14 | |
parent | aa9d96f66129cd8acb70f04f983ad3d52be11ffa (diff) | |
download | brdo-8a478d5068e96f7af4a00b0244a426a9aff9b77c.tar.gz brdo-8a478d5068e96f7af4a00b0244a426a9aff9b77c.tar.bz2 |
- Patch #87057 by chx and profix898: fixed problem with not being able to configure blocks per theme.
-rw-r--r-- | modules/block/block.module | 18 |
1 files changed, 10 insertions, 8 deletions
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, + ); } } } |