From: hickert Date: Mon, 21 May 2007 13:26:31 +0000 (+0000) Subject: Fixed divlists X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=732ac05a612573b2d37490bc7121e4621d14556c;p=gosa.git Fixed divlists git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6426 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/gofax/blocklists/class_divListBlocklists.inc b/plugins/gofax/blocklists/class_divListBlocklists.inc index d96120e50..0d09ea54b 100755 --- a/plugins/gofax/blocklists/class_divListBlocklists.inc +++ b/plugins/gofax/blocklists/class_divListBlocklists.inc @@ -80,18 +80,24 @@ class divListBlocklist extends MultiSelectWindow $base = $this->config->current['BASE']; /* Add base */ - $deps[] = array("dn"=>$this->config->current['BASE']); - $deps= array_merge($deps,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base, + $tmp = array(); + $tmp[] = array("dn"=>$this->config->current['BASE']); + $tmp= array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base, array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH)); + $deps = array(); + foreach($tmp as $tm){ + $deps[$tm['dn']] = $tm['dn']; + } + /* Load possible departments */ - $first = ""; - $found = FALSE; $ui= get_userinfo(); $tdeps= $ui->get_module_departments("gofaxlist"); $ids = $this->config->idepartments; - foreach($deps as $dep){ - if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){ + $first = ""; + $found = FALSE; + foreach($ids as $dep => $name){ + if(isset($deps[$dep]) && in_array_ics($dep, $tdeps)){ /* Keep first base dn in mind, we could need this * info if no valid base was found @@ -99,13 +105,13 @@ class divListBlocklist extends MultiSelectWindow if(empty($first)) { $first = $dep['dn']; } - - $value = $ids[$dep['dn']]; - if ($this->selectedBase == $dep['dn']){ + + $value = $ids[$dep]; + if ($this->selectedBase == $dep){ $found = TRUE; - $options.= ""; + $options.= ""; } else { - $options.= ""; + $options.= ""; } } } diff --git a/plugins/gofon/conference/class_divListConferences.inc b/plugins/gofon/conference/class_divListConferences.inc index d1afa402f..7819f6761 100755 --- a/plugins/gofon/conference/class_divListConferences.inc +++ b/plugins/gofon/conference/class_divListConferences.inc @@ -78,20 +78,25 @@ class divListConference extends MultiSelectWindow $base = $this->config->current['BASE']; /* Add base */ - $deps[] = array("dn"=>$this->config->current['BASE']); - $deps= array_merge($deps,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base, + $tmp = array(); + $tmp[] = array("dn"=>$this->config->current['BASE']); + $tmp= array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base, array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH)); + $deps = array(); + foreach($tmp as $tm){ + $deps[$tm['dn']] = $tm['dn']; + } + /* Load possible departments */ - $ui = get_userinfo(); + $ui= get_userinfo(); + $tdeps= $ui->get_module_departments("gofonconference"); + $ids = $this->config->idepartments; $first = ""; $found = FALSE; - $tdeps = $ui->get_module_departments("gofonconference"); - $ids = $this->config->idepartments; + foreach($ids as $dep => $name){ + if(isset($deps[$dep]) && in_array_ics($dep, $tdeps)){ - foreach($deps as $dep){ - if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){ - /* Keep first base dn in mind, we could need this * info if no valid base was found */ @@ -99,12 +104,12 @@ class divListConference extends MultiSelectWindow $first = $dep['dn']; } - $value = $ids[$dep['dn']]; - if ($this->selectedBase == $dep['dn']){ + $value = $ids[$dep]; + if ($this->selectedBase == $dep){ $found = TRUE; - $options.= ""; + $options.= ""; } else { - $options.= ""; + $options.= ""; } } } diff --git a/plugins/gofon/macro/class_divListMacros.inc b/plugins/gofon/macro/class_divListMacros.inc index 6d8284c5b..8fc64b956 100755 --- a/plugins/gofon/macro/class_divListMacros.inc +++ b/plugins/gofon/macro/class_divListMacros.inc @@ -78,18 +78,24 @@ class divListMacro extends MultiSelectWindow $found = FALSE; /* Add base */ - $deps[] = array("dn"=>$this->config->current['BASE']); - $deps= array_merge($deps,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base, + $tmp = array(); + $tmp[] = array("dn"=>$this->config->current['BASE']); + $tmp= array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base, array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH)); + $deps = array(); + foreach($tmp as $tm){ + $deps[$tm['dn']] = $tm['dn']; + } + /* Load possible departments */ $ui= get_userinfo(); $tdeps= $ui->get_module_departments("gofonmacro"); - $ids = $this->config->idepartments; - - foreach($deps as $dep){ - if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){ + $first = ""; + $found = FALSE; + foreach($ids as $dep => $name){ + if(isset($deps[$dep]) && in_array_ics($dep, $tdeps)){ /* Keep first base dn in mind, we could need this * info if no valid base was found @@ -98,12 +104,12 @@ class divListMacro extends MultiSelectWindow $first = $dep['dn']; } - $value = $ids[$dep['dn']]; - if ($this->selectedBase == $dep['dn']){ - $options.= ""; + $value = $ids[$dep]; + if ($this->selectedBase == $dep){ $found = TRUE; + $options.= ""; } else { - $options.= ""; + $options.= ""; } } }