alecpl
2010-10-04 103ddcde87f77da28fa2c1f7942763db1c65b34a
program/include/rcube_imap_generic.php
@@ -4,8 +4,8 @@
 +-----------------------------------------------------------------------+
 | program/include/rcube_imap_generic.php                                |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005-2010, RoundCube Dev. - Switzerland                 |
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2005-2010, Roundcube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 | PURPOSE:                                                              |
@@ -708,7 +708,7 @@
    function close()
    {
       if ($this->putLine("I LOGOUT")) {
       if ($this->logged && $this->putLine("I LOGOUT")) {
          if (!feof($this->fp))
             fgets($this->fp, 1024);
       }
@@ -1059,7 +1059,7 @@
       $message_set = $this->compressMessageSet($message_set);
       if ($add)
          $add = ' '.strtoupper(trim($add));
          $add = ' '.trim($add);
       /* FETCH uid, size, flags and headers */
       $key       = 'FH12';
@@ -1067,11 +1067,8 @@
       $request .= "(UID RFC822.SIZE FLAGS INTERNALDATE ";
       if ($bodystr)
          $request .= "BODYSTRUCTURE ";
       $request .= "BODY.PEEK[HEADER.FIELDS ";
       $request .= "(DATE FROM TO SUBJECT REPLY-TO IN-REPLY-TO CC BCC ";
       $request .= "CONTENT-TRANSFER-ENCODING CONTENT-TYPE MESSAGE-ID ";
       $request .= "REFERENCES DISPOSITION-NOTIFICATION-TO X-PRIORITY ";
       $request .= "X-DRAFT-INFO".$add.")])";
       $request .= "BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT CONTENT-TYPE ";
       $request .= "LIST-POST DISPOSITION-NOTIFICATION-TO".$add.")])";
       if (!$this->putLine($request)) {
          return false;
@@ -1084,7 +1081,7 @@
                break;
          if (preg_match('/^\* ([0-9]+) FETCH/', $line, $m)) {
             $id = $m[1];
             $id = intval($m[1]);
             $result[$id]            = new rcube_mail_header;
             $result[$id]->id        = $id;
@@ -1111,9 +1108,9 @@
                if ($parts_count>=6) {
                   for ($i=0; $i<$parts_count; $i=$i+2) {
                      if ($a[$i] == 'UID')
                         $result[$id]->uid = $a[$i+1];
                         $result[$id]->uid = intval($a[$i+1]);
                      else if ($a[$i] == 'RFC822.SIZE')
                         $result[$id]->size = $a[$i+1];
                         $result[$id]->size = intval($a[$i+1]);
                      else if ($a[$i] == 'INTERNALDATE')
                         $time_str = $a[$i+1];
                      else if ($a[$i] == 'FLAGS')