summaryrefslogtreecommitdiff
path: root/lib/kolab_sync_data_email.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-09-03 07:25:42 (GMT)
committerAleksander Machniak <alec@alec.pl>2012-09-03 07:25:42 (GMT)
commit748290b81482bbd540de25a1f6c2584179ff1ab3 (patch)
treee16bcc892355c64befd1f2a6310fb1c3c5b1ce8b /lib/kolab_sync_data_email.php
parenta461edbb8f456f3252cf1f9b416f23fb1f8ea7cd (diff)
downloadkolab-syncroton-748290b81482bbd540de25a1f6c2584179ff1ab3.tar.gz
Fix searching email by Received date
Diffstat (limited to 'lib/kolab_sync_data_email.php')
-rw-r--r--lib/kolab_sync_data_email.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/kolab_sync_data_email.php b/lib/kolab_sync_data_email.php
index f36c42d..3e97dae 100644
--- a/lib/kolab_sync_data_email.php
+++ b/lib/kolab_sync_data_email.php
@@ -806,21 +806,20 @@ class kolab_sync_data_email extends kolab_sync_data implements Syncroton_Data_ID
&& !empty($query['and']['greaterThan']['dateReceived'])
&& !empty($query['and']['greaterThan']['value'])
) {
- // @TODO: date format ?
- $search_str .= ' SINCE ' . trim($query['and']['greaterThan']['value']);
+ $search_str .= ' SINCE ' . $query['and']['greaterThan']['value']->format('d-M-Y');
}
if (!empty($query['and']['lessThan'])
&& !empty($query['and']['lessThan']['dateReceived'])
&& !empty($query['and']['lessThan']['value'])
) {
- // @TODO: date format ?
- $search_str .= ' BEFORE ' . trim($query['and']['lessThan']['value']);
+ $search_str .= ' BEFORE ' . $query['and']['lessThan']['value']->format('d-M-Y');
}
}
if ($search !== null) {
// @FIXME: should we use TEXT/BODY search?
+ // ActiveSync protocol specification says "indexed fields"
$search_keys = array('SUBJECT', 'TO', 'FROM', 'CC');
$search_str .= str_repeat(' OR', count($search_keys)-1);
foreach ($search_keys as $key) {