Code

Fixed remove from parent, for k=kolab entry.
[gosa.git] / include / class_plugin.inc
index 1a74a753832aabdceaf067953219c2b39c251628..15180d73cbd1719b2805435b63ce8ae03a597d83 100644 (file)
@@ -738,7 +738,15 @@ class plugin
     /* Save copy */
     $ldap->connect();
     $ldap->cd($this->config->current['BASE']);
+    
     $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $dst_dn));
+
+    /* FAIvariable=.../..., cn=.. 
+        could not be saved, because the attribute FAIvariable was different to 
+        the dn FAIvariable=..., cn=... */
+    if(in_array_ics("FAIdebconfInfo",$new['objectClass'])){
+      $new['FAIvariable'] = $ldap->fix($new['FAIvariable']);
+    }
     $ldap->cd($dst_dn);
     $ldap->add($new);
 
@@ -906,14 +914,14 @@ class plugin
       $attrs= $ldap->fetch();
       if(isset($attrs['gosaUnitTag'][0]) && $attrs['gosaUnitTag'][0] == $tag){
         if ($show) {
-          echo sprintf(_("Processing: Object '%s' is already tagged"), $dn)."<br>";
+          echo sprintf(_("Object '%s' is already tagged"), @LDAP::fix($dn))."<br>";
           flush();
         }
         return;
       }
       if (count($attrs)){
         if ($show){
-          echo sprintf(_("Processing: Adding tag (%s) to object '%s'"), $tag,$dn)."<br>";
+          echo sprintf(_("Adding tag (%s) to object '%s'"), $tag, @LDAP::fix($dn))."<br>";
           flush();
         }
         $nattrs= array("gosaUnitTag" => $this->gosaUnitTag);
@@ -927,6 +935,7 @@ class plugin
         $nattrs['objectClass'][]= "gosaAdministrativeUnitTag";
         $ldap->cd($dn);
         $ldap->modify($nattrs);
+        show_ldap_error($ldap->get_error(), _("Handle object tagging failed"));
       } else {
         @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "Not tagging ($tag) $dn - seems to have moved away", "Tagging");
       }
@@ -942,7 +951,7 @@ class plugin
       }
       if (count($attrs)){
         if ($show){
-          echo sprintf(_("Processing: Removing tag from object '%s'"), $dn)."<br>";
+          echo sprintf(_("Removing tag from object '%s'"), @LDAP::fix($dn))."<br>";
           flush();
         }
         $nattrs= array("gosaUnitTag" => array());