Code

Fixed missing description error
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Dec 2005 06:20:15 +0000 (06:20 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Dec 2005 06:20:15 +0000 (06:20 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2193 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/applications/class_applicationManagement.inc
plugins/admin/departments/class_departmentManagement.inc
plugins/admin/fai/class_faiManagement.inc
plugins/admin/groups/class_groupManagement.inc
plugins/admin/ogroups/class_ogroupManagement.inc
plugins/admin/systems/class_systemManagement.inc
plugins/admin/users/class_userManagement.inc
plugins/gofax/blocklists/class_blocklistManagement.inc
plugins/gofon/conference/class_phoneConferenceManagment.inc
plugins/gofon/macro/class_gofonMacroManagement.inc

index 6b70a3a57c1013fe9dc29ec6d37cf8db1866d436..86e5891fd13b971a071e5e1231169fc8baa842b8 100644 (file)
@@ -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];
           }
         }
 
index b062cd1472fdc44bb0fb4a47c1ae354ac9656bda..0575c45fedaa69335f0f783cf6b2f065f46a08ea 100644 (file)
@@ -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);
index 5ec39d073f49be4a554c5b3b6a710bb67c0cea45..1542bf1d093d511ce4eafe237e5fdef63c4d9a1f 100644 (file)
@@ -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];
                        }
                }
 
index 78d37b445ede1772e3f37aabffee78aaf344a59e..49cb8bf9834c430684145d7cd856219a31084eba 100644 (file)
@@ -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];
         }
       }
     }
index c90fa8ee787b6480098277368db2cf5b82aa9ad5..1f33b87d3eab3af9f3a09e2fd78f1994d5a8fdcf 100644 (file)
@@ -597,10 +597,10 @@ name='dep_root' alt='"._("Root")."'>&nbsp;".
     }
     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
index 85e3a1121ed7c22ac2f5c3859b3dd3a5f80ca5f9..254eff4903c9e3bcd8bf71dc3a71e692eac3aded 100644 (file)
@@ -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];
       }
     }
 
index 578b13008782cd6a68ee41da1c120da39c0808d3..fbc3ab56b9cf4df74d5b90d7de1b40ffb2cf73f6 100644 (file)
@@ -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 
index 546ab99532709abb17c66289969d9258fb4d0239..d77bf2b4efa42ec520f3f90a3484ad8a6cc47683 100644 (file)
@@ -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];
       }
     }
 
index 78391cf0ea6f3657e97e05e7e17d85cc253d2659..70b0b253c31b093ecfa49dab4971299027d2262a 100644 (file)
@@ -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];
       }
     }
   }
index ef7688e8eb469a684a5fb3caf65d569ee8024386..c6f1303237507f5536ad718f74bdd54cdb603044 100755 (executable)
@@ -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];
       }
     }