diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc
index c1af91cae6cf0ab30ec3c5b09cd73188f35ce75c..8374b3ac9879d60a8a5697bc0c9931cf306ba082 100644 (file)
/* Set base */
if ($this->dn == "new"){
$ui= get_userinfo();
- $this->base= dn2base($ui->dn);
+ $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
+ } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn);
} else {
$this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("terminalRDN"), '/')."/i", "", $this->dn);
}
$smarty->assign("cn", $this->cn);
$smarty->assign("description", $this->description);
- $smarty->assign("staticAddress", "");
/* tell smarty the inherit checkbox state */
$smarty->assign("inheritTimeServer",$this->inheritTimeServer);
$message[]= msgPool::required(_("Name"));
}
+ // Check if a wrong base was supplied
+ if(!$this->baseSelector->checkLastBaseUpdate()){
+ $message[]= msgPool::check_base();
+ }
+
/* Check if given name is a valid host/dns name */
if(!tests::is_dns_name($this->cn) ){
$message[] = msgPool::invalid(_("Name"));