mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
Add optional third return for filterobj
This commit is contained in:
parent
a6353b0189
commit
ebd58d40af
@ -80,7 +80,7 @@
|
||||
@param $filter_obj ?
|
||||
@param $showsearch ?
|
||||
*/
|
||||
function show_tpl($sn,$start,$total,$extra, $twidth, $bgtheme,$search_obj=0,$filter_obj=1,$showsearch=1)
|
||||
function show_tpl($sn,$start,$total,$extra, $twidth, $bgtheme,$search_obj=0,$filter_obj=1,$showsearch=1,$yours=0)
|
||||
{
|
||||
global $filter, $qfield, $start, $order, $sort, $query, $phpgw, $phpgw_info;
|
||||
$tpl = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||
@ -107,7 +107,7 @@
|
||||
|
||||
if ($filter_obj)
|
||||
{
|
||||
$tpl->set_var('filter',$this->filter($filter_obj));
|
||||
$tpl->set_var('filter',$this->filter($filter_obj,$yours));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -295,7 +295,7 @@
|
||||
@abstract ?
|
||||
@param $filter_obj
|
||||
*/
|
||||
function filter($filter_obj)
|
||||
function filter($filter_obj,$yours=0)
|
||||
{
|
||||
global $filter, $phpgw, $phpgw_info;
|
||||
$tpl = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||
@ -310,8 +310,17 @@
|
||||
// $user_groups = $phpgw->accounts->memberships($phpgw_info['user']['account_id']);
|
||||
$indexlimit = count($user_groups);
|
||||
|
||||
if ($yours)
|
||||
{
|
||||
$filter_obj = array(array('none',lang('Show all')),
|
||||
array('private',lang('Only yours')));
|
||||
array('yours',lang('Only yours')),
|
||||
array('private',lang('private')));
|
||||
}
|
||||
else
|
||||
{
|
||||
$filter_obj = array(array('none',lang('Show all')),
|
||||
array('private',lang('private')));
|
||||
}
|
||||
for ($index=0; $index<$indexlimit; $index++)
|
||||
{
|
||||
$filter_obj[2+$index][0] = $user_groups[$index]['account_id'];
|
||||
|
Loading…
Reference in New Issue
Block a user