Code

Fixed 2template exists" check
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Nov 2006 06:32:54 +0000 (06:32 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Nov 2006 06:32:54 +0000 (06:32 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5203 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_workstationGeneric.inc

index 93d9fb55dbb86e3adc81f3751803d12b3d33fe7e..1d7d556597cf7e00c1389f4dda700d4fcdac3f79 100644 (file)
@@ -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.");