mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-15 18:38:57 +01:00
php5 erroring on call to private function add() - moved to class function list_cals_add()
This commit is contained in:
parent
2f32ca43b2
commit
9cff33854d
@ -2886,14 +2886,8 @@
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/* This is called only by list_cals(). It was moved here to remove fatal error in php5 beta4 */
|
||||||
@function list_cals
|
function list_cals_add($id,&$users,&$groups)
|
||||||
@abstract generate list of user- / group-calendars for the selectbox in the header
|
|
||||||
@returns alphabeticaly sorted array with groups first and then users
|
|
||||||
*/
|
|
||||||
function list_cals()
|
|
||||||
{
|
|
||||||
function add($id,&$users,&$groups)
|
|
||||||
{
|
{
|
||||||
$name = $GLOBALS['phpgw']->common->grab_owner_name($id);
|
$name = $GLOBALS['phpgw']->common->grab_owner_name($id);
|
||||||
if (($type = $GLOBALS['phpgw']->accounts->get_type($id)) == 'g')
|
if (($type = $GLOBALS['phpgw']->accounts->get_type($id)) == 'g')
|
||||||
@ -2910,22 +2904,30 @@
|
|||||||
'name' => $name
|
'name' => $name
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
@function list_cals
|
||||||
|
@abstract generate list of user- / group-calendars for the selectbox in the header
|
||||||
|
@returns alphabeticaly sorted array with groups first and then users
|
||||||
|
*/
|
||||||
|
function list_cals()
|
||||||
|
{
|
||||||
$users = $groups = array();
|
$users = $groups = array();
|
||||||
foreach($this->grants as $id => $rights)
|
foreach($this->grants as $id => $rights)
|
||||||
{
|
{
|
||||||
add($id,$users,$groups);
|
$this->list_cals_add($id,$users,$groups);
|
||||||
}
|
}
|
||||||
if ($memberships = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']))
|
if ($memberships = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']))
|
||||||
{
|
{
|
||||||
foreach($memberships as $group_info)
|
foreach($memberships as $group_info)
|
||||||
{
|
{
|
||||||
add($group_info['account_id'],$users,$groups);
|
$this->list_cals_add($group_info['account_id'],$users,$groups);
|
||||||
|
|
||||||
if ($account_perms = $GLOBALS['phpgw']->acl->get_ids_for_location($group_info['account_id'],PHPGW_ACL_READ,'calendar'))
|
if ($account_perms = $GLOBALS['phpgw']->acl->get_ids_for_location($group_info['account_id'],PHPGW_ACL_READ,'calendar'))
|
||||||
{
|
{
|
||||||
foreach($account_perms as $id)
|
foreach($account_perms as $id)
|
||||||
{
|
{
|
||||||
add($id,$users,$groups);
|
$this->list_cals_add($id,$users,$groups);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user