Code

Updated deparment saving
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 25 Jun 2008 06:47:25 +0000 (06:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 25 Jun 2008 06:47:25 +0000 (06:47 +0000)
-Add 'ou' and objectClass 'gosaDepartment' to each container obejct.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11429 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/departments/class_countryGeneric.inc
gosa-core/plugins/admin/departments/class_departmentGeneric.inc
gosa-core/plugins/admin/departments/class_divListDepartment.inc
gosa-core/plugins/admin/departments/class_localityGeneric.inc
gosa-core/plugins/admin/departments/class_organizationGeneric.inc

index 0e29a7ad5b3e7e3e8125053da823f41c5f7edee9..b38fa2871c5c789446a408951696bd9325a96d90 100644 (file)
@@ -23,8 +23,8 @@
 class country extends department
 {
        /* attribute list for save action */
-       var $attributes     = array( "c", "description");
-       var $objectclasses  = array("top", "country");
+       var $attributes     = array( "c", "ou", "description");
+       var $objectclasses  = array("top", "country", "gosaDepartment");
   var $type   ="c";
   var $c      ="";
   var $orgi_c ="";
index c8da2b281e438896435e5b869a3bd41f165ff4bc..5026fd9ab74d08a23977fe976270c7cbd0221949 100644 (file)
@@ -301,6 +301,11 @@ class department extends plugin
        {
                $ldap= $this->config->get_ldap_link();
 
+    /* Ensure that ou is saved too, it is required by objectClass gosaDepartment 
+     */
+    $nA = $this->namingAttr;
+    $this->ou = $this->$nA;
+
     /* Add tag objects if needed */
     if ($this->is_administrational_unit){
 
index cc3835dec5b4a1403378f5a21897980023091a0c..87011c32273473a1c0491eb4cdcc37f5f721f4ac 100644 (file)
@@ -172,15 +172,21 @@ class divListDepartment extends MultiSelectWindow
         "&nbsp;"._("Locality")."&nbsp;(l)|dep_new_l|\n";
     }
 
-    if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase  ,"department/alias"))) {
-      $s.= "...|<input class='center' type='image' src='plugins/departments/images/department_alias.png' alt=''>".
-        "&nbsp;"._("Alias")."|dep_new_alias|\n";
+    if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase  ,"department/dcObject"))) {
+      $s.= "...|<input class='center' type='image' src='plugins/departments/images/dcObject.png' alt=''>".
+        "&nbsp;"._("Domain component")."&nbsp;(l)|dep_new_dc|\n";
     }
 
-    if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase  ,"department/referal"))) {
-      $s.= "...|<input class='center' type='image' src='plugins/departments/images/department_referal.png' alt=''>".
-        "&nbsp;"._("Referal")."|dep_new_referal|\n";
-    }
+
+#   if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase  ,"department/alias"))) {
+#     $s.= "...|<input class='center' type='image' src='plugins/departments/images/department_alias.png' alt=''>".
+#       "&nbsp;"._("Alias")."|dep_new_alias|\n";
+#   }
+#
+#   if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase  ,"department/referal"))) {
+#     $s.= "...|<input class='center' type='image' src='plugins/departments/images/department_referal.png' alt=''>".
+#       "&nbsp;"._("Referal")."|dep_new_referal|\n";
+#   }
 
     $s.= "..|---|\n";
     $s.= "..|<img src='images/lists/trash.png' alt='' border='0' class='center'>".
index 2944748cff256e76ecf7e60c2bc57ad4aa737016..0f563976e7120e7f0cb64b8f32877066cb7523ff 100644 (file)
@@ -23,8 +23,8 @@
 class locality extends department
 {
        /* attribute list for save action */
-       var $attributes     = array("l", "description");
-       var $objectclasses  = array("top", "locality");
+       var $attributes     = array("l", "description", "ou");
+       var $objectclasses  = array("top", "locality", "gosaDepartment");
 
   var $description= "";
   var $type       = "l";
index f6f4c90971db769d48f4bc6edcbe8b961ceb0784..507b2a1131f5a6d9ceddabbcb786db3c057573c4 100644 (file)
 class organization extends department
 {
        /* attribute list for save action */
-  var $attributes     = array( "o", "description","userPassword","searchGuide",
+  var $attributes     = array( "o", "ou", "description","userPassword","searchGuide",
       "seeAlso","businessCategory","x121Address","registeredAddress",
       "destinationIndicator","preferredDeliveryMethod","telexNumber",
       "telephoneNumber","internationaliSDNNumber","facsimileTelephoneNumber","street",
       "postOfficeBox","postalCode", "postalAddress","physicalDeliveryOfficeName",
       "st","l","teletexTerminalIdentifier");
 
-  var $objectclasses  = array("top", "organization");
+  var $objectclasses  = array("top", "organization", "gosaDepartment");
 
   /* Attributes 
    */