mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-04 15:24:35 +01:00
restrict addressbookprovider-search to its addressbook in oc7
backport of #857
This commit is contained in:
parent
72dcf24061
commit
ab5fa78126
@ -115,10 +115,12 @@ class AddressbookProvider implements \OCP\IAddressBook {
|
|||||||
INNER JOIN `$addrTable`
|
INNER JOIN `$addrTable`
|
||||||
ON `$addrTable`.id = `$contTable`.addressbookid
|
ON `$addrTable`.id = `$contTable`.addressbookid
|
||||||
WHERE
|
WHERE
|
||||||
(
|
`$contTable`.addressbookid = ? AND
|
||||||
|
(
|
||||||
SQL;
|
SQL;
|
||||||
|
|
||||||
$params = array();
|
$params = array();
|
||||||
|
$params[] = $this->addressBook->getMetaData()['id'];
|
||||||
foreach ($searchProperties as $property) {
|
foreach ($searchProperties as $property) {
|
||||||
$params[] = $property;
|
$params[] = $property;
|
||||||
$params[] = '%' . $pattern . '%';
|
$params[] = '%' . $pattern . '%';
|
||||||
|
Loading…
Reference in New Issue
Block a user