This is a RETURN option, not a SELECT option.
Some servers complain if they don't know what SPECIAL-USE return is.
Although this seems to go against the draft RFC, use the create
CAPABILITY string to determine whether to send the return option.
$select_opts[] = 'RECURSIVEMATCH';
}
- if (!empty($options['special_use'])) {
- $select_opts[] = 'SPECIAL-USE';
- }
-
if (!empty($select_opts)) {
$cmd[] = $select_opts;
}
$return_opts[] = 'CHILDREN';
}
+ if (!empty($options['special_use']) &&
+ $this->queryCapability('CREATE-SPECIAL-USE')) {
+ $return_opts[] = 'SPECIAL-USE';
+ }
+
if (!empty($options['status']) &&
$this->queryCapability('LIST-STATUS')) {
$status_mask = array(