| | |
| | | $criteria = 'UNDELETED '.$criteria; |
| | | } |
| | | |
| | | // unset CHARSET if criteria string is ASCII, this way |
| | | // SEARCH won't be re-sent after "unsupported charset" response |
| | | if ($charset && $charset != 'US-ASCII' && is_ascii($criteria)) { |
| | | $charset = 'US-ASCII'; |
| | | } |
| | | |
| | | if ($this->threading) { |
| | | $threads = $this->conn->thread($folder, $this->threading, $criteria, true, $charset); |
| | | |
| | |
| | | } |
| | | |
| | | $messages = $this->conn->search($folder, |
| | | ($charset ? "CHARSET $charset " : '') . $criteria, true); |
| | | ($charset && $charset != 'US-ASCII' ? "CHARSET $charset " : '') . $criteria, true); |
| | | |
| | | // Error, try with US-ASCII (some servers may support only US-ASCII) |
| | | if ($messages->is_error() && $charset && $charset != 'US-ASCII') { |
| | |
| | | } |
| | | |
| | | // Get folder rights (MYRIGHTS) |
| | | if ($acl && !$options['noselect']) { |
| | | // skip shared roots |
| | | if (!$options['is_root'] || $options['namespace'] == 'personal') { |
| | | $options['rights'] = (array)$this->my_rights($folder); |
| | | } |
| | | if ($acl && ($rights = $this->my_rights($folder))) { |
| | | $options['rights'] = $rights; |
| | | } |
| | | |
| | | // Set 'norename' flag |