mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
do not show debug menu if all items are inaccessible
This commit is contained in:
parent
983af33300
commit
1ae35ca6ad
|
@ -1019,9 +1019,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
}
|
||||
|
||||
if ($settings->_enableDebugMode) {
|
||||
$menuitems['debug'] = array('link'=>"#", 'label'=>getMLText('debug'));
|
||||
if ($accessobject->check_view_access('Hooks'))
|
||||
$menuitems['debug']['children']['hooks'] = array('link'=>"../out/out.Hooks.php", 'label'=>getMLText('list_hooks'));
|
||||
if($accessobject->check_view_access(array('Hooks'))) {
|
||||
$menuitems['debug'] = array('link'=>"#", 'label'=>getMLText('debug'));
|
||||
if ($accessobject->check_view_access('Hooks'))
|
||||
$menuitems['debug']['children']['hooks'] = array('link'=>"../out/out.Hooks.php", 'label'=>getMLText('list_hooks'));
|
||||
}
|
||||
}
|
||||
|
||||
/* Check if hook exists because otherwise callHook() will override $menuitems */
|
||||
|
|
|
@ -927,9 +927,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
}
|
||||
|
||||
if ($settings->_enableDebugMode) {
|
||||
$menuitems['debug'] = array('link'=>"#", 'label'=>getMLText('debug'));
|
||||
if ($accessobject->check_view_access('Hooks'))
|
||||
$menuitems['debug']['children']['hooks'] = array('link'=>"../out/out.Hooks.php", 'label'=>getMLText('list_hooks'));
|
||||
if($accessobject->check_view_access(array('Hooks'))) {
|
||||
$menuitems['debug'] = array('link'=>"#", 'label'=>getMLText('debug'));
|
||||
if ($accessobject->check_view_access('Hooks'))
|
||||
$menuitems['debug']['children']['hooks'] = array('link'=>"../out/out.Hooks.php", 'label'=>getMLText('list_hooks'));
|
||||
}
|
||||
}
|
||||
|
||||
/* Check if hook exists because otherwise callHook() will override $menuitems */
|
||||
|
|
Loading…
Reference in New Issue
Block a user