Commit 8a478d50 authored by Dries's avatar Dries

- Patch #87057 by chx and profix898: fixed problem with not being able to...

- Patch #87057 by chx and profix898: fixed problem with not being able to configure blocks per theme.
parent aa9d96f6
......@@ -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,
);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment