mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Fix for breadcrumb title with menu aliases.
This commit is contained in:
@@ -1879,14 +1879,43 @@ class e_admin_controller
|
|||||||
$_dispatcher = $this->getDispatcher();
|
$_dispatcher = $this->getDispatcher();
|
||||||
$data = $_dispatcher->getPageTitles();
|
$data = $_dispatcher->getPageTitles();
|
||||||
$search = $this->getMode().'/'.$this->getAction();
|
$search = $this->getMode().'/'.$this->getAction();
|
||||||
if(isset($data[$search])) $res['caption'] = $data[$search];
|
|
||||||
|
if(isset($data[$search]))
|
||||||
|
{
|
||||||
|
$res['caption'] = $data[$search];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$data = $_dispatcher->getMenuData();
|
$data = $_dispatcher->getMenuData();
|
||||||
if(isset($data[$search])) $res = $data[$search];
|
|
||||||
else return $this;
|
if(isset($data[$search]))
|
||||||
|
{
|
||||||
|
$res = $data[$search];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// check for an alias match.
|
||||||
|
$d = $_dispatcher->getMenuAliases();
|
||||||
|
if(isset($d[$search]))
|
||||||
|
{
|
||||||
|
$search = $d[$search];
|
||||||
|
$res = $data[$search];
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
// var_dump($d);
|
||||||
|
// var_dump("Couldnt find: ".$search);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$title = $res['caption'];
|
$title = $res['caption'];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// echo "<h3>".__METHOD__." - ".$title."</h3>";
|
// echo "<h3>".__METHOD__." - ".$title."</h3>";
|
||||||
|
Reference in New Issue
Block a user