From: hickert Date: Tue, 1 Jun 2010 13:54:38 +0000 (+0000) Subject: Updated bracket detection X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5a46e678264ec572a0372cf0e5859cff92a7a8f0;p=gosa.git Updated bracket detection git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18824 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/addons/dyngroup/classDynamicLdapGroup.inc b/gosa-core/plugins/addons/dyngroup/classDynamicLdapGroup.inc index 6fcf63bb4..d56e85ace 100644 --- a/gosa-core/plugins/addons/dyngroup/classDynamicLdapGroup.inc +++ b/gosa-core/plugins/addons/dyngroup/classDynamicLdapGroup.inc @@ -124,6 +124,8 @@ class DynamicLdapGroup extends plugin // A filter is required if(empty($entry['filter'])){ $messages[] = msgPool::required(_("Filter")." {$nr}"); + }elseif(!preg_match("/^\(/", $entry['filter'])){ + $messages[] = msgPool::invalid(_("Filter")." {$nr}", $entry['filter'],'', '(objectClass=gosaAccount)'." - "._("Surrounding brakets are required!")); }else{ // Check if filter is valid @@ -241,7 +243,6 @@ class DynamicLdapGroup extends plugin foreach($this->labeledURIparsed as $entry){ $scope = $this->scopes[$entry['scope']]; $filter = $entry['filter']; - $filter = '('.trim($filter, '() ').')'; $this->labeledURI[] = "{$entry['base']}?{$entry['attr']}?{$scope}?{$filter}"; } $this->labeledURI = array_unique($this->labeledURI);