forked from extern/egroupware
put current_user code in its own functions
This commit is contained in:
parent
bfe1e5b04a
commit
48c4bfdc9b
@ -291,13 +291,10 @@ class egw_framework
|
|||||||
{
|
{
|
||||||
$var['current_app_title']=$apps[$GLOBALS['egw_info']['flags']['currentapp']]['title'];
|
$var['current_app_title']=$apps[$GLOBALS['egw_info']['flags']['currentapp']]['title'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// current users for admins
|
// current users for admins
|
||||||
if(isset($apps['admin']) && $GLOBALS['egw_info']['user']['preferences']['common']['show_currentusers'])
|
$var['current_users'] = $this->_current_users();
|
||||||
{
|
|
||||||
$var['current_users'] = '<a href="'
|
|
||||||
. $GLOBALS['egw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">'
|
|
||||||
. lang('Current users') . ': ' . $GLOBALS['egw']->session->total() . '</a>';
|
|
||||||
}
|
|
||||||
// quick add selectbox
|
// quick add selectbox
|
||||||
$var['quick_add'] = $this->_get_quick_add();
|
$var['quick_add'] = $this->_get_quick_add();
|
||||||
|
|
||||||
@ -355,6 +352,15 @@ class egw_framework
|
|||||||
return $user_info;
|
return $user_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _current_users()
|
||||||
|
{
|
||||||
|
if( $GLOBALS['egw_info']['user']['apps']['admin'] && $GLOBALS['egw_info']['user']['preferences']['common']['show_currentusers'])
|
||||||
|
{
|
||||||
|
$current_users = '<a href="' . $GLOBALS['egw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">' . lang('Current users') . ': ' . $GLOBALS['egw']->session->total() . '</a>';
|
||||||
|
return $current_users;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare the quick add selectbox
|
* Prepare the quick add selectbox
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user