From c8a495898a647984ee9248ac5619a6cce9ca08bf Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 1 Jun 2010 11:38:49 +0000 Subject: [PATCH] Updated dyn group git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18814 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../dyngroup/addons/dyngroup/classDynamicLdapGroup.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gosa-plugins/dyngroup/addons/dyngroup/classDynamicLdapGroup.inc b/gosa-plugins/dyngroup/addons/dyngroup/classDynamicLdapGroup.inc index b8bf59797..656946795 100644 --- a/gosa-plugins/dyngroup/addons/dyngroup/classDynamicLdapGroup.inc +++ b/gosa-plugins/dyngroup/addons/dyngroup/classDynamicLdapGroup.inc @@ -48,6 +48,8 @@ class DynamicLdapGroup extends plugin public $labeledURI = array(); public $labeledURIparsed = array(); public $labeledURIdefault = 'ldap:///dc=example,dc=com?memberUid?sub?(objectClass=posixGroup)'; + + public $scopes = array('base','one','sub'); /** * Store values of memberUrl. @@ -156,7 +158,7 @@ class DynamicLdapGroup extends plugin // $smarty = get_smarty(); $smarty->assign('labeledURIparsed', $this->labeledURIparsed); - $smarty->assign('scopes', array('base','one','sub')); + $smarty->assign('scopes', $this->scopes); $display .= $smarty->fetch(get_template_path('dyngroup.tpl', TRUE, dirname(__FILE__))); return $display; } @@ -226,7 +228,8 @@ class DynamicLdapGroup extends plugin // Build up labeledUri entries $this->labeledURI = array(); foreach($this->labeledURIparsed as $entry){ - $this->labeledURI[] = "{$entry['base']}?{$entry['attr']}?{$entry['scope']}?{$entry['filter']}"; + $scope = $this->scopes[$entry['scope']]; + $this->labeledURI[] = "{$entry['base']}?{$entry['attr']}?{$scope}?{$entry['filter']}"; } parent::save(); @@ -234,7 +237,6 @@ class DynamicLdapGroup extends plugin $ldap = $this->config->get_ldap_link(); $ldap->cd($this->dn); $ldap->modify($this->attrs); - if(!$ldap->success()){ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class())); } -- 2.30.2