alecpl
2010-05-18 1d51658ba5acce01cd2e6bb30579aaccdbc41214
program/include/rcube_imap_generic.php
@@ -242,11 +242,17 @@
    }
    // don't use it in loops, until you exactly know what you're doing
    private function readReply()
    private function readReply($untagged=null)
    {
       do {
          $line = trim($this->readLine(1024));
            // store untagged response lines
          if ($line[0] == '*')
                $untagged[] = $line;
       } while ($line[0] == '*');
        if ($untagged)
            $untagged = join("\n", $untagged);
       return $line;
    }
@@ -408,7 +414,12 @@
    {
        $this->putLine('a001 LOGIN "'.$this->escape($user).'" "'.$this->escape($password).'"');
        $line = $this->readReply();
        $line = $this->readReply($untagged);
        // re-set capabilities list if untagged CAPABILITY response provided
       if (preg_match('/\* CAPABILITY (.+)/i', $untagged, $matches)) {
          $this->capability = explode(' ', strtoupper($matches[1]));
       }
        // process result
        $result = $this->parseResult($line);