Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(Addressbook/Filter): make empty list role member filter work
Browse files Browse the repository at this point in the history
Change-Id: Ia30017ef40f36bfaffebed923a8e37ab5ab6f25a
Reviewed-on: http://gerrit.tine20.com/customers/18663
Tested-by: Jenkins CI (http://ci.tine20.com/) <tine20-jenkins@metaways.de>
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
  • Loading branch information
pschuele committed Dec 8, 2020
1 parent 9783f33 commit 4770b38
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tine20/Addressbook/Model/ListRoleMemberFilter.php
Expand Up @@ -40,7 +40,11 @@ public function appendFilterSql($_select, $_backend)
/* on */ $db->quoteIdentifier($correlationName . '.contact_id') . ' = ' . $db->quoteIdentifier('addressbook.id'),
/* select */ array()
);
$_select->where($db->quoteIdentifier($correlationName . '.list_role_id') . ' IN (?)', (array) $this->_value);
if (empty($this->_value)) {
$_select->where($db->quoteIdentifier($correlationName . '.list_role_id') . ' IS NULL');
} else {
$_select->where($db->quoteIdentifier($correlationName . '.list_role_id') . ' IN (?)', (array)$this->_value);
}
}

/**
Expand Down

0 comments on commit 4770b38

Please sign in to comment.