summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-03-15 10:50:26 +0100
committerAleksander Machniak <alec@alec.pl>2013-03-15 10:50:26 +0100
commitea98ec0939532d6539689524414b9eeb1c6cd0fc (patch)
treeb28c9c3126218bf9347fd4ab708c703c1e75e361 /program/lib/Roundcube
parentf1114237556d32bb217c5dcbb0aa7db2d081608b (diff)
Fixed MOVE command result handling
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r--program/lib/Roundcube/rcube_imap_generic.php31
1 files changed, 16 insertions, 15 deletions
diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php
index 8532cf8ad..2ac1355fd 100644
--- a/program/lib/Roundcube/rcube_imap_generic.php
+++ b/program/lib/Roundcube/rcube_imap_generic.php
@@ -2010,31 +2010,32 @@ class rcube_imap_generic
unset($this->data['STATUS:'.$to]);
unset($this->data['STATUS:'.$from]);
- $r = $this->execute('UID MOVE', array(
+ $result = $this->execute('UID MOVE', array(
$this->compressMessageSet($messages), $this->escape($to)),
self::COMMAND_NORESPONSE);
+
+ return ($result == self::ERROR_OK);
}
+
// use COPY + STORE +FLAGS.SILENT \Deleted + EXPUNGE
- else {
- $r = $this->copy($messages, $from, $to);
+ $result = $this->copy($messages, $from, $to);
- if ($r) {
- // Clear internal status cache
- unset($this->data['STATUS:'.$from]);
+ if ($result) {
+ // Clear internal status cache
+ unset($this->data['STATUS:'.$from]);
- $r = $this->flag($from, $messages, 'DELETED');
+ $result = $this->flag($from, $messages, 'DELETED');
- if ($messages == '*') {
- // CLOSE+SELECT should be faster than EXPUNGE
- $this->close();
- }
- else {
- $this->expunge($from, $messages);
- }
+ if ($messages == '*') {
+ // CLOSE+SELECT should be faster than EXPUNGE
+ $this->close();
+ }
+ else {
+ $this->expunge($from, $messages);
}
}
- return $r;
+ return $result;
}
/**