Commit 89aef5b7 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#171019 by pwolanin: do not exclude the primary and secondary links from the menu block list

parent 13727009
......@@ -665,10 +665,12 @@ function menu_reset_item($item) {
* Implementation of hook_block().
*/
function menu_block($op = 'list', $delta = 0) {
$custom_menus = menu_get_menus(FALSE);
$menus = menu_get_menus();
// The Navigation menu is handled by the user module.
unset($menus['navigation']);
if ($op == 'list') {
$blocks = array();
foreach ($custom_menus as $name => $title) {
foreach ($menus as $name => $title) {
// Default "Navigation" block is handled by user.module.
$blocks[$name]['info'] = check_plain($title);
// Menu blocks can't be cached because each menu item can have
......@@ -678,7 +680,7 @@ function menu_block($op = 'list', $delta = 0) {
return $blocks;
}
else if ($op == 'view') {
$data['subject'] = check_plain($custom_menus[$delta]);
$data['subject'] = check_plain($menus[$delta]);
$data['content'] = menu_tree($delta);
return $data;
}
......
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