* See comment on sqimap_mailbox_parse() for info about the returned array.
*/
function sqimap_mailbox_list($imap_stream) {
- global $boxesnew, $default_folder_prefix;
+ global $default_folder_prefix;
if ( !isset( $boxesnew ) ) {
global $data_dir, $username, $list_special_folders_first,
$folder_prefix, $trash_folder, $sent_folder, $draft_folder,
$move_to_trash, $move_to_sent, $save_as_draft,
- $delimiter;
+ $delimiter, $noselect_fix_enable;
$inbox_in_list = false;
$inbox_subscribed = false;
require_once('../src/load_prefs.php');
require_once('../functions/array.php');
+ if ($noselect_fix_enable) {
+ $lsub_args = "LSUB \"$folder_prefix\" \"*%\"";
+ }
+ else {
+ $lsub_args = "LSUB \"$folder_prefix\" \"*\"";
+ }
/* LSUB array */
- $lsub_ary = sqimap_run_command ($imap_stream, "LSUB \"$folder_prefix\" \"*%\"",
+ $lsub_ary = sqimap_run_command ($imap_stream, $lsub_args,
true, $response, $message);
+
/*
* Section about removing the last element was removed
* We don't return "* OK" anymore from sqimap_read_data
$used[$k] = true;
}
$spec_sub = str_replace(' ', '', $box['formatted']);
- $spec_sub = str_replace('*', '', $box['formatted']);
+ $spec_sub = str_replace('*', '', $spec_sub);
+ $spec_sub = str_replace('?', '\?', $spec_sub);
/* In case of problems with preg
here is a ereg version