-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert address fields to strings during search (Fixes: #410)
This avoids passing an address as structured data to roundcube's compare_search_value() function, which requires either a string or a list of strings.
- Loading branch information
1 parent
28745e0
commit b4ec289
Showing
4 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -314,6 +314,13 @@ public function searchDataProvider(): array | |
[], [], | ||
2, ["60", "50"] | ||
], | ||
'Single Multivalue DB structured-content field search with contains search' => [ | ||
['address'], ["Kanto"], rcube_addressbook::SEARCH_ALL, true, false, | ||
'name', 'ASC', 1, 10, | ||
0, | ||
[], [], | ||
1, ["60"] | ||
], | ||
'Single Multivalue DB field search with strict search' => [ | ||
['email'], ["[email protected]"], rcube_addressbook::SEARCH_STRICT, true, false, | ||
'name', 'ASC', 1, 10, | ||
|
@@ -372,6 +379,14 @@ public function searchDataProvider(): array | |
[], [], | ||
1, ["60"] | ||
], | ||
'All fields search (no matches)' => [ | ||
'*', 'Birkin22', | ||
rcube_addressbook::SEARCH_ALL, true, false, | ||
'name', 'ASC', 1, 10, | ||
0, | ||
[], [], | ||
0, [] | ||
], | ||
'Two fields OR search' => [ | ||
['organization', 'name'], 'the', | ||
rcube_addressbook::SEARCH_ALL, true, false, | ||
|