From ffdde5dab18f9cb01a56798a0b9e3b7776035b33 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 28 Jul 2009 06:08:37 +0000 Subject: [PATCH] Updated addressbook. -Readable departments were not listed in the department list. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13954 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../addons/addressbook/class_addressbook.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc b/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc index f3675a5c9..b81933e1d 100644 --- a/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc +++ b/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc @@ -502,8 +502,18 @@ class addressbook extends plugin $smarty->assign("search_for", $this->search_for); $smarty->assign("object_type", $this->object_type); + /* Create list of readable departments */ + $deps = array(); + foreach($this->config->idepartments as $dn => $name){ + if( $this->acl_is_readable($dn)){ + $deps[$dn] = $name; + } + } + + + $this->base = $phonefilter['search_base']; - $smarty->assign("deplist", $this->get_allowed_bases()); + $smarty->assign("deplist", $deps); $smarty->assign("depselect", $this->search_base); $smarty->assign("global", $phonefilter['global']); $smarty->assign("organizational", $phonefilter['organizational']); -- 2.30.2