Code

Fixed macro saving for other bases
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 2 Aug 2005 08:05:56 +0000 (08:05 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 2 Aug 2005 08:05:56 +0000 (08:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1042 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/macro/class_gofonMacro.inc

index 7be9c1a28ece66aab2b5397810030c1eb455aad3..6ac7d11dc3c330c44ebd3b2d472f29b49be96bb7 100755 (executable)
@@ -367,7 +367,6 @@ class macro extends plugin
     $ldap= $this->config->get_ldap_link();
     $ldap->cat($this->dn);
     $a= $ldap->fetch();
-
     
     if(isset($this->orig_cn)){
       $this-> generate_mysql_entension_entries(true,false,$this->orig_cn);
@@ -381,8 +380,8 @@ class macro extends plugin
         $ldap->modify($this->attrs);
         $this->handle_post_events("modify");
       } else {
-        $ldap->cd($this->dn);
-        $ldap->create_missing_trees( $this->dn);
+        $ldap->cd($this->config->current['BASE']);
+        $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
         $ldap->cd($this->dn);
         $ldap->add($this->attrs);
         $this->handle_post_events("add");