diff --git a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc
index 44de99f2f3b409ce47fd1607f4b119c22c526d6f..97cf914dac6781a14278afb32b102a691cb50c62 100644 (file)
$this->base= dn2base($ui->dn);
$this->cn= "";
} else {
- $this->base= preg_replace ("/^[^,]+,".normalizePreg(get_ou("componentou"))."/", "", $this->dn);
+ $this->base= preg_replace ("/^[^,]+,".normalizePreg(get_ou("componentRDN"))."/", "", $this->dn);
}
$this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses, true);
/* Save dn for later references */
$message= plugin::check();
$message= array_merge($message,$this->netConfigDNS->check());
- $this->dn= "cn=".$this->cn.",".get_ou('componentou').$this->base;
+ $this->dn= "cn=".$this->cn.",".get_ou('componentRDN').$this->base;
if ($this->cn == "" ){
$message[]= msgPool::required(_("Component name"));
if(preg_match("/cn=dhcp,/",$attrs['dn'])){
continue;
}
- if ($attrs['dn'] != $this->orig_dn){
+ if ($attrs['dn'] != $this->orig_dn && preg_match("/".normalizePreg(get_ou("componentRDN"))."/",$attrs['dn'])){
$message[]= msgPool::duplicated(_("Component name"));
break;
}
*/
if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
$message[] = msgPool::permCreate();
- }elseif($this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
+ }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
$message[] = msgPool::permMove();
}