From a78a1a3f87bffb1e7a9ae0e060385a0cd267bd0d Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 20 May 2010 10:19:12 +0000 Subject: [PATCH] Updated FAI RDN migration 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 | 3 +++ .../fai/admin/fai/migration/class_migrate_faiBaseRDN.inc | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/gosa-plugins/fai/admin/fai/migration/class_migrateFaiRDN.inc b/gosa-plugins/fai/admin/fai/migration/class_migrateFaiRDN.inc index 4bc07db53..8bd7c11da 100644 --- a/gosa-plugins/fai/admin/fai/migration/class_migrateFaiRDN.inc +++ b/gosa-plugins/fai/admin/fai/migration/class_migrateFaiRDN.inc @@ -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){ diff --git a/gosa-plugins/fai/admin/fai/migration/class_migrate_faiBaseRDN.inc b/gosa-plugins/fai/admin/fai/migration/class_migrate_faiBaseRDN.inc index dccce4c0e..2e512fb99 100644 --- a/gosa-plugins/fai/admin/fai/migration/class_migrate_faiBaseRDN.inc +++ b/gosa-plugins/fai/admin/fai/migration/class_migrate_faiBaseRDN.inc @@ -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']; -- 2.30.2