summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-05-27 06:41:46 +0000
committerthomascube <thomas@roundcube.net>2008-05-27 06:41:46 +0000
commitbf0cb98701a616ea78ffe2579d9e2efa1ae9d3d2 (patch)
tree5742705a014d5c1f57557af6713c0462a495a575
parent05134125b2e639e62535944d05fe9b7796a7f176 (diff)
Moved RoundCube functionality from lib to rcube_imap class; removed debug log
-rw-r--r--program/include/rcube_imap.php9
-rw-r--r--program/lib/imap.inc10
2 files changed, 7 insertions, 12 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index f228a5364..e9aee3772 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -1414,12 +1414,15 @@ class rcube_imap
// send expunge command in order to have the moved message
// really deleted from the source mailbox
- if ($moved)
- {
+ if ($moved) {
$this->_expunge($from_mbox, FALSE);
$this->_clear_messagecount($from_mbox);
$this->_clear_messagecount($to_mbox);
- }
+ }
+ // moving failed
+ else if (rcmail::get_instance()->config->get('delete_always', false)) {
+ return iil_C_Delete($this->conn, $from_mbox, join(',', $a_mids));
+ }
// remove message ids from search set
if ($moved && $this->search_set && $from_mbox == $this->mailbox)
diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index 8ea4fbd12..4456a229d 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -1907,9 +1907,7 @@ function iil_C_ModFlag(&$conn, $mailbox, $messages, $flag, $mod) {
if (iil_C_Select($conn, $mailbox)) {
$c = 0;
- $_line = "flg STORE $messages " . $mod . "FLAGS (" . $flag . ")\r\n";
- trigger_error($_line, E_USER_WARNING);
- fputs($fp, $_line);
+ fputs($fp, "flg STORE $messages " . $mod . "FLAGS (" . $flag . ")\r\n");
do {
$line=chop(iil_ReadLine($fp, 100));
if ($line[0] == '*') {
@@ -2048,8 +2046,6 @@ function iil_C_Search(&$conn, $folder, $criteria) {
}
function iil_C_Move(&$conn, $messages, $from, $to) {
- global $CONFIG;
-
$fp = $conn->fp;
if (!$from || !$to) {
@@ -2059,10 +2055,6 @@ function iil_C_Move(&$conn, $messages, $from, $to) {
if ($r==0) {
return iil_C_Delete($conn, $from, $messages);
}
- // Copy failed
- if (isset($CONFIG['delete_always']) && $CONFIG['delete_always'] === true) {
- return iil_C_Delete($conn, $from, $messages);
- }
return $r;
}