- Fix handling of folders with "<>" characters in name
| | |
| | | - Fix operations on messages in unsubscribed folder (#1487107) |
| | | - Add support for shared folders (#1403507) |
| | | - Fix handling of folders with name "0" (#1487119) |
| | | - Fix handling of folders with "<>" characters in name |
| | | - jQuery 1.4.4 |
| | | |
| | | RELEASE 0.4.2 |
| | |
| | | // move messages |
| | | if (!empty($_POST['_uid']) && !empty($_POST['_target_mbox'])) { |
| | | $uids = get_input_value('_uid', RCUBE_INPUT_POST); |
| | | $target = get_input_value('_target_mbox', RCUBE_INPUT_POST); |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST); |
| | | $target = get_input_value('_target_mbox', RCUBE_INPUT_POST, true); |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true); |
| | | |
| | | $copied = $IMAP->copy_message($uids, $target, $mbox); |
| | | |
| | |
| | | if (!$OUTPUT->ajax_call) |
| | | return; |
| | | |
| | | $mbox_name = $IMAP->get_mailbox_name(); |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true); |
| | | |
| | | // send EXPUNGE command |
| | | if ($RCMAIL->action=='expunge' && ($mbox = get_input_value('_mbox', RCUBE_INPUT_POST))) |
| | | if ($RCMAIL->action=='expunge') |
| | | { |
| | | $success = $IMAP->expunge($mbox); |
| | | |
| | |
| | | } |
| | | |
| | | // clear mailbox |
| | | else if ($RCMAIL->action=='purge' && ($mbox = get_input_value('_mbox', RCUBE_INPUT_POST))) |
| | | else if ($RCMAIL->action=='purge') |
| | | { |
| | | $delimiter = $IMAP->get_hierarchy_delimiter(); |
| | | $trash_regexp = '/^' . preg_quote($CONFIG['trash_mbox'] . $delimiter, '/') . '/'; |
| | |
| | | $OUTPUT->set_env('pagecount', 0); |
| | | $OUTPUT->command('message_list.clear'); |
| | | $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text()); |
| | | $OUTPUT->command('set_unread_count', $mbox_name, 0); |
| | | $OUTPUT->command('set_unread_count', $mbox, 0); |
| | | $OUTPUT->command('set_quota', rcmail_quota_content()); |
| | | $_SESSION['unseen_count'][$mbox_name] = 0; |
| | | $_SESSION['unseen_count'][$mbox] = 0; |
| | | } |
| | | else |
| | | $commands = "// purged: $success"; |
| | |
| | | } |
| | | |
| | | // set imap properties and session vars |
| | | if (strlen(trim($mbox = get_input_value('_mbox', RCUBE_INPUT_GPC)))) |
| | | if (strlen(trim($mbox = get_input_value('_mbox', RCUBE_INPUT_GPC, true)))) |
| | | $IMAP->set_mailbox(($_SESSION['mbox'] = $mbox)); |
| | | else if ($IMAP) |
| | | $_SESSION['mbox'] = $IMAP->get_mailbox_name(); |
| | |
| | | // move messages |
| | | if ($RCMAIL->action=='moveto' && !empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) { |
| | | $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST)))); |
| | | $target = get_input_value('_target_mbox', RCUBE_INPUT_POST); |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST); |
| | | $target = get_input_value('_target_mbox', RCUBE_INPUT_POST, true); |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true); |
| | | |
| | | $moved = $IMAP->move_message($uids, $target, $mbox); |
| | | |
| | |
| | | // delete messages |
| | | else if ($RCMAIL->action=='delete' && !empty($_POST['_uid'])) { |
| | | $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST)))); |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST); |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true); |
| | | |
| | | $del = $IMAP->delete_message($uids, $mbox); |
| | | |
| | |
| | | // subscribe to one or more mailboxes |
| | | if ($RCMAIL->action=='subscribe') |
| | | { |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, false, 'UTF7-IMAP'); |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true, 'UTF7-IMAP'); |
| | | if (strlen($mbox)) |
| | | $IMAP->subscribe(array($mbox)); |
| | | } |
| | |
| | | // unsubscribe one or more mailboxes |
| | | else if ($RCMAIL->action=='unsubscribe') |
| | | { |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, false, 'UTF7-IMAP'); |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true, 'UTF7-IMAP'); |
| | | if (strlen($mbox)) |
| | | $IMAP->unsubscribe(array($mbox)); |
| | | } |
| | |
| | | // enable threading for one or more mailboxes |
| | | else if ($RCMAIL->action=='enable-threading') |
| | | { |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, false, 'UTF7-IMAP'); |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true, 'UTF7-IMAP'); |
| | | if (strlen($mbox)) |
| | | rcube_set_threading($mbox, true); |
| | | } |
| | |
| | | // enable threading for one or more mailboxes |
| | | else if ($RCMAIL->action=='disable-threading') |
| | | { |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, false, 'UTF7-IMAP'); |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true, 'UTF7-IMAP'); |
| | | if (strlen($mbox)) |
| | | rcube_set_threading($mbox, false); |
| | | } |
| | |
| | | { |
| | | if (strlen(trim($_POST['_name']))) |
| | | { |
| | | $name = trim(get_input_value('_name', RCUBE_INPUT_POST, FALSE, 'UTF7-IMAP')); |
| | | $name = trim(get_input_value('_name', RCUBE_INPUT_POST, true, 'UTF7-IMAP')); |
| | | $create = $IMAP->create_mailbox($name, TRUE); |
| | | } |
| | | |
| | |
| | | |
| | | $create = rcube_charset_convert($create, 'UTF7-IMAP'); |
| | | $foldersplit = explode($delimiter, $create); |
| | | $display_create = str_repeat(' ', substr_count($create, $delimiter)) . $foldersplit[count($foldersplit)-1]; |
| | | $display_create = str_repeat(' ', substr_count($create, $delimiter)) |
| | | . Q($foldersplit[count($foldersplit)-1]); |
| | | |
| | | $OUTPUT->command('add_folder_row', $create, $display_create, false, $before); |
| | | } |
| | |
| | | { |
| | | if (strlen(trim($_POST['_folder_oldname'])) && strlen(trim($_POST['_folder_newname']))) |
| | | { |
| | | $name_utf8 = trim(get_input_value('_folder_newname', RCUBE_INPUT_POST)); |
| | | $oldname_utf8 = get_input_value('_folder_oldname', RCUBE_INPUT_POST); |
| | | $name_utf8 = trim(get_input_value('_folder_newname', RCUBE_INPUT_POST, true)); |
| | | $oldname_utf8 = get_input_value('_folder_oldname', RCUBE_INPUT_POST, true); |
| | | $name = rcube_charset_convert($name_utf8, RCMAIL_CHARSET, 'UTF7-IMAP'); |
| | | $oldname = rcube_charset_convert($oldname_utf8, RCMAIL_CHARSET, 'UTF7-IMAP'); |
| | | |
| | |
| | | $foldersplit = explode($delimiter, $folderlist[$x]); |
| | | $level = count($foldersplit) - 1; |
| | | $display_rename = str_repeat(' ', $level) |
| | | . rcube_charset_convert($foldersplit[$level], 'UTF7-IMAP'); |
| | | . Q(rcube_charset_convert($foldersplit[$level], 'UTF7-IMAP')); |
| | | |
| | | $before = isset($folderlist[$x+1]) ? rcube_charset_convert($folderlist[$x+1], 'UTF7-IMAP') : false; |
| | | |
| | |
| | | |
| | | $foldersplit = explode($delimiter, $rename); |
| | | $level = count($foldersplit) - 1; |
| | | $display_rename = str_repeat(' ', $level) . rcube_charset_convert($foldersplit[$level], 'UTF7-IMAP'); |
| | | $display_rename = str_repeat(' ', $level) . Q(rcube_charset_convert($foldersplit[$level], 'UTF7-IMAP')); |
| | | $index = array_search($rename, $folderlist); |
| | | $before = $index !== false && isset($folderlist[$index+1]) ? rcube_charset_convert($folderlist[$index+1], 'UTF7-IMAP') : false; |
| | | |
| | |
| | | $a_mboxes = $IMAP->list_unsubscribed(); |
| | | $delimiter = $IMAP->get_hierarchy_delimiter(); |
| | | |
| | | $mboxes_utf8 = get_input_value('_mboxes', RCUBE_INPUT_POST); |
| | | $mboxes_utf8 = get_input_value('_mboxes', RCUBE_INPUT_POST, true); |
| | | $mboxes = rcube_charset_convert($mboxes_utf8, RCMAIL_CHARSET, 'UTF7-IMAP'); |
| | | |
| | | if (strlen($mboxes)) |
| | |
| | | $threaded = $a_threaded[$folder['id']]; |
| | | $protected = ($CONFIG['protect_default_folders'] == true && in_array($folder['id'], $CONFIG['default_imap_folders'])); |
| | | $classes = array($i%2 ? 'even' : 'odd'); |
| | | $folder_js = JQ($folder['id']); |
| | | $folder_js = Q($folder['id']); |
| | | $display_folder = str_repeat(' ', $folder['level']) . Q($protected ? rcmail_localize_foldername($folder['id']) : $folder['name']); |
| | | $folder_utf8 = rcube_charset_convert($folder['id'], 'UTF7-IMAP'); |
| | | |
| | |
| | | $table->add('delete', ' '); |
| | | } |
| | | |
| | | $a_js_folders['rcmrow'.$idx] = array($folder_utf8, $display_folder, $protected || $folder['virtual']); |
| | | $a_js_folders['rcmrow'.$idx] = array($folder_utf8, Q($display_folder), $protected || $folder['virtual']); |
| | | } |
| | | |
| | | rcmail::get_instance()->plugins->exec_hook('folders_list', array('table' => $table)); |