summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64d8677)
raw | patch | inline | side by side (parent: 64d8677)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Nov 2010 08:47:46 +0000 (08:47 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Nov 2010 08:47:46 +0000 (08:47 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20331 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/systems/admin/systems/class_servGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc
index 332b497118ab0871ef19e3ae8ad771ad386512ed..890fbf07279b46b2ea48fcf4b57153a2311e4ade 100644 (file)
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
if ($attrs['dn'] != $this->orig_dn){
- if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$attrs['dn']) && preg_match("/,".preg_quote(get_ou("servgeneric", "serverRDN"), '/')."/i",$attrs['dn'])){
+
+ $matchesArp = FALSE;
+ if(class_available("ArpNewDevice")){
+ $matchesArp = preg_match("/,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$attrs['dn']);
+ }
+ $matchesServer = preg_match("/,".preg_quote(get_ou("servgeneric", "serverRDN"), '/')."/i",$attrs['dn']);
+
+ if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !$matchesArp && $matchesServer){
$message[]= msgPool::duplicated(_("Server name"));
break;
}
}
/* Warn the user, that this host is currently installing */
- if($this->currently_installing && !$this->currently_installing_warned && !preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$this->orig_dn)){
+ if($this->currently_installing &&
+ !$this->currently_installing_warned &&
+ !preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $this->orig_dn)){
/* Force aborting without message dialog */
$message[] = "";