Code

Perlimitary domain support - not working yet
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 1 Oct 2009 11:59:35 +0000 (11:59 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 1 Oct 2009 11:59:35 +0000 (11:59 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14435 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/departments/class_departmentGeneric.inc
gosa-core/plugins/admin/departments/class_departmentManagement.inc
gosa-core/plugins/admin/departments/class_divListDepartment.inc

index c5f5e01432d6c6135c16fe77026c84d8b7e24df6..5a4c69cbec3efa70867bd02cc797a070aedc3790 100644 (file)
@@ -209,7 +209,7 @@ class department extends plugin
     $dep_types = departmentManagement::get_support_departments();
     $tpl ="";
     foreach($dep_types as $key => $data){
-      if($data['ATTR'] == $this->type){
+      if($data['OC'] == $this->type){
         $tpl = $data['TPL'];
         break;
       }
index bb0a20de8fa3a423f0c87e0f411cd71a12b2f2c1..50ba9f3ff24472b4cfc7193a0b67477a3ea1bdcb 100644 (file)
@@ -116,7 +116,7 @@ class departmentManagement extends plugin
       $types = $this->get_support_departments();
       $type = "";
       foreach($types as $key => $data){
-        if($data['ATTR'] == $s_entry){
+        if($data['OC'] == $s_entry){
           $type = $key;
           break;
         }
@@ -125,7 +125,7 @@ class departmentManagement extends plugin
       if(isset($types[$type])){
         $tab = $types[$type]['TAB'];
         $acl = $types[$type]['ACL'];
-        $this->deptabs= new deptabs($this->config,$this->config->data['TABS'][$tab], $this->dn,"department");
+        $this->deptabs= new deptabs($this->config, $this->config->data['TABS'][$tab], $this->dn, "department");
         $this->deptabs->set_acl_base($this->DivListDepartment->selectedBase);
       }else{
         trigger_error("Invalid / Not implemented countainer type.");
@@ -152,7 +152,7 @@ class departmentManagement extends plugin
       $data = array();
       foreach($types as $oc => $type){
         if(in_array($oc,$entry['objectClass'])){
-          $data = $type;
+          $data = $oc;
           break;
         }
       }
@@ -556,6 +556,18 @@ class departmentManagement extends plugin
     $types['dcObject']['TITLE']   = _("Domain Component");
     $types['dcObject']['TPL']     = "dcObject.tpl";
 
+    /* Domain 
+     */ 
+    $types['domain']['ACL']     = "domain"; 
+    $types['domain']['CLASS']   = "domain"; 
+    $types['domain']['ATTR']    = "dc"; 
+    $types['domain']['TAB']     = "DOMAIN_TABS"; 
+    $types['domain']['OC']      = "domain"; 
+    $types['domain']['IMG']     = "plugins/departments/images/domain.png"; 
+    $types['domain']['IMG_FULL']= "plugins/departments/images/domain.png"; 
+    $types['domain']['TITLE']   = _("Domain"); 
+    $types['domain']['TPL']     = "domain.tpl"; 
+
     /* Country object
      */
     $types['country']['ACL']     = "country";
index bcbaae300010dc0db865343a274854be95153e11..32a5a4ab57935b53b0da1f3c88d4a39247b4371f 100644 (file)
@@ -98,8 +98,8 @@ class divListDepartment extends MultiSelectWindow
     $types = $this->parent->get_support_departments();
     foreach($types as $type){
       if(preg_match("/c/",$ui->get_permissions($this->selectedBase  ,"department/".$type['ACL']))){
-      $s.= "...|<input class='center' type='image' src='".$type['IMG']."' alt='".$type['ATTR']."'>".
-        "&nbsp;".$type['TITLE']."&nbsp;(".$type['ATTR'].")|dep_new_".$type['ATTR']."|\n";
+      $s.= "...|<input class='center' type='image' src='".$type['IMG']."' alt='".$type['OC']."'>".
+        "&nbsp;".$type['TITLE']."&nbsp;(".$type['OC'].")|dep_new_".$type['OC']."|\n";
       }
     }