Skip to content

Commit

Permalink
[mms] Make case-insensitive API e-mail search work on non-ASCII data …
Browse files Browse the repository at this point in the history
…(Request #12480).
  • Loading branch information
slusarz committed Aug 5, 2014
1 parent b491567 commit 4c64ffc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions turba/docs/CHANGES
Expand Up @@ -2,6 +2,8 @@
v4.2.2-git
----------

[mms] Make case-insensitive API e-mail search work on non-ASCII data (Request
#12480).
[jan] Fix listing group members that contain colons in their IDs.


Expand Down
6 changes: 3 additions & 3 deletions turba/lib/Api.php
Expand Up @@ -1264,13 +1264,13 @@ public function search($names = null, array $opts = array())
($attributes[$key]['type'] == 'email')) {
$e_val = $ob->getValue($key);

/* Bug #12480: Don't return email if it
/* Ticket #12480: Don't return email if it
* doesn't contain the search string, since
* an entry can contain multiple e-mail
* fields. Return all e-mails if it
* occurrs in the name. */
if ((stripos($e_val, $name) !== false) ||
(stripos($display_name, $name) !== false)) {
if ((Horde_String::ipos($e_val, $name) !== false) ||
(Horde_String::ipos($display_name, $name) !== false)) {
// Multiple addresses support
$email->add($rfc822->parseAddressList($e_val, array(
'limit' => (isset($attributes[$key]['params']) && is_array($attributes[$key]['params']) && !empty($attributes[$key]['params']['allow_multi'])) ? 0 : 1
Expand Down
4 changes: 3 additions & 1 deletion turba/package.xml
Expand Up @@ -39,6 +39,7 @@
</stability>
<license uri="http://www.horde.org/licenses/apache">ASL</license>
<notes>
* [mms] Make case-insensitive API e-mail search work on non-ASCII data (Request #12480).
* [jan] Fix listing group members that contain colons in their IDs.
</notes>
<contents>
Expand Down Expand Up @@ -787,7 +788,7 @@
<package>
<name>Horde_Util</name>
<channel>pear.horde.org</channel>
<min>2.0.0</min>
<min>2.5.0</min>
<max>3.0.0alpha1</max>
<exclude>3.0.0alpha1</exclude>
</package>
Expand Down Expand Up @@ -1913,6 +1914,7 @@
<date>2014-08-04</date>
<license uri="http://www.horde.org/licenses/apache">ASL</license>
<notes>
* [mms] Make case-insensitive API e-mail search work on non-ASCII data (Request #12480).
* [jan] Fix listing group members that contain colons in their IDs.
</notes>
</release>
Expand Down

0 comments on commit 4c64ffc

Please sign in to comment.