[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc class.accounts_shared.inc.php,1.48
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.accounts_shared.inc.php,1.48.2.2.2.6,1.48.2.2.2.7 |
Date: |
Sat, 03 May 2003 19:52:23 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv10789
Modified Files:
Tag: Version-0_9_16-branch
class.accounts_shared.inc.php
Log Message:
fixed sorting and limited display of accounts_popup
Index: class.accounts_shared.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.accounts_shared.inc.php,v
retrieving revision 1.48.2.2.2.6
retrieving revision 1.48.2.2.2.7
diff -C2 -r1.48.2.2.2.6 -r1.48.2.2.2.7
*** class.accounts_shared.inc.php 3 May 2003 22:48:17 -0000
1.48.2.2.2.6
--- class.accounts_shared.inc.php 3 May 2003 23:52:18 -0000
1.48.2.2.2.7
***************
*** 402,425 ****
{
//echo 'GROUP_ID: ' . $group_id;
- $entries =
$this->get_list('accounts',$start,$sort,$order,$GLOBALS['query']);
- $total = $this->total;
$users =
$GLOBALS['phpgw']->acl->get_ids_for_location($group_id,1,'phpgw_group');
//_debug_array($users);
! for ($i=0;$i<count($entries);$i++)
{
! if
(in_array($entries[$i]['account_id'],$users))
{
! $val_users[] = array
! (
! 'account_id'
=> $entries[$i]['account_id'],
! 'account_lid'
=> $entries[$i]['account_lid'],
!
'account_firstname' => $entries[$i]['account_firstname'],
!
'account_lastname' => $entries[$i]['account_lastname'],
! 'account_type'
=> $entries[$i]['account_type']
! );
}
}
}
$total = count($val_users);
--- 402,452 ----
{
//echo 'GROUP_ID: ' . $group_id;
$users =
$GLOBALS['phpgw']->acl->get_ids_for_location($group_id,1,'phpgw_group');
//_debug_array($users);
! for ($i=0;$i<count($users);$i++)
{
!
$GLOBALS['phpgw']->accounts->account_id = $users[$i];
!
$GLOBALS['phpgw']->accounts->read_repository();
!
! switch ($order)
{
! case
'account_firstname':
! $id =
$GLOBALS['phpgw']->accounts->data['firstname'];
! break;
! case 'account_lastname':
! $id =
$GLOBALS['phpgw']->accounts->data['lastname'];
! break;
! case 'account_lid':
! default:
! $id =
$GLOBALS['phpgw']->accounts->data['account_lid'];
! break;
}
+ $id .=
$GLOBALS['phpgw']->accounts->data['lastname']; // default sort-order
+ $id .=
$GLOBALS['phpgw']->accounts->data['firstname'];
+ $id .=
$GLOBALS['phpgw']->accounts->data['account_id']; // make our index unique
+
+ $val_users[$id] = array
+ (
+ 'account_id'
=> $GLOBALS['phpgw']->accounts->data['account_id'],
+ 'account_lid'
=> $GLOBALS['phpgw']->accounts->data['account_lid'],
+ 'account_firstname'
=> $GLOBALS['phpgw']->accounts->data['firstname'],
+ 'account_lastname'
=> $GLOBALS['phpgw']->accounts->data['lastname'],
+ 'account_type'
=> $GLOBALS['phpgw']->accounts->data['account_type']
+ );
}
+ if (count($users))
+ {
+ if ($sort != 'DESC')
+ {
+ ksort($val_users);
+ }
+ else
+ {
+ krsort($val_users);
+ }
+ }
+ $val_users = array_values($val_users);
// get a numeric index
}
$total = count($val_users);
***************
*** 469,474 ****
// ------------------------- end header declaration
--------------------------------
!
! for ($i=0;$i<count($val_users);$i++)
{
$GLOBALS['phpgw']->template->set_var('tr_color',$this->nextmatchs->alternate_row_color($tr_color));
--- 496,501 ----
// ------------------------- end header declaration
--------------------------------
! $stop = $start + $this->nextmatchs->maxmatches;
! for ($i=$start;$i<count($val_users)&&$i<$stop;$i++)
{
$GLOBALS['phpgw']->template->set_var('tr_color',$this->nextmatchs->alternate_row_color($tr_color));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc class.accounts_shared.inc.php,1.48.2.2.2.6,1.48.2.2.2.7,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: calendar/inc hook_settings.inc.php,1.1.2.2,1.1.2.3
- Next by Date:
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.33.2.2,1.71.2.33.2.3 class.socalendar_sql.inc.php,1.28.2.4.2.1,1.28.2.4.2.2
- Previous by thread:
[Phpgroupware-cvs] CVS: calendar/inc hook_settings.inc.php,1.1.2.2,1.1.2.3
- Next by thread:
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.33.2.2,1.71.2.33.2.3 class.socalendar_sql.inc.php,1.28.2.4.2.1,1.28.2.4.2.2
- Index(es):