alecpl
2010-06-15 f19d86b96da4a73efa88042dd0bcf0da1a214762
program/include/rcube_imap_generic.php
@@ -645,7 +645,6 @@
       // RFC3501 [7.1] optional CAPABILITY response
       if (preg_match('/\[CAPABILITY ([^]]+)\]/i', $line, $matches)) {
          $this->capability = explode(' ', strtoupper($matches[1]));
          $this->capability_readed = true;
       }
       $this->message .= $line;
@@ -1777,12 +1776,11 @@
             $mode = 0;
       }
         $reply_key = '* ' . $id;
       $result = false;
       // format request
      $key     = 'ftch0';
      $request = $key . ($is_uid ? ' UID' : '') . " FETCH $id (BODY.PEEK[$part])";
         $reply_key = '* ' . $id;
      $key       = 'ftch0';
      $request   = $key . ($is_uid ? ' UID' : '') . " FETCH $id (BODY.PEEK[$part])";
       // send request
      if (!$this->putLine($request)) {
          return false;
@@ -1794,7 +1792,8 @@
             $a    = explode(' ', $line);
         } while (!($end = $this->startsWith($line, $key, true)) && $a[2] != 'FETCH');
         $len = strlen($line);
         $len    = strlen($line);
       $result = false;
      // handle empty "* X FETCH ()" response
       if ($line[$len-1] == ')' && $line[$len-2] != '(') {
@@ -1890,7 +1889,7 @@
                 $line = $this->readLine(1024);
         } while (!$this->startsWith($line, $key, true));
         if ($result) {
         if ($result !== false) {
          if ($file) {
             fwrite($file, $result);
            } else if ($print) {