From 205dbcd14f9fb1c7db3ed6f086dab8979fa0c4f1 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 23 Nov 2006 06:32:54 +0000 Subject: [PATCH] Fixed 2template exists" check git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5203 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/class_workstationGeneric.inc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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."); -- 2.30.2