Commit f1bc4ca9 authored by mku's avatar mku

ZP-541 #comment Email server search containing unicode characters does not work

git-svn-id: https://z-push.org/svn/z-push/trunk@1895 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 69eff8c9
...@@ -1563,8 +1563,11 @@ class BackendZarafa implements IBackend, ISearchProvider { ...@@ -1563,8 +1563,11 @@ class BackendZarafa implements IBackend, ISearchProvider {
$searchGreater = strtotime($cpo->GetSearchValueGreater()); $searchGreater = strtotime($cpo->GetSearchValueGreater());
$searchLess = strtotime($cpo->GetSearchValueLess()); $searchLess = strtotime($cpo->GetSearchValueLess());
if (version_compare(phpversion(),'5.3.4') < 0) {
ZLog::Write(LOGLEVEL_WARN, sprintf("Your system's PHP version (%s) might not correctly process unicode strings. Search containing such characters might not return correct results. It is recommended to update to at least PHP 5.3.4. See ZP- for more information.", phpversion()));
}
// split the search on whitespache and look for every word // split the search on whitespache and look for every word
$searchText = preg_split("/\W+/", $searchText); $searchText = preg_split("/\W+/u", $searchText);
$searchProps = array(PR_BODY, PR_SUBJECT, PR_DISPLAY_TO, PR_DISPLAY_CC, PR_SENDER_NAME, PR_SENDER_EMAIL_ADDRESS, PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_EMAIL_ADDRESS); $searchProps = array(PR_BODY, PR_SUBJECT, PR_DISPLAY_TO, PR_DISPLAY_CC, PR_SENDER_NAME, PR_SENDER_EMAIL_ADDRESS, PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_EMAIL_ADDRESS);
$resAnd = array(); $resAnd = array();
foreach($searchText as $term) { foreach($searchText as $term) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment