Made the LDAP storage aware of the query for get_list. Also, in the sql, set the total to the total records meeting the condition in get_list().

This commit is contained in:
skeeter 2001-11-16 04:11:38 +00:00
parent 23c0708751
commit 1e377b3007
2 changed files with 25 additions and 16 deletions

View File

@ -32,6 +32,7 @@
var $data;
var $user_context = '';
var $group_context = '';
var $total;
function accounts_()
{
@ -350,14 +351,17 @@
$test = @$allVals['uid'][0];
if (!$GLOBALS['phpgw_info']['server']['global_denied_users'][$test] && $allVals['uid'][0])
{
$accounts[] = Array(
'account_id' => $allVals['uidnumber'][0],
'account_lid' => $allVals['uid'][0],
'account_type' => $allVals['phpgwaccounttype'],
'account_firstname' => $allVals['givenname'][0],
'account_lastname' => $allVals['sn'][0],
'account_status' => $allVals['phpgwaccountstatus'][0]
);
if(!$query || strpos(' '.$allVals['cn'][0],$query) || strpos(' '.$allVals['givenname'][0],$query) || strpos(' '.$allVals['sn'][0],$query))
{
$accounts[] = Array(
'account_id' => $allVals['uidnumber'][0],
'account_lid' => $allVals['uid'][0],
'account_type' => $allVals['phpgwaccounttype'],
'account_firstname' => $allVals['givenname'][0],
'account_lastname' => $allVals['sn'][0],
'account_status' => $allVals['phpgwaccountstatus'][0]
);
}
}
}
}
@ -371,14 +375,17 @@
$test = $allVals['cn'][0];
if (!$GLOBALS['phpgw_info']['server']['global_denied_groups'][$test] && $allVals['cn'][0])
{
$accounts[] = Array(
'account_id' => $allVals['gidnumber'][0],
'account_lid' => $allVals['cn'][0],
'account_type' => $allVals['phpgwaccounttype'],
'account_firstname' => $allVals['givenname'][0],
'account_lastname' => $allVals['sn'][0],
'account_status' => $allVals['phpgwaccountstatus'][0]
);
if(!$query || strpos(' '.$allVals['cn'][0],$query) || strpos(' '.$allVals['givenname'][0],$query) || strpos(' '.$allVals['sn'][0],$query))
{
$accounts[] = Array(
'account_id' => $allVals['gidnumber'][0],
'account_lid' => $allVals['cn'][0],
'account_type' => $allVals['phpgwaccounttype'],
'account_firstname' => $allVals['givenname'][0],
'account_lastname' => $allVals['sn'][0],
'account_status' => $allVals['phpgwaccountstatus'][0]
);
}
}
}
}

View File

@ -29,6 +29,7 @@
var $db;
var $account_id;
var $data;
var $total;
function accounts_()
{
@ -149,6 +150,7 @@
'account_expires' => $this->db->f('account_expires')
);
}
$this->total = count($accounts);
return $accounts;
}