add debug menu in admin tools

This commit is contained in:
Uwe Steinmann 2023-02-12 14:34:31 +01:00
parent d07219a213
commit 73562364b0
2 changed files with 24 additions and 0 deletions

View File

@ -929,6 +929,18 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$menuitems['misc']['children']['version_info'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Info.php", 'label'=>getMLText('version_info'));
}
if ($settings->_enableDebugMode) {
if($accessobject->check_view_access(array('Hooks', 'NotificationServices'))) {
$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('NotificationServices'))
$menuitems['debug']['children']['notification_services'] = array('link'=>"../out/out.NotificationServices.php", 'label'=>getMLText('list_notification_services'));
if ($accessobject->check_view_access('ConversionServices'))
$menuitems['debug']['children']['conversion_services'] = array('link'=>"../out/out.ConversionServices.php", 'label'=>getMLText('list_conversion_services'));
}
}
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.

View File

@ -917,6 +917,18 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$menuitems['misc']['children']['version_info'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Info.php", 'label'=>getMLText('version_info'));
}
if ($settings->_enableDebugMode) {
if($accessobject->check_view_access(array('Hooks', 'NotificationServices'))) {
$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('NotificationServices'))
$menuitems['debug']['children']['notification_services'] = array('link'=>"../out/out.NotificationServices.php", 'label'=>getMLText('list_notification_services'));
if ($accessobject->check_view_access('ConversionServices'))
$menuitems['debug']['children']['conversion_services'] = array('link'=>"../out/out.ConversionServices.php", 'label'=>getMLText('list_conversion_services'));
}
}
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.