Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2017-05-15 18:23:06 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2017-05-15 18:23:06 +0300
commit46be5f3f294d06b311921d6b1c494922686b2627 (patch)
tree7d42d244ed584daf900b7f0d26ec6197d938ea6c /lib/Mailbox.php
parent77f161cc49c262e27e76ee1fab34de438f78305c (diff)
Only limit search to cursor time if it's actually set
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Mailbox.php')
-rw-r--r--lib/Mailbox.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Mailbox.php b/lib/Mailbox.php
index 4dde6514d..0db17b06d 100644
--- a/lib/Mailbox.php
+++ b/lib/Mailbox.php
@@ -107,7 +107,9 @@ class Mailbox implements IMailBox {
if ($this->getSpecialRole() !== 'trash') {
$query->flag(Horde_Imap_Client::FLAG_DELETED, false);
}
- $query->dateSearch($cursor, Horde_Imap_Client_Search_Query::DATE_SINCE);
+ if (!is_null($cursor)) {
+ $query->dateSearch($cursor, Horde_Imap_Client_Search_Query::DATE_SINCE);
+ }
try {
$result = $this->conn->search($this->mailBox, $query, [
@@ -119,7 +121,7 @@ class Mailbox implements IMailBox {
// maybe the server's advertisment of SORT was a fake
// see https://github.com/nextcloud/mail/issues/50
// try again without SORT
- return $this->getFetchIds();
+ return $this->getFetchIds($cursor);
}
return array_reverse($result['match']->ids);