projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
852cd06
)
Make sure we run IMAP search queries in the proper charset
author
Michael M Slusarz
<slusarz@curecanti.org>
Mon, 26 Apr 2010 21:32:31 +0000
(15:32 -0600)
committer
Michael M Slusarz
<slusarz@curecanti.org>
Mon, 26 Apr 2010 21:33:25 +0000
(15:33 -0600)
imp/lib/Search.php
patch
|
blob
|
history
diff --git
a/imp/lib/Search.php
b/imp/lib/Search.php
index
8d86836
..
001185f
100644
(file)
--- a/
imp/lib/Search.php
+++ b/
imp/lib/Search.php
@@
-340,7
+340,14
@@
class IMP_Search
}
}
- return $GLOBALS['imp_imap']->ob()->search($mailbox, $query, $opts);
+ /* Make sure we search in the proper charset. */
+ $new_query = clone $query;
+ $imap_charset = $GLOBALS['imp_imap']->ob()->validSearchCharset('UTF-8')
+ ? 'UTF-8'
+ : 'US-ASCII';
+ $new_query->charset($imap_charset, array('Horde_String', 'convertCharset'));
+
+ return $GLOBALS['imp_imap']->ob()->search($mailbox, $new_query, $opts);
}
/**