From a5b2492e66bcf153155a68757691cb26ac3337dc Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 21 Apr 2010 08:48:54 +0000 Subject: [PATCH] Updated list for roles git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17769 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../roleManagement/class_roleGeneric.inc | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc b/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc index 5eeaa3150..70920c795 100644 --- a/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc +++ b/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc @@ -94,8 +94,8 @@ class roleGeneric extends plugin { $this->memberList->setEditable(false); $this->memberList->setWidth("100%"); $this->memberList->setHeight("300px"); - $this->memberList->setHeader(array("~",_("Name"),_("Uid"))); - $this->memberList->setColspecs(array('20px','*','*','20px')); + $this->memberList->setHeader(array('~',_("Given name"),_("Surename"),_("Uid"))); + $this->memberList->setColspecs(array('20px','*','*','*','20px')); $this->memberList->setDefaultSortColumn(1); } @@ -106,7 +106,7 @@ class roleGeneric extends plugin { function reload() { // Entries can't be added twice. - $attrs = array("description", "objectClass", "uid","cn"); + $attrs = array("description", "objectClass", "uid","cn",'sn','givenName'); $this->roleOccupant = array_unique($this->roleOccupant); $this->roleOccupant = array_values($this->roleOccupant); @@ -215,18 +215,16 @@ class roleGeneric extends plugin { $data[$key] = $dn; if(isset($this->roleOccCache[$dn])){ $icon = image('plugins/users/images/select_user.png'); - $entry = $this->roleOccCache[$dn]; - $name = $entry['cn']['0']; - $uid = $entry['uid']['0']; - if(isset($entry['description'][0])){ - $name .= " [".$entry['description'][0]."]"; - } + $entry = $this->roleOccCache[$dn]; + $sn = $entry['sn']['0']; + $givenName = $entry['givenName']['0']; + $uid = $entry['uid']['0']; }else{ - $name = _("Unknown")." ".$dn; - $uid = " "; + $sn = $givenName = _("Unknown"); + $uid = LDAP::fix($dn); $icon = image('images/false.png'); } - $lData[$key] = array('data' => array($icon, $name, $uid)); + $lData[$key] = array('data' => array($icon,$givenName,$sn, $uid)); } $this->memberList->setListData($data,$lData); -- 2.30.2