From 3ca59f9a21d6fdf7d8c51364b29dff548fa4c1eb Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 7 May 2007 14:01:09 +0000 Subject: [PATCH] Fixed duplicate posixGroup search git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6282 594d385d-05f5-0310-b6e9-bd551577e9d8 --- setup/class_setupStep_Migrate.inc | 24 ++++++++++++++---------- setup/setup_migrate.tpl | 23 ++++++++++++----------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/setup/class_setupStep_Migrate.inc b/setup/class_setupStep_Migrate.inc index 303c24f85..b8e860868 100644 --- a/setup/class_setupStep_Migrate.inc +++ b/setup/class_setupStep_Migrate.inc @@ -209,7 +209,7 @@ class Step_Migrate extends setup_step if($this->check_uidNumbers){ $this->checks['uidNumber_usage']['STATUS'] = FALSE; - $this->checks['uidNumber_usage']['STATUS_MSG']= _("Failed"); + $this->checks['uidNumber_usage']['STATUS_MSG']= ""._("Warning").""; $this->checks['uidNumber_usage']['ERROR_MSG'] = sprintf(_("Found %s duplicated uidNumber values."),count($this->check_uidNumbers)); return(false); @@ -234,7 +234,7 @@ class Step_Migrate extends setup_step $cv['tls']); $ldap->cd($cv['base']); - $res = $ldap->search("gidNumber=*",array("dn","gidNumber")); + $res = $ldap->search("(&(objectClass=posixGroup)(gidNumber=*))",array("dn","gidNumber")); if(!$res){ $this->checks['gidNumber_usage']['STATUS'] = FALSE; $this->checks['gidNumber_usage']['STATUS_MSG']= _("LDAP query failed"); @@ -258,9 +258,9 @@ class Step_Migrate extends setup_step if($this->check_gidNumbers){ $this->checks['gidNumber_usage']['STATUS'] = FALSE; - $this->checks['gidNumber_usage']['STATUS_MSG']= _("Failed"); + $this->checks['gidNumber_usage']['STATUS_MSG']= ""._("Warning").""; $this->checks['gidNumber_usage']['ERROR_MSG'] = - sprintf(_("Found %s duplicated gidNumber values."),count($this->check_gidNumbers)); + sprintf(_("Found %s duplicate gidNumber."),count($this->check_gidNumbers)); return(false); }else{ $this->checks['gidNumber_usage']['STATUS'] = TRUE; @@ -318,7 +318,7 @@ class Step_Migrate extends setup_step $this->checks['outside_winstations']['STATUS_MSG']= _("Failed"); $this->checks['outside_winstations']['ERROR_MSG'] = sprintf(_("Found %s winstations outside the predefined winstation department ou '%s'."),count($this->outside_winstations),$winstation_ou); - $this->checks['outside_winstations']['ERROR_MSG'].= ""; + $this->checks['outside_winstations']['ERROR_MSG'].= ""; return(false); }else{ $this->checks['outside_winstations']['STATUS'] = TRUE; @@ -365,7 +365,7 @@ class Step_Migrate extends setup_step $this->checks['outside_groups']['STATUS_MSG']= _("Failed"); $this->checks['outside_groups']['ERROR_MSG'] = sprintf(_("Found %s groups outside the selected group ou '%s'."),count($this->outside_groups),$group_ou); - $this->checks['outside_groups']['ERROR_MSG'].= ""; + $this->checks['outside_groups']['ERROR_MSG'].= ""; return(false); }else{ $this->checks['outside_groups']['STATUS'] = TRUE; @@ -411,7 +411,7 @@ class Step_Migrate extends setup_step $this->checks['outside_users']['STATUS_MSG']= ""._("Warning").""; $this->checks['outside_users']['ERROR_MSG'] = sprintf(_("Found %s user(s) outside the selected user ou '%s'."),count($this->outside_users),$people_ou); - $this->checks['outside_users']['ERROR_MSG'].= ""; + $this->checks['outside_users']['ERROR_MSG'].= ""; return(false); }else{ $this->checks['outside_users']['STATUS'] = TRUE; @@ -546,7 +546,7 @@ class Step_Migrate extends setup_step $this->checks['users_visible']['STATUS_MSG']= ""._("Warning").""; $this->checks['users_visible']['ERROR_MSG'] = sprintf(_("Found %s user(s) that will not be visible in GOsa."), count($this->users_to_migrate)); - $this->checks['users_visible']['ERROR_MSG'] .= ""; + $this->checks['users_visible']['ERROR_MSG'] .= ""; } } @@ -675,7 +675,7 @@ class Step_Migrate extends setup_step $this->checks['deps_visible']['STATUS'] = TRUE; $this->checks['deps_visible']['STATUS_MSG']= ''._("Warning").''; $this->checks['deps_visible']['ERROR_MSG'] = sprintf(_("Found %s department(s) that will not be visible in GOsa."),count($this->deps_to_migrate)); - $this->checks['deps_visible']['ERROR_MSG'] .= ""; + $this->checks['deps_visible']['ERROR_MSG'] .= " "; } } @@ -993,6 +993,8 @@ class Step_Migrate extends setup_step function migrate_outside_users($perform = FALSE) { + $this->show_details= $perform; + /* Establish ldap connection */ $cv = $this->parent->captured_values; $ldap = new LDAP($cv['admin'], @@ -1135,6 +1137,8 @@ class Step_Migrate extends setup_step $smarty->assign("ous",$this->get_all_people_ous()); $smarty->assign("method","outside_users"); $smarty->assign("outside_users",$this->outside_users); + $smarty->assign("user_details", $this->show_details); +var_dump($this->show_details); return($smarty->fetch(get_template_path("setup_migrate.tpl",TRUE,dirname(__FILE__)))); } @@ -1417,7 +1421,7 @@ class Step_Migrate extends setup_step $this->checks['root']['STATUS'] = FALSE; $this->checks['root']['STATUS_MSG']= _("Failed"); $this->checks['root']['ERROR_MSG'] = _("Root object couldn't be created, you should try it on your own."); - $this->checks['root']['ERROR_MSG'].= ""; + $this->checks['root']['ERROR_MSG'].= " "; return($res);; } } diff --git a/setup/setup_migrate.tpl b/setup/setup_migrate.tpl index 8bcf7ddbb..c34243609 100644 --- a/setup/setup_migrate.tpl +++ b/setup/setup_migrate.tpl @@ -129,12 +129,17 @@

{t}Move users into configured user tree{/t}

- {t}This dialog allows moving a couple of users to the configured user tree.{/t} + {t}This dialog allows moving a couple of users to the configured user tree. Doing this may straighten your LDAP service.{/t}

- {t}Be careful with this option! There may be references pointing to these users. The setup can't migrate references, so you may want to abort in this case.{/t} + {t}Be careful with this option! There may be references pointing to these users. The GOsa setup can't migrate references, so you may want to cancel the migration in this case in this case.{/t}

- +

+ {t}Move selected user into the following GOsa people department{/t}: + +

{foreach from=$outside_users item=val key=key} {if $outside_users.$key.selected} @@ -154,16 +159,12 @@ {/if}
{/foreach} - -

- {t}Move selected user into the following GOsa people department{/t} : -
+ {if $user_details} + + {else} -

- + {/if}

 

-- 2.30.2