| | |
| | | */ |
| | | static function uncompressMessageSet($messages) |
| | | { |
| | | if (empty($messages)) { |
| | | return array(); |
| | | } |
| | | |
| | | $result = array(); |
| | | $messages = explode(',', $messages); |
| | | |
| | |
| | | $max = max($items[0], $items[1]); |
| | | |
| | | for ($x=$items[0]; $x<=$max; $x++) { |
| | | $result[] = $x; |
| | | $result[] = (int)$x; |
| | | } |
| | | unset($messages[$idx]); |
| | | } |
| | |
| | | |
| | | // literal-string |
| | | return sprintf("{%d}\r\n%s", strlen($string), $string); |
| | | } |
| | | |
| | | /** |
| | | * Unescapes quoted-string |
| | | * |
| | | * @param string $string IMAP string |
| | | * |
| | | * @return string String |
| | | */ |
| | | static function unEscape($string) |
| | | { |
| | | return stripslashes($string); |
| | | } |
| | | |
| | | /** |