Permalink
Browse files

[kernel:module] fix #111, support Array style adminmenu

  • Loading branch information...
nao-pon committed Apr 21, 2015
1 parent 7326033 commit 5de07bfb4d85be32f4a3011b33443e4e9dd62e46
Showing with 8 additions and 3 deletions.
  1. +8 −3 html/kernel/module.php
View
@@ -174,9 +174,14 @@ function &subLink()
function loadAdminMenu()
{
$menu = $this->getInfo('adminmenu');
if ($menu && file_exists($path = XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/'.$menu)) {
include $path;
$this->adminmenu =& $adminmenu;
if (is_array($menu)) {
// Array() Cube style
$this->adminmenu = $menu;
} else {
if ($menu && file_exists($path = XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/'.$menu)) {
include $path;
$this->adminmenu = (isset($adminmenu) && is_array($adminmenu))? $adminmenu : array();
}
}
}

0 comments on commit 5de07bf

Please sign in to comment.