Code

Fixed fai package.
[gosa.git] / plugins / admin / fai / class_faiVariable.inc
index eb2c71c0562278b3b7d1a4cebcef3278cdd01326..ccc6170b6a1664490966b39433ac14abae69d9bd 100644 (file)
@@ -251,7 +251,8 @@ class faiVariable extends plugin
     $ldap = $this->config->get_ldap_link();
     $ldap->cd ($this->dn);
 
-    $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $this->dn);
+#    $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $this->dn);
+    $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $this->dn);
     if($_SESSION['faifilter']['branch'] == "main"){
       $use_dn = $this->dn;
     }
@@ -259,7 +260,8 @@ class faiVariable extends plugin
     prepare_to_save_FAI_object($use_dn,array(),true);
 
     foreach($this->SubObjects as $name => $obj){
-      $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $obj['dn']);
+#      $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $obj['dn']);
+      $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $obj['dn']);
       if($_SESSION['faifilter']['branch'] == "main"){
         $use_dn = $obj['dn'];
       }