From: hickert Date: Fri, 2 Dec 2005 06:20:15 +0000 (+0000) Subject: Fixed missing description error X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=07853ec87fb4aba06800bf95b5716bdb0138c629;p=gosa.git Fixed missing description error git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2193 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc index 6b70a3a57..86e5891fd 100644 --- a/plugins/admin/applications/class_applicationManagement.inc +++ b/plugins/admin/applications/class_applicationManagement.inc @@ -450,8 +450,6 @@ class applicationManagement extends plugin $res3 = get_list2($this->ui->subtreeACL, "(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))", TRUE, $base2, array("ou", "description"), TRUE); - - $this->departments= array(); $tmp = array(); foreach ($res3 as $value){ @@ -459,10 +457,10 @@ class applicationManagement extends plugin } ksort($tmp); foreach($tmp as $value){ - if($value["description"][0]!=".."){ + if(isset($value["description"][0])){ $this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]"; }else{ - $this->departments[$value['dn']]=$value["description"][0]; + $this->departments[$value['dn']]=convert_department_dn2($value['dn']);//$value["description"][0]; } } diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc index b062cd147..0575c45fe 100644 --- a/plugins/admin/departments/class_departmentManagement.inc +++ b/plugins/admin/departments/class_departmentManagement.inc @@ -409,10 +409,10 @@ class departmentManagement extends plugin $this->departments= array(); foreach ($res as $value){ - if($value["description"][0]!=".."){ + if(isset($value["description"][0])){ $this->departments[$value['dn']]= convert_department_dn2($value['dn'])." - [".$value["description"][0]."]"; }else{ - $this->departments[$value['dn']]=$value["description"][0]; + $this->departments[$value['dn']]= convert_department_dn2($value['dn']);//$value["description"][0]; } } natcasesort ($this->departments); diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc index 5ec39d073..1542bf1d0 100644 --- a/plugins/admin/fai/class_faiManagement.inc +++ b/plugins/admin/fai/class_faiManagement.inc @@ -646,10 +646,10 @@ class faiManagement extends plugin } ksort($tmp); foreach($tmp as $value){ - if($value["description"][0]!=".."){ + if(isset($value["description"][0])){ $this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]"; }else{ - $this->departments[$value['dn']]=$value["description"][0]; + $this->departments[$value['dn']]=convert_department_dn2($value['dn']);//$value["description"][0]; } } diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc index 78d37b445..49cb8bf98 100644 --- a/plugins/admin/groups/class_groupManagement.inc +++ b/plugins/admin/groups/class_groupManagement.inc @@ -521,6 +521,13 @@ class groupManagement extends plugin } } + + + + + + + /* * We also need to search for the departments * So we are able to navigate like in konquerer @@ -537,10 +544,10 @@ class groupManagement extends plugin } ksort($tmp); foreach($tmp as $value){ - if($value["description"][0]!=".."){ + if(isset($value["description"][0])){ $this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]"; }else{ - $this->departments[$value['dn']]=$value["description"][0]; + $this->departments[$value['dn']]= convert_department_dn2($value['dn']);//$value["description"][0]; } } } diff --git a/plugins/admin/ogroups/class_ogroupManagement.inc b/plugins/admin/ogroups/class_ogroupManagement.inc index c90fa8ee7..1f33b87d3 100644 --- a/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/plugins/admin/ogroups/class_ogroupManagement.inc @@ -597,10 +597,10 @@ name='dep_root' alt='"._("Root")."'> ". } ksort($tmp); foreach($tmp as $value){ - if($value["description"][0]!=".."){ + if(isset($value["description"][0])){ $this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]"; }else{ - $this->departments[$value['dn']]=$value["description"][0]; + $this->departments[$value['dn']]=convert_department_dn2($value['dn']);//$value["description"][0]; } } /* END NEW LIST MANAGMENT diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index 85e3a1121..254eff490 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -886,10 +886,10 @@ class systems extends plugin } ksort($tmp); foreach($tmp as $value){ - if($value["description"][0]!=".."){ + if(isset($value["description"][0])){ $this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]"; }else{ - $this->departments[$value['dn']]=$value["description"][0]; + $this->departments[$value['dn']]=convert_department_dn2($value['dn']);//$value["description"][0]; } } diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index 578b13008..fbc3ab56b 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -989,23 +989,31 @@ class userManagement extends plugin * We also need to search for the departments * So we are able to navigate like in konquerer */ + + /* Create base to search in */ $base2 = preg_replace("/ou=people,/i","",$base); + /* Get all departments within this subtree */ $res3 = get_list2($this->ui->subtreeACL, "(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))", TRUE, $base2, array("ou", "description"), TRUE); $this->departments= array(); + /* Create array with results */ $tmp = array(); foreach ($res3 as $value){ $tmp[strtolower($value['dn']).$value['dn']]=$value; } + + /* Sort array */ ksort($tmp); + + /* Create result array */ foreach($tmp as $value){ - if(isset($value['description'][0]) && $value["description"][0]!=".."){ + if(isset($value['description'][0])){ $this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]"; }else{ - $this->departments[$value['dn']]=$value["description"][0]; + $this->departments[$value['dn']]=convert_department_dn2($value['dn']); } } /* END NEW LIST MANAGMENT diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc index 546ab9953..d77bf2b4e 100644 --- a/plugins/gofax/blocklists/class_blocklistManagement.inc +++ b/plugins/gofax/blocklists/class_blocklistManagement.inc @@ -463,10 +463,10 @@ class blocklist extends plugin } ksort($tmp); foreach($tmp as $value){ - if($value["description"][0]!=".."){ + if(isset($value["description"][0])){ $this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]"; }else{ - $this->departments[$value['dn']]=$value["description"][0]; + $this->departments[$value['dn']]=convert_department_dn2($value['dn']);//$value["description"][0]; } } diff --git a/plugins/gofon/conference/class_phoneConferenceManagment.inc b/plugins/gofon/conference/class_phoneConferenceManagment.inc index 78391cf0e..70b0b253c 100644 --- a/plugins/gofon/conference/class_phoneConferenceManagment.inc +++ b/plugins/gofon/conference/class_phoneConferenceManagment.inc @@ -430,10 +430,10 @@ class phoneConferenceManagment extends plugin } ksort($tmp); foreach($tmp as $value){ - if($value["description"][0]!=".."){ + if(isset($value["description"][0])){ $this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]"; }else{ - $this->departments[$value['dn']]=$value["description"][0]; + $this->departments[$value['dn']]=convert_department_dn2($value['dn']);//$value["description"][0]; } } } diff --git a/plugins/gofon/macro/class_gofonMacroManagement.inc b/plugins/gofon/macro/class_gofonMacroManagement.inc index ef7688e8e..c6f130323 100755 --- a/plugins/gofon/macro/class_gofonMacroManagement.inc +++ b/plugins/gofon/macro/class_gofonMacroManagement.inc @@ -461,10 +461,10 @@ class gofonMacro extends plugin } ksort($tmp); foreach($tmp as $value){ - if($value["description"][0]!=".."){ + if(isset($value["description"][0])){ $this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]"; }else{ - $this->departments[$value['dn']]=$value["description"][0]; + $this->departments[$value['dn']]=convert_department_dn2($value['dn']);//$value["description"][0]; } }