Icons don't show when Source menu item is a third level item

matteogeco - July 28, 2009 - 11:30
Project:Control Panel
Version:6.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi, I have e three level menu, like:

- A
-- B
--- C
--- D

I created a control panel block, chose "B" as Source menu item and when I view the block, the block is empty.
Trying to debug the code I found that at line there is 122:

<?php
     
if (is_array($below) && (count($panel_menu['below']) > 0)) return $below;
?>

but $panel_menu is undefined. I tried to substitute $panel_menu['below'] with $below, like this:

<?php
     
if (is_array($below) && (count($below) > 0)) return $below;
?>

And it seems to work, I provide a patch. Is it a correct solution?

AttachmentSize
controlpanel_three_level_menu.patch521 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.