Code

Added colon to avoid classes with release names beeing matched.
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 30 Oct 2009 09:15:27 +0000 (09:15 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 30 Oct 2009 09:15:27 +0000 (09:15 +0000)
Corrected identation

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14713 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/systems/services/repository/class_servRepository.inc

index 6b5a7e279495f05692463cabb93d938d5939e7ad..9dd3e82563b96ced92cb93aa51e2212a22778c04 100644 (file)
@@ -126,25 +126,21 @@ class servrepository extends goService
           $ldap->cd ($this->config->current['BASE']);
 
           $ldap->search("(&(objectClass=gotoWorkstation)(objectClass=FAIobject)(FAIdebianMirror=".$url."))",array("cn","FAIclass"));
+          $found= false;
           if ($ldap->count() != 0){
             $obj= array();
-            $found= false;
             while($attrs = $ldap->fetch()){
               foreach($attrs['FAIclass'] as $class){
-                if(preg_match("/".str_replace("/","\/",$release)."$/i",$class)){
+                if(preg_match("/:".str_replace("/","\/",$release)."$/i",$class)){
                   $obj[$ldap->getDN()]= $attrs['cn'][0];
                   $found= true;
                 }
               }
             }
+          }
 
-            if ($found){
-              msg_dialog::display(_("Error"), msgPool::stillInUse(_("FAI release"), msgPool::buildList($obj)), ERROR_DIALOG);
-            }else{
-              if(isset($this->repositories[$value])){
-                unset($this->repositories[$value]);
-              }
-            }
+          if ($found){
+            msg_dialog::display(_("Error"), msgPool::stillInUse(_("FAI release"), msgPool::buildList($obj)), ERROR_DIALOG);
           }else{
             if(isset($this->repositories[$value])){
               unset($this->repositories[$value]);