Code

Fixed problems with termgroups
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Aug 2006 09:49:36 +0000 (09:49 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Aug 2006 09:49:36 +0000 (09:49 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4499 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/ogroups/class_termgroup.inc

index 1a5daaef84ff93b08c408ead740cba5bf166995b..b6a505cb975f7df099dcb92b15acadf6731d3bdf 100644 (file)
@@ -320,27 +320,15 @@ class termgroup extends plugin
 
     /* Write back to ldap */
     $ldap= $this->config->get_ldap_link();
-    if ($this->orig_dn == 'new'){
-      $ldap->cd($this->config->current['BASE']);
-      $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
-      $ldap->cd($this->dn);
-      $ldap->add($this->attrs);
-      if(!$this->didAction){
-        $this->handle_post_events("add");
-      }
-    } else {
-      if ($this->orig_dn != $this->dn){
-        $this->move($this->orig_dn, $this->dn);
-      }
-      $ldap->cd($this->dn);
-      $this->cleanup();
-      $ldap->modify ($this->attrs);
+    $ldap->cd($this->dn);
+    $this->cleanup();
+    $ldap->modify ($this->attrs);
 
-      if(!$this->didAction){
-        $this->handle_post_events("modify");
-      }
+    if(!$this->didAction){
+      $this->handle_post_events("modify");
     }
-    show_ldap_error($ldap->get_error(), sprintf(_("Removing of object group/workstation with dn '%s' failed."),$this->dn));
+    show_ldap_error($ldap->get_error(), _("Saving workstation failed"));
+
   }
   
   function plInfo()