default value for maxentries_perpage

ldap_search not limited to 1000 any longer
This commit is contained in:
dechutes 2003-05-08 22:43:33 +00:00
parent 82f181fc7d
commit e79f4a6745
1 changed files with 6 additions and 3 deletions

View File

@ -60,8 +60,11 @@ $page = $_GET["page"];
if (!$page) if (!$page)
$page = 1; $page = 1;
// maximum count of user entries shown on one page // take maximum count of user entries shown on one page out of session
$max_pageentrys = $_SESSION["config"]->get_MaxListEntries(); if ($_SESSION["config"]->get_MaxListEntries() <= 0)
$max_pageentrys = 10; // default setting, if not yet set
else
$max_pageentrys = $_SESSION["config"]->get_MaxListEntries();
for ($i = 0; $i < sizeof($temp_array); $i++) { for ($i = 0; $i < sizeof($temp_array); $i++) {
@ -103,7 +106,7 @@ if ($_SESSION["userlist"] && !$_POST['refresh'] && !$_POST["apply_filter"]) {
$attrs = $attr_array; $attrs = $attr_array;
$sr = @ldap_search($_SESSION["ldap"]->server(), $sr = @ldap_search($_SESSION["ldap"]->server(),
$_SESSION["config"]->get_UserSuffix(), $_SESSION["config"]->get_UserSuffix(),
$filter, $attrs, 0, 1000); $filter, $attrs);
if ($sr) { if ($sr) {
$userinfo = ldap_get_entries ($_SESSION["ldap"]->server, $sr); $userinfo = ldap_get_entries ($_SESSION["ldap"]->server, $sr);
ldap_free_result ($sr); ldap_free_result ($sr);