Code

Updated filterClass names
[gosa.git] / gosa-core / setup / class_setupStep_Migrate.inc
index d49a790f220efdc266d038f84ef29dac0380fbed..eee96634b8a0a00639d281b519b2c7445f3e615b 100644 (file)
@@ -138,13 +138,13 @@ class Step_Migrate extends setup_step
     $this->checks['root']['ERROR_MSG'] = "";
     $this->checkBase();
 
-    $this->checks['rootOC']['TITLE']     = _("Checking object classes for root object");
+    $this->checks['rootOC']['TITLE']     = _("Inspecting object classes in root object");
     $this->checks['rootOC']['STATUS']    = FALSE;
     $this->checks['rootOC']['STATUS_MSG']= "";
     $this->checks['rootOC']['ERROR_MSG'] = "";
     $this->checkBaseOC();
 
-    $this->checks['permissions']['TITLE']     = _("Checking permissions on LDAP database");
+    $this->checks['permissions']['TITLE']     = _("Checking permission for LDAP database");
     $this->checks['permissions']['STATUS']    = FALSE;
     $this->checks['permissions']['STATUS_MSG']= "";
     $this->checks['permissions']['ERROR_MSG'] = "";
@@ -869,6 +869,7 @@ class Step_Migrate extends setup_step
   {
     /* Reset settings 
      */ 
+    $GOsa_26_found = FALSE;
     $this->migrate_users = array();
     $this->acl_migrate_dialog = FALSE;
     $this->migrate_acl_base_entry  = "";
@@ -884,7 +885,7 @@ class Step_Migrate extends setup_step
     $ldap = new ldapMultiplexer($ldap_l);
     $ldap->cd($cv['base']);
     $res = $ldap->cat($cv['base']);
-    
+   
     if(!$res){
       $this->checks['acls']['STATUS']    = FALSE;
       $this->checks['acls']['STATUS_MSG']= _("LDAP query failed");
@@ -920,10 +921,10 @@ class Step_Migrate extends setup_step
         $acls = $attrs['gosaAclEntry'];
         for($i = 0 ; $i < $acls['count'] ; $i++){
           $acl = $acls[$i];
-          $tmp = split(":",$acl);
+          $tmp = explode(":",$acl);
 
           if($tmp[1] == "psub"){
-            $members = split(",",$tmp[2]);
+            $members = explode(",",$tmp[2]);
             foreach($members as $member){
               $member = base64_decode($member);
               if(isset($users[$member])){
@@ -964,7 +965,7 @@ class Step_Migrate extends setup_step
                 $a_str = $ret['gosaAclTemplate'][$e];
                 if(preg_match("/^[0-9]*:psub:/",$a_str) && preg_match("/:all;cmdrw$/",$a_str)){
 
-                  $members = split(",",$tmp[3]);
+                  $members = explode(",",$tmp[3]);
                   foreach($members as $member){
                     $member = base64_decode($member);
 
@@ -1050,6 +1051,9 @@ class Step_Migrate extends setup_step
         $this->checks['acls']['ERROR_MSG'].= "<input type='submit' name='create_acls' value='"._("Create")."'>";
       }
     }
+
+    // Reload base OC
+    $this->checkBaseOC();
     return($GOsa_26_found);
   }
 
@@ -1592,6 +1596,8 @@ class Step_Migrate extends setup_step
       /* Update ldap and reload check infos 
        */
       $this->migrate_selected_admin_users();
+      $this->dialog = FALSE;
+      $this->acl_migrate_dialog = FALSE;
 
     }elseif($this->acl_migrate_dialog){
 
@@ -2049,7 +2055,7 @@ class Step_Migrate extends setup_step
         if(!class_available("departmentManagement")){
           $this->checks['rootOC']['STATUS']    = FALSE;
           $this->checks['rootOC']['STATUS_MSG']= _("Failed");
-          $this->checks['rootOC']['ERROR_MSG'] = sprintf(_("Missing GOsa class %s."),"departmentManagement").
+          $this->checks['rootOC']['ERROR_MSG'] = sprintf(_("Missing GOsa object class '%s'!"),"departmentManagement").
             "&nbsp;"._("Please check your installation.");
           return;
         }
@@ -2071,7 +2077,7 @@ class Step_Migrate extends setup_step
           $this->checks['rootOC']['STATUS']    = FALSE;
           $this->checks['rootOC']['STATUS_MSG']= _("Failed");
           $this->checks['rootOC']['ERROR_MSG'] = 
-            sprintf(_("Could not detect the object type of your root object, please try to add the objectClass '%s' manually."),"gosaDepartment");
+            sprintf(_("Cannot handle the structural object type of your root object. Please try to add the object class '%s' manually."),"gosaDepartment");
           return;
         }
 
@@ -2133,8 +2139,10 @@ class Step_Migrate extends setup_step
         if(isset($this->rootOC_details['mods'])){
           $res  = $ldap->modify($this->rootOC_details['mods']);        
           if(!$res){
-            msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $source, LDAP_MOD, get_class()));
+            msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $cv['base'], LDAP_MOD, get_class()));
           }
+          $this->checkBaseOC();
+          $this->check_administrativeAccount();
           return($res);
         }else{
           trigger_error("No modifications to make... ");
@@ -2894,7 +2902,7 @@ class Step_Migrate extends setup_step
        */ 
       $release = "";
       $r = $info['FAIrelease'][0];
-      $z = split("/",$r);
+      $z = explode("/",$r);
       foreach($z as $part){
 
         if(!empty($part)){