Code

Updated migration process
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 14 May 2010 09:58:15 +0000 (09:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 14 May 2010 09:58:15 +0000 (09:58 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18474 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_configRegistry.inc
gosa-core/plugins/addons/configViewer/migration/class_migrateRDN.inc

index 9936b023f294b9e88ef98cf52e753537ecb353ef..d2c71a5946dadc093e145ef78618a49b79bb6d5b 100644 (file)
@@ -251,8 +251,12 @@ class gosaProperty
         // Initialize with the current value
         $this->_restoreCurrentValue(); 
 
+    }
+
+    function migrationRequired()
+    {
         // Instantiate migration class 
-        if(!empty($this->migrate)){
+        if(!empty($this->migrate) && $this->migrationClass == NULL){
             if(!class_available($this->migrate)){
                 trigger_error("Cannot start migration for gosaProperty::'{$this->getName()}' class not found ({$this->migrate})!");
             }else{
@@ -260,14 +264,11 @@ class gosaProperty
                 $tmp = new $class($this->parent->config,$this);
                 if(! $tmp instanceof propertyMigration){ 
                     trigger_error("Cannot start migration for gosaProperty::'{$this->getName()}' doesn't implement propertyMigration!");
+                }else{
+                    $this->migrationClass = $tmp;
                 }
-                $this->migrationClass = $tmp;
             }
         }
-    }
-
-    function migrationRequired()
-    {
         if(empty($this->migrate) || $this->migrationClass == NULL){
             return(FALSE);
         }
index 046b3ef59d8745f0fb90083a023faad4d60d1932..deefb0be5d9b64e7f429e01574b7ed44c3fd6453 100644 (file)
@@ -23,6 +23,11 @@ class migrateRDN implements propertyMigration
         $this->config = &$config;
     }   
 
+    function getChanges()
+    {
+        return($this->found);
+    }
+
     function checkForIssues()
     {
         $this->found = array();