changed default attributes to show in lists, better error handling for list settings

This commit is contained in:
Roland Gruber 2003-10-06 15:59:49 +00:00
parent 87eed44285
commit 01893985c3
5 changed files with 17 additions and 9 deletions

View File

@ -43,7 +43,7 @@ maxMachine: 35000
# entries can either be predefined values (e.g. '#cn' or '#uid')
# or individual ones (e.g. 'uid:User ID' or 'host:Host Name')
# values have to be seperated by semicolons
userlistAttributes: #uid;#cn;#uidNumber;#gidNumber
userlistAttributes: #uid;#givenName;#sn;#uidNumber;#gidNumber
# list of attributes to show in group list
# entries can either be predefined values (e.g. '#cn' or '#gidNumber')
@ -55,7 +55,7 @@ grouplistAttributes: #cn;#gidNumber;#memberUID;#description
# entries can either be predefined values (e.g. '#cn' or '#uid')
# or individual ones (e.g. 'cn:Host Name')
# values have to be seperated by semicolons
hostlistAttributes: #cn;#rid;#description;gidNumber:GID
hostlistAttributes: #cn;#description;#uidNumber;#gidNumber
# maximum number of rows to show in user/group/host lists
maxlistentries: 30

View File

@ -157,7 +157,9 @@ class Ldap{
"uid" => _("Host username"),
"cn" => _("Host name"),
"rid" => _("RID (Windows UID)"),
"description" => _("Host description")
"description" => _("Host description"),
"uidnumber" => _("UID number"),
"gidnumber" => _("GID number")
);
return true;
}

View File

@ -86,13 +86,15 @@ for ($i = 0; $i < sizeof($temp_array); $i++) {
if (substr($temp_array[$i],0,1) == "#") {
$attr = strtolower(substr($temp_array[$i],1));
$attr_array[$i] = $attr;
$desc_array[] = strtoupper($hash_table[$attr]);
if ($hash_table[$attr]) $desc_array[] = strtoupper($hash_table[$attr]);
else $desc_array[] = strtoupper($attr);
}
// if not predefined, the attribute is seperated by a ":" from description
else {
$attr = explode(":", $temp_array[$i]);
$attr_array[$i] = $attr[0];
$desc_array[$i] = strtoupper($attr[1]);
if ($attr[1]) $desc_array[$i] = strtoupper($attr[1]);
else $desc_array[$i] = strtoupper($attr[0]);
}
}

View File

@ -86,13 +86,15 @@ for ($i = 0; $i < sizeof($temp_array); $i++) {
if (substr($temp_array[$i],0,1) == "#") {
$attr = strtolower(substr($temp_array[$i],1));
$attr_array[$i] = $attr;
$desc_array[] = strtoupper($hash_table[$attr]);
if ($hash_table[$attr]) $desc_array[] = strtoupper($hash_table[$attr]);
else $desc_array[] = strtoupper($attr);
}
// if not predefined, the attribute is seperated by a ":" from description
else {
$attr = explode(":", $temp_array[$i]);
$attr_array[$i] = $attr[0];
$desc_array[$i] = strtoupper($attr[1]);
if ($attr[1]) $desc_array[$i] = strtoupper($attr[1]);
else $desc_array[$i] = strtoupper($attr[0]);
}
}

View File

@ -131,13 +131,15 @@ for ($i = 0; $i < sizeof($temp_array); $i++) {
if (substr($temp_array[$i],0,1) == "#") {
$attr = strtolower(substr($temp_array[$i],1));
$attr_array[$i] = $attr;
$desc_array[] = strtoupper($hash_table[$attr]);
if ($hash_table[$attr]) $desc_array[] = strtoupper($hash_table[$attr]);
else $desc_array[] = strtoupper($attr);
}
// if not predefined, the attribute is seperated by a ":" from description
else {
$attr = explode(":", $temp_array[$i]);
$attr_array[$i] = $attr[0];
$desc_array[$i] = strtoupper($attr[1]);
if ($attr[1]) $desc_array[$i] = strtoupper($attr[1]);
else $desc_array[$i] = strtoupper($attr[0]);
}
}