forked from extern/egroupware
Working on nextmatchs for LDAP
This commit is contained in:
parent
e35f536961
commit
f888b16943
@ -17,8 +17,8 @@
|
|||||||
. $phpgw_info["server"]["auth_type"] . ".inc.php");
|
. $phpgw_info["server"]["auth_type"] . ".inc.php");
|
||||||
|
|
||||||
$phpgw->template->set_file(array("header" => "accounts.tpl",
|
$phpgw->template->set_file(array("header" => "accounts.tpl",
|
||||||
"row" => "accounts.tpl",
|
"row" => "accounts.tpl",
|
||||||
"footer" => "accounts.tpl"));
|
"footer" => "accounts.tpl"));
|
||||||
|
|
||||||
$phpgw->template->set_block("header","row","footer");
|
$phpgw->template->set_block("header","row","footer");
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
return $account_info;
|
return $account_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
function account_read($method,$start,$sort,$order)
|
function account_read($method,$start = 0,$sort,$order)
|
||||||
{
|
{
|
||||||
global $phpgw_info, $ldap;
|
global $phpgw_info, $ldap;
|
||||||
|
|
||||||
@ -92,7 +92,28 @@
|
|||||||
$sr = ldap_search($ldap,$phpgw_info["server"]["ldap_context"],$filter,array("sn","givenname","uid","uidnumber"));
|
$sr = ldap_search($ldap,$phpgw_info["server"]["ldap_context"],$filter,array("sn","givenname","uid","uidnumber"));
|
||||||
$info = ldap_get_entries($ldap, $sr);
|
$info = ldap_get_entries($ldap, $sr);
|
||||||
|
|
||||||
for ($i=0; $i<$info["count"]; $i++) {
|
$nummsg = $start;
|
||||||
|
|
||||||
|
if ($nummsg < $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]) {
|
||||||
|
$totaltodisplay = $nummsg;
|
||||||
|
} else if (($nummsg - $start) > $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]) {
|
||||||
|
$totaltodisplay = $start + $phpgw_info["user"]["preferences"]["common"]["maxmatchs"];
|
||||||
|
} else {
|
||||||
|
$totaltodisplay = $nummsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
for ($i=$start, $j=0; $i<$totaltodisplay; $i++,$j++) {
|
||||||
|
if (! $phpgw_info["server"]["global_denied_users"][$info[$j]["uid"][0]]) {
|
||||||
|
$account_info[$j]["account_id"] = rawurlencode($info[$j]["dn"]);
|
||||||
|
$account_info[$j]["account_lid"] = $info[$j]["uid"][0];
|
||||||
|
$account_info[$j]["account_lastname"] = $info[$j]["givenname"][0];
|
||||||
|
$account_info[$j]["account_firstname"] = $info[$j]["sn"][0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
for ($i=0, $j=0; $i<count($info); $i++,$j++) {
|
||||||
if (! $phpgw_info["server"]["global_denied_users"][$info[$i]["uid"][0]]) {
|
if (! $phpgw_info["server"]["global_denied_users"][$info[$i]["uid"][0]]) {
|
||||||
$account_info[$i]["account_id"] = rawurlencode($info[$i]["dn"]);
|
$account_info[$i]["account_id"] = rawurlencode($info[$i]["dn"]);
|
||||||
$account_info[$i]["account_lid"] = $info[$i]["uid"][0];
|
$account_info[$i]["account_lid"] = $info[$i]["uid"][0];
|
||||||
@ -101,6 +122,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// echo " - order: $order";
|
// echo " - order: $order";
|
||||||
/* if ($order == "ASC") {
|
/* if ($order == "ASC") {
|
||||||
sort($account_info[$sort]);
|
sort($account_info[$sort]);
|
||||||
|
Loading…
Reference in New Issue
Block a user