summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 902daa6)
raw | patch | inline | side by side (parent: 902daa6)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Feb 2008 08:13:26 +0000 (08:13 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Feb 2008 08:13:26 +0000 (08:13 +0000) |
-Improved repository detection.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9046 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9046 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc
index 555ddd8b4e02ddefe4527889ddfe781330f06244..ca041d97b073ec04a421c93412f080438a0059ed 100644 (file)
if($force || !isset($this->cache['SERVERS'])){
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
- $ldap->search("(&(FAIrepository=*)(objectClass=FAIrepositoryServer))",array("FAIrepository"));
- $this->cache['SERVERS'] = array();
+ $server_list = get_sub_list("(&(FAIrepository=*)(objectClass=FAIrepositoryServer))",
+ "",get_ou("serverou"),$this->config->current['BASE'],array("FAIrepository"),GL_NO_ACL_CHECK);
+
/* Only add inherit option, if we are part in an object group
*/
if($this->member_of_ogroup){
$this->cache['SERVERS']['auto'] = array();
$sort_by = array("auto");
$server_tmp = array("auto"=>array());
- while($attr = $ldap->fetch()){
+ foreach($server_list as $attr){
if(isset($attr['FAIrepository'])){
for($i = 0 ; $i < $attr['FAIrepository']['count'] ; $i ++ ){
$rep = $attr['FAIrepository'][$i];
if($force || !isset($this->cache['RELEASE_DNS'])){
$this->cache['RELEASE_DNS'] = array();
$fai_ou_parts = preg_replace("/\/.*$/","",$this->FAIrelease);
- $ldap = $this->config->get_ldap_link();
- $ldap->cd($this->config->current['BASE']);
- $ldap->search("(objectClass=FAIbranch)",array("ou"));
- while($attrs = $ldap->fetch()){
+
+ $tmp = get_sub_list("(objectClass=FAIbranch)","",get_ou("faiou"),
+ $this->config->current['BASE'],array("ou"),GL_NO_ACL_CHECK | GL_SUBSEARCH);
+
+ foreach($tmp as $attrs){
if(preg_match("/".normalizePreg(get_ou("faiou"))."/",$attrs['dn'])){
$this->cache['RELEASE_DNS'][$attrs['dn']] = $this->dn_to_release_name($attrs['dn']);
}