Code

Updated FAI RDN migration
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 May 2010 10:19:12 +0000 (10:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 May 2010 10:19:12 +0000 (10:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18596 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/migration/class_migrateFaiRDN.inc
gosa-plugins/fai/admin/fai/migration/class_migrate_faiBaseRDN.inc

index 4bc07db5309a551684849925596fd04f0d385311..8bd7c11da4d7a664022126d6a41ff55dac664c71 100644 (file)
@@ -37,6 +37,9 @@ class migrateFaiRDN extends migrateRDN implements propertyMigration
         $initialValue = $this->prefix.$this->property->getValue().$this->suffix;
         $targetValue = $this->prefix.$this->property->getValue(TRUE).$this->suffix;
 
+        if(!empty($initialValue) && !preg_match("/,$/", $initialValue)) $initialValue.=",";
+        if(!empty($targetValue) && !preg_match("/,$/", $targetValue)) $targetValue.=",";
+
         $dnMatch = "";
         if(!empty($initialValue)){
             foreach(preg_split("/,/", $initialValue) as $rdnPart){
index dccce4c0ee8ec8180ed3289a2dc35da420adb1e7..2e512fb991be70418dd4f11457da31fd3153a213 100644 (file)
@@ -11,6 +11,10 @@ class migrate_faiBaseRDN extends migrateFaiRDN implements propertyMigration
 
         $initialValue = $this->prefix.$this->property->getValue().$this->suffix;
         $targetValue = $this->prefix.$this->property->getValue(TRUE).$this->suffix;
+
+        if(!empty($initialValue) && !preg_match("/,$/", $initialValue)) $initialValue.=",";
+        if(!empty($targetValue) && !preg_match("/,$/", $targetValue)) $targetValue.=",";
+
         $from = $initialValue.$this->config->current['BASE'];
         $to = $targetValue.$this->config->current['BASE'];