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:
Eric Lippmann 2014-11-21 17:39:18 +01:00
parent d84318d8b8
commit eed10159fd
1 changed files with 2 additions and 15 deletions

View File

@ -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;
}