support type filters without parenthesis
This commit is contained in:
parent
72952501fc
commit
59ad00f9d2
|
@ -107,8 +107,13 @@ function get_ldap_filter($scope) {
|
||||||
// add type filter
|
// add type filter
|
||||||
$typeSettings = $_SESSION['config']->get_typeSettings();
|
$typeSettings = $_SESSION['config']->get_typeSettings();
|
||||||
if (isset($typeSettings['filter_' . $scope]) && ($typeSettings['filter_' . $scope] != '')) {
|
if (isset($typeSettings['filter_' . $scope]) && ($typeSettings['filter_' . $scope] != '')) {
|
||||||
|
if (strpos($typeSettings['filter_' . $scope], '(') === 0) {
|
||||||
$filters['and'][] = $typeSettings['filter_' . $scope];
|
$filters['and'][] = $typeSettings['filter_' . $scope];
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$filters['and'][] = '(' . $typeSettings['filter_' . $scope] . ')';
|
||||||
|
}
|
||||||
|
}
|
||||||
// collapse AND filters
|
// collapse AND filters
|
||||||
$finalFilter = '';
|
$finalFilter = '';
|
||||||
if (sizeof($filters['and']) < 2) {
|
if (sizeof($filters['and']) < 2) {
|
||||||
|
|
Loading…
Reference in New Issue