From: hickert Date: Thu, 23 Nov 2006 06:32:54 +0000 (+0000) Subject: Fixed 2template exists" check X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=205dbcd14f9fb1c7db3ed6f086dab8979fa0c4f1;p=gosa.git Fixed 2template exists" check git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5203 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc index 93d9fb55d..1d7d55659 100644 --- a/plugins/admin/systems/class_workstationGeneric.inc +++ b/plugins/admin/systems/class_workstationGeneric.inc @@ -345,21 +345,22 @@ class workgeneric extends plugin $ldap->cat($this->dn); }else{ $ldap->search ("(&(cn=".$this->cn.")(objectClass=gotoWorkstation))", array("cn")); - if ($ldap->count() != 0){ - while ($attrs= $ldap->fetch()){ - if (preg_match ("/,ou=incoming,/", $ldap->getDN())){ - continue; - } else { - if ($attrs['dn'] != $this->orig_dn){ - $message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn); - break; - } + } + if ($ldap->count() != 0){ + while ($attrs= $ldap->fetch()){ + if (preg_match ("/,ou=incoming,/", $ldap->getDN())){ + continue; + } else { + if ($attrs['dn'] != $this->orig_dn){ + $message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn); + break; } } } } } + /* Check for valid ntpServer selection */ if((!$this->inheritTimeServer) && (!count($this->gotoNtpServer))){ $message[]= _("There must be at least one NTP server selected, or the inherit mode activated.");