* Fix bug#15363

This commit is contained in:
zenggang
2021-09-30 16:17:48 +08:00
parent cc28a1a037
commit 189bc062b3
+17
View File
@@ -674,6 +674,23 @@ class commonModel extends model
}
}
/* Check whether other methods under the module have permissions. If yes, point to other methods. */
if($display == false and isset($lang->$currentModule->menu))
{
foreach($lang->$currentModule->menu as $menu)
{
$linkPart = explode('|', $menu['link']);
if(isset($linkPart[2])) $method = $linkPart[2];
else continue;
if(common::hasPriv($currentModule, $method))
{
$display = true;
$currentMethod = $method;
if(!isset($menu['target'])) break; // Try to jump to the method without opening a new window.
}
}
}
if(!$display) continue;
/* Assign vars. */