Code

Added Warning message for existing objects
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 18 May 2010 15:14:24 +0000 (15:14 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 18 May 2010 15:14:24 +0000 (15:14 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18534 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/addons/propertyEditor/migration/class_migrateRDN.inc

index 46c70356cdf644e6e03694c346d88b0ec043cd0b..4d619ba0803675eb3f50c63d63e5e0402f8da749 100644 (file)
@@ -195,7 +195,16 @@ class migrateRDN implements propertyMigration
             $tmp = new plugin($this->config,NULL);
             foreach($this->found['move'] as $id => $data){
                 if(isset($_POST["migrateEntry_{$id}"])){
-                    $tmp->move($data['from'], $data['to']);
+                    if($tmp->move($data['from'], $data['to'])){
+                    }elseif($ldap->dn_exists($data['to'])){
+                        msg_dialog::display(_("Error"), 
+                                sprintf(_("Migration failed for object %s, dn already exists!"), 
+                                    bold($data['to'])), ERROR_DIALOG);
+                    }else{
+                        msg_dialog::display(_("Error"), 
+                                sprintf(_("Migration failed for object %s, please check if it already exists!"), 
+                                    bold($data['to'])), ERROR_DIALOG);
+                    }
                 }
             }
             $this->checkForIssues();