Code

Updated Winstation save:
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Jan 2007 05:19:51 +0000 (05:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Jan 2007 05:19:51 +0000 (05:19 +0000)
- Base wasn't detected correctly
- Was ever stored in ou=winstations

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

plugins/admin/systems/class_printGeneric.inc
plugins/admin/systems/class_systemManagement.inc
plugins/admin/systems/class_winGeneric.inc
plugins/admin/systems/tabs_winstation.inc

index 59d9cb01ebd975fe55dc20b49bfd70d1d8b21858..afd96c8552a53d6d416333ea4d60c61c620d4508 100644 (file)
@@ -685,8 +685,6 @@ class printgeneric extends plugin
 
     if($this->BelongsTo == "Workstation"){
       $this->dn= preg_replace("/ou=workstations,/","ou=printers,",$this->dn);
-      $mac = $this->parent->by_object['workgeneric']->netConfigDNS->macAddress;
-      $this->netConfigDNS->macAddress = $mac;
     }
     
     if(!$this->is_account) return;
index 1e42b6a31198c536ee387695a8f8312f05d1d2cd..3f376951e09d57f4f79ce32096734a66a163ab26 100644 (file)
@@ -698,14 +698,14 @@ class systems extends plugin
       if($this->DivListSystem->$checkBox){
         if($this->DivListSystem->SubSearch){
           if($oc['CLASS'] != ""){
-            $filter = "(|(&".$userregex."(objectClass=".$oc['CLASS'].")(cn=".$this->DivListSystem->Regex.")))";
+            $filter = "(&".$userregex."(objectClass=".$oc['CLASS'].")(cn=".$this->DivListSystem->Regex."))";
             $res = array_merge($res,get_list($filter,$this->ui->subtreeACL, $base,
                   array("cn", "description", "macAddress", "objectClass", "sambaDomainName", "FAIstate"), GL_NONE | GL_SUBSEARCH | GL_SIZELIMIT));
           }
         }else{
           /* User filter? */
           if($oc['CLASS'] != ""){
-            $filter = "(|(&".$userregex."(objectClass=".$oc['CLASS'].")(cn=".$this->DivListSystem->Regex.")))";
+            $filter = "(&".$userregex."(objectClass=".$oc['CLASS'].")(cn=".$this->DivListSystem->Regex."))";
             $res = array_merge($res,get_list($filter,$this->ui->subtreeACL, $oc['TREE'].$base,
                   array("cn", "description", "macAddress", "objectClass", "sambaDomainName", "FAIstate"), GL_NONE | GL_SIZELIMIT));
           }
index 177c4e5a4d25b45125a389de37178917695384d7..4809e74e2e22fecb68aa4335309b500058f5bdae 100644 (file)
@@ -57,7 +57,7 @@ class wingeneric extends plugin
       $this->base= dn2base($ui->dn);
       $this->cn= "";
     } else {
-      $this->base= preg_replace ("/^[^,]+,[^,]+,[^,]+,/", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".normalizePreg(get_winstations_ou())."/", "", $this->dn);
     }
 
     /* Save dn for later references */
index 95cf21cb3e4c9e2a9c8e60bcbd412427d95e3e7f..429b8035db7314275d6246a92395564020bbeae9 100644 (file)
@@ -19,7 +19,7 @@ class wintabs extends tabs
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
     $baseobject= $this->by_object['wingeneric'];
-    $this->dn= "uid=$baseobject->cn,ou=winstations,ou=systems,".$baseobject->base;
+    $this->dn= "uid=$baseobject->cn,".get_winstations_ou().$baseobject->base;
     $baseobject->dn= $this->dn;
 
     foreach ($this->by_object as $key => $obj){