From: hickert Date: Fri, 26 Jan 2007 05:19:51 +0000 (+0000) Subject: Updated Winstation save: X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=32e8775e7e268170aafa198c43191c495a85156d;p=gosa.git Updated Winstation save: - 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 --- diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 59d9cb01e..afd96c855 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -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; diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index 1e42b6a31..3f376951e 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -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)); } diff --git a/plugins/admin/systems/class_winGeneric.inc b/plugins/admin/systems/class_winGeneric.inc index 177c4e5a4..4809e74e2 100644 --- a/plugins/admin/systems/class_winGeneric.inc +++ b/plugins/admin/systems/class_winGeneric.inc @@ -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 */ diff --git a/plugins/admin/systems/tabs_winstation.inc b/plugins/admin/systems/tabs_winstation.inc index 95cf21cb3..429b8035d 100644 --- a/plugins/admin/systems/tabs_winstation.inc +++ b/plugins/admin/systems/tabs_winstation.inc @@ -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){