* finish task #2671.

This commit is contained in:
wangyidong
2016-10-25 15:52:23 +08:00
parent 101ec01ae8
commit 000addf392
5 changed files with 67 additions and 2 deletions
+11 -1
View File
@@ -190,6 +190,12 @@ class customModel extends model
}
}
/* Merge fileMenu and customMenu. */
foreach($customMenuMap as $name => $item)
{
if(!isset($allMenu->$name))$allMenu->$name = $item;
}
foreach($allMenu as $name => $item)
{
$label = '';
@@ -198,7 +204,11 @@ class customModel extends model
$float = '';
$fixed = '';
$link = is_array($item) ? $item['link'] : $item;
$link = (is_array($item) and isset($item['link'])) ? $item['link'] : $item;
$link = (is_object($item) and isset($item->link)) ? $item->link : $link;
/* The variable of item has not link and is not link then ignore it. */
if(!is_string($link)) continue;
$label = $link;
$hasPriv = true;
if(strpos($link, '|') !== false)