Menu: Don't render sub menus when a dot appears in the label
I guess this was intended to be a feature. Turns out to be a bug though :) fixes #7772
This commit is contained in:
parent
d84318d8b8
commit
eed10159fd
|
@ -437,21 +437,8 @@ class Menu implements RecursiveIterator
|
|||
*/
|
||||
public function addSubMenu($id, ConfigObject $menuConfig = null)
|
||||
{
|
||||
if (false === ($pos = strpos($id, '.'))) {
|
||||
$subMenu = new static($id, $menuConfig, $this);
|
||||
$this->subMenus[$id] = $subMenu;
|
||||
} else {
|
||||
list($parentId, $id) = explode('.', $id, 2);
|
||||
|
||||
if ($this->hasSubMenu($parentId)) {
|
||||
$parent = $this->getSubMenu($parentId);
|
||||
} else {
|
||||
$parent = $this->addSubMenu($parentId);
|
||||
}
|
||||
|
||||
$subMenu = $parent->addSubMenu($id, $menuConfig);
|
||||
}
|
||||
|
||||
$subMenu = new static($id, $menuConfig, $this);
|
||||
$this->subMenus[$id] = $subMenu;
|
||||
return $subMenu;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue