From 66a9cfb2defbcf4411e46e4e62cb750a0585fb92 Mon Sep 17 00:00:00 2001 From: skeeter Date: Tue, 11 Sep 2001 03:09:18 +0000 Subject: [PATCH] Possible speed-ups when dispalying the edit form. --- calendar/inc/class.uicalendar.inc.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/calendar/inc/class.uicalendar.inc.php b/calendar/inc/class.uicalendar.inc.php index 6bb3e6a2c6..74bc0e4cbe 100755 --- a/calendar/inc/class.uicalendar.inc.php +++ b/calendar/inc/class.uicalendar.inc.php @@ -2914,11 +2914,11 @@ $str = ''; @asort($users); @reset($users); - while (list($id,$name) = each($users)) + while (list($id,$user_array) = each($users)) { - if(intval($id) != intval($this->bo->owner)) + if($id != intval($this->bo->owner)) { - $str .= ' '."\n"; + $str .= ' '."\n"; } } $var[] = Array( @@ -3049,19 +3049,23 @@ @reset($accounts); while(list($index,$id) = each($accounts)) { - if(intval($id) == $owner) + $i_id = intval($id); + if($i_id == $owner) { continue; } - elseif(!isset($users[intval($id)])) + elseif(!isset($users[$i_id])) { - if($GLOBALS['phpgw']->accounts->exists(intval($id)) == True) + if($GLOBALS['phpgw']->accounts->exists($i_id) == True) { - $users[intval($id)] = $GLOBALS['phpgw']->common->grab_owner_name(intval($id)); + $users[$i_id] = Array( + 'name' => $GLOBALS['phpgw']->common->grab_owner_name($i_id), + 'type' => $GLOBALS['phpgw']->accounts->get_type($i_id) + ); } - if($GLOBALS['phpgw']->accounts->get_type(intval($id)) == 'g') + if($GLOBALS['phpgw']->accounts->get_type($i_id) == 'g') { - $this->build_part_list($users,$GLOBALS['phpgw']->acl->get_ids_for_location(intval($id),1,'phpgw_group'),$owner); + $this->build_part_list($users,$GLOBALS['phpgw']->acl->get_ids_for_location($i_id,1,'phpgw_group'),$owner); } } }