diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc
index 54df43945a524167170c02e3564d46bac1b1843d..b46e85b29ceb61d2f4b63dd497a77d7c9dbf97de 100644 (file)
function servgeneric (&$config, $dn= NULL, $parent= NULL)
{
/* Check if FAI is activated */
- $tmp = $config->search("faiManagement", "CLASS",array('tabs'));
+ $tmp = $config->search("faiManagement", "CLASS",array('menu','tabs'));
if(!empty($tmp)){
$this->fai_activated = TRUE;
/* Show main page */
$smarty->assign("fai_activated",$this->fai_activated);
- $smarty->assign("netconfig", $this->netConfigDNS->execute());
+
+ $str = $this->netConfigDNS->execute();
+ if(is_object($this->netConfigDNS->dialog)){
+ return($str);
+ }
+ $smarty->assign("netconfig", $str);
$smarty->assign("modes", $this->modes);
return($smarty->fetch (get_template_path('server.tpl', TRUE)));
$message[]= _("The required field 'Server name' is not set.");
}
+ /* Check if given name is a valid host/dns name */
+ if(!is_dns_name($this->cn)){
+ $message[] = _("Please specify a valid name for this object.");
+ }
+
if ($this->orig_dn != $this->dn){
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->base);