} else {
$bcmp = '2' . $b->mailboxname_full;
}
- if ($acmp == $bcmp) return 0;
- return ($acmp > $bcmp) ? 1: -1;
+ return user_strcasecmp($acmp, $bcmp);
}
function compact_mailboxes_response($ary)
the list, despite having "special folders at top" option set.
Need a better method than this.
*/
-
+/*
if ($mailbox == 'INBOX') {
$mbx->is_special = true;
} elseif (stristr($trash_folder , $mailbox)) {
case 'INBOX':
$mbx->is_inbox = true;
$mbx->is_special = true;
- $mbx_ary[$i]['noselect'] = false;
+ $mbx_ary[$i]['noselect'] = false;
break;
case $trash_folder:
$mbx->is_trash = true;
$mbx->is_special = true;
break;
}
+*/
+ $mbx->is_special |= ($mbx->is_inbox = (strtoupper($mailbox) == 'INBOX'));
+ $mbx->is_special |= ($mbx->is_trash = isTrashMailbox($mailbox));
+ $mbx->is_special |= ($mbx->is_sent = isSentMailbox($mailbox));
+ $mbx->is_special |= ($mbx->is_draft = isDraftMailbox($mailbox));
+ if (!$mbx->is_special)
+ $mbx->is_special = do_hook_function('special_mailbox', $mailbox);
if (isset($mbx_ary[$i]['unseen'])) {
$mbx->unseen = $mbx_ary[$i]['unseen'];