| | |
| | | $result[$id] = ''; |
| | | } |
| | | } else if ($mode == 2) { |
| | | if (preg_match('/\((UID|RFC822\.SIZE) ([0-9]+)/', $line, $matches)) { |
| | | if (preg_match('/(UID|RFC822\.SIZE) ([0-9]+)/', $line, $matches)) { |
| | | $result[$id] = trim($matches[2]); |
| | | } else { |
| | | $result[$id] = 0; |
| | |
| | | else if ($force_quotes || |
| | | preg_match('/([\x00-\x20\x28-\x29\x7B\x25\x2A\x22\x5B\x5C\x5D\x7F]+)/', $string) |
| | | ) { |
| | | return '"' . strtr($string, array('"'=>'\\"', '\\' => '\\\\')) . '"'; |
| | | return '"' . addcslashes($string, '\\"') . '"'; |
| | | } |
| | | |
| | | // atom |
| | |
| | | |
| | | static function unEscape($string) |
| | | { |
| | | return strtr($string, array('\\"'=>'"', '\\\\' => '\\')); |
| | | return stripslashes($string); |
| | | } |
| | | |
| | | /** |