mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
only show apps available to user
This commit is contained in:
parent
23c0285825
commit
5391fd1674
@ -155,14 +155,14 @@ class preferences_settings
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sel_options = $readonlys = null;
|
$sel_options = $readonlys = null;
|
||||||
$content = $this->get_content($appname, $type, $sel_options, $readonlys, $preserve['types'], $tpl);
|
$data = $this->get_content($appname, $type, $sel_options, $readonlys, $preserve['types'], $tpl);
|
||||||
$preserve['appname'] = $preserve['old_appname'] = $content['appname'];
|
$preserve['appname'] = $preserve['old_appname'] = $data['appname'];
|
||||||
$preserve['type'] = $preserve['old_type'] = $content['type'];
|
$preserve['type'] = $preserve['old_type'] = $data['type'];
|
||||||
if (isset($old_tab)) $content['tabs'] = $old_tab;
|
if (isset($old_tab)) $data['tabs'] = $old_tab;
|
||||||
|
|
||||||
if ($msg) egw_framework::message($msg, $msg_type ? $msg_type : 'error');
|
if ($msg) egw_framework::message($msg, $msg_type ? $msg_type : 'error');
|
||||||
|
|
||||||
$tpl->exec('preferences.preferences_settings.index', $content, $sel_options, $readonlys, $preserve, 2);
|
$tpl->exec('preferences.preferences_settings.index', $data, $sel_options, $readonlys, $preserve, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -455,7 +455,7 @@ class preferences_settings
|
|||||||
$sel_options['appname'] = array();
|
$sel_options['appname'] = array();
|
||||||
foreach($GLOBALS['egw']->hooks->hook_implemented('settings') as $app)
|
foreach($GLOBALS['egw']->hooks->hook_implemented('settings') as $app)
|
||||||
{
|
{
|
||||||
if ($app != 'preferences' && $GLOBALS['egw_info']['apps'][$app])
|
if ($app != 'preferences' && $GLOBALS['egw_info']['user']['apps'][$app])
|
||||||
{
|
{
|
||||||
$sel_options['appname'][$app] = $GLOBALS['egw_info']['apps'][$app]['title'];
|
$sel_options['appname'][$app] = $GLOBALS['egw_info']['apps'][$app]['title'];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user