index 6e4d85f7ea6cc4c9f863bfd78c6efa872d269169..5dcd8e649d9ccba0c9fdf273b1e8a08f0dc6d26c 100644 (file)
$valid_deps['/'] = $cv['base'];
$ldap->search("(&(objectClass=gosaDepartment)(ou=*))",array("dn","ou"));
while($attrs = $ldap->fetch()){
- $valid_deps[$attrs['ou'][0]] = $attrs['dn'];
+ $valid_deps[] = $attrs['dn'];
}
/***********
$valid_deps['/'] = $cv['base'];
$ldap->search("(&(objectClass=gosaDepartment)(ou=*))",array("dn","ou"));
while($attrs = $ldap->fetch()){
- $valid_deps[$attrs['ou'][0]] = $attrs['dn'];
+ $valid_deps[] = $attrs['dn'];
}
/***********
/* Skip GOsa internal departments */
$skip_dns = array("/".$cv['peopleou']."/","/".$cv['groupou']."/","/^ou=people,/","/^ou=groups,/",
"/(,|)ou=configs,/","/(,|)ou=systems,/",
- "/(,|)ou=apps,/","/(,|)ou=mime,/","/^ou=aclroles,/","/^ou=incoming,/",
+ "/(,|)ou=apps,/","/(,|)ou=mime,/","/(,|)ou=devices/","/^ou=aclroles,/","/^ou=incoming,/",
"/ou=snapshots,/","/(,|)dc=addressbook,/","/^(,|)ou=machineaccounts,/",
"/(,|)ou=winstations,/");
*/
foreach($this->deps_to_migrate as $key => $attrs){
$dn = $attrs['dn'];
- $skip = false;
+ $skip = false;;
foreach($skip_dns as $skip_dn){
if(preg_match($skip_dn,$dn)){
$skip = true;
}
if($only_ldif){
- $this->acl_create_changes ="\n".$cv['base']."\n";
+ $this->acl_create_changes ="\n".($ldap->fix($cv['base']))."\n";
$this->acl_create_changes.=$this->array_to_ldif($attrs)."\n";
- $this->acl_create_changes.="\n".$cv['base']."\n";
+ $this->acl_create_changes.="\n".($ldap->fix($cv['base']))."\n";
$this->acl_create_changes.=$this->array_to_ldif($attrs_new);
}else{
$dn = base64_decode($b_dn);
$d_dn = preg_replace("/,.*$/",",".base64_decode($destination_dep),$dn);
if(!$perform){
- $this->outside_winstations[$b_dn]['ldif'] = _("Winstation will be moved from").":<br>\t".$dn."<br>"._("to").":<br>\t".$d_dn;
+ $this->outside_winstations[$b_dn]['ldif'] = _("Winstation will be moved from").":<br>\t".($ldap->fix($dn))."<br>"._("to").":<br>\t".($ldap->fix($d_dn));
/* Check if there are references to this object */
$dn = base64_decode($b_dn);
$d_dn = preg_replace("/,.*$/",",".base64_decode($destination_dep),$dn);
if(!$perform){
- $this->outside_groups[$b_dn]['ldif'] = _("Group will be moved from").":<br>\t".$dn."<br>"._("to").":<br>\t".$d_dn;
+ $this->outside_groups[$b_dn]['ldif'] = _("Group will be moved from").":<br>\t".($ldap->fix($dn))."<br>"._("to").":<br>\t".($ldap->fix($d_dn));
/* Check if there are references to this object */
$ldap->search("(&(member=".$dn.")(|(objectClass=gosaGroupOfNames)(objectClass=groupOfNames)))",array('dn'));
$dn = base64_decode($b_dn);
$d_dn = preg_replace("/,.*$/",",".base64_decode($destination_dep),$dn);
if(!$perform){
- $this->outside_users[$b_dn]['ldif'] = _("User will be moved from").":<br>\t".$dn."<br>"._("to").":<br>\t".$d_dn;
+ $this->outside_users[$b_dn]['ldif'] = _("User will be moved from").":<br>\t".($ldap->fix($dn))."<br>"._("to").":<br>\t".($ldap->fix($d_dn));
/* Check if there are references to this object */
$ldap->search("(&(member=".$dn.")(|(objectClass=gosaGroupOfNames)(objectClass=groupOfNames)))",array('dn'));
}
if($this->outside_winstations_dialog){
+
+ /* Fix displayed dn syntax */
+ $tmp = $this->outside_winstations;
+ foreach($tmp as $key => $data){
+ $tmp[$key]['dn'] = @LDAP::fix($data['dn']);
+ }
+
$smarty = get_smarty();
$smarty->assign("ous",$this->get_all_winstation_ous());
$smarty->assign("method","outside_winstations");
- $smarty->assign("outside_winstations",$this->outside_winstations);
+ $smarty->assign("outside_winstations",$tmp);
return($smarty->fetch(get_template_path("setup_migrate.tpl",TRUE,dirname(__FILE__))));
}
/*************
}
if($this->outside_groups_dialog){
+
+ /* Fix displayed dn syntax */
+ $tmp = $this->outside_groups;
+ foreach($tmp as $key => $data){
+ $tmp[$key]['dn'] = @LDAP::fix($data['dn']);
+ }
+
$smarty = get_smarty();
$smarty->assign("ous",$this->get_all_group_ous());
$smarty->assign("method","outside_groups");
- $smarty->assign("outside_groups",$this->outside_groups);
+ $smarty->assign("outside_groups",$tmp);
$smarty->assign("group_details", $this->show_details);
return($smarty->fetch(get_template_path("setup_migrate.tpl",TRUE,dirname(__FILE__))));
}
}
if($this->outside_users_dialog){
+
+ /* Fix displayed dn syntax */
+ $tmp = $this->outside_users;
+ foreach($tmp as $key => $data){
+ $tmp[$key]['dn'] = @LDAP::fix($data['dn']);
+ }
+
$smarty = get_smarty();
$smarty->assign("ous",$this->get_all_people_ous());
$smarty->assign("method","outside_users");
- $smarty->assign("outside_users",$this->outside_users);
+ $smarty->assign("outside_users",$tmp);
$smarty->assign("user_details", $this->show_details);
return($smarty->fetch(get_template_path("setup_migrate.tpl",TRUE,dirname(__FILE__))));
}
/* Display migration dialog */
if($this->users_migration_dialog){
+
+ /* Fix displayed dn syntax */
+ $tmp = $this->users_to_migrate;
+ foreach($tmp as $key => $data){
+ $tmp[$key]['dn'] = @LDAP::fix($data['dn']);
+ }
+
$smarty = get_smarty();
- $smarty->assign("users_to_migrate",$this->users_to_migrate);
+ $smarty->assign("users_to_migrate",$tmp);
$smarty->assign("method","migrate_users");
$smarty->assign("user_details", $this->show_details);
return($smarty->fetch(get_template_path("setup_migrate.tpl",TRUE,dirname(__FILE__))));
/* Display migration dialog */
if($this->dep_migration_dialog){
$smarty = get_smarty();
- $smarty->assign("deps_to_migrate",$this->deps_to_migrate);
+
+ /* Fix displayed dn syntax */
+ $tmp = $this->deps_to_migrate;
+ foreach($tmp as $key => $data){
+ $tmp[$key]['dn'] = @LDAP::fix($data['dn']);
+ }
+
+ $smarty->assign("deps_to_migrate",$tmp);
$smarty->assign("method","migrate_deps");
$smarty->assign("deps_details", $this->show_details);
return($smarty->fetch(get_template_path("setup_migrate.tpl",TRUE,dirname(__FILE__))));