Merge branch 'master' of github.com:roundcube/roundcubemail
| | |
| | | CHANGELOG Roundcube Webmail |
| | | =========================== |
| | | |
| | | - Fix handling of invalid characters in message headers and output (#1489032) |
| | | - Fix selecting collapsed rows on select-all (#1489036) |
| | | - Avoid race-conditions with concurrent attachment uploads (#1488422) |
| | | - Fix possible header duplicates when using additional headers (#1489033) |
| | | - Fix session issues with use_https=true (#1488986) |
| | |
| | | if (!this.rows[this.shift_start] || !this.selection.length) |
| | | this.shift_start = id; |
| | | |
| | | var n, from_rowIndex = this.rows[this.shift_start].obj.rowIndex, |
| | | to_rowIndex = this.rows[id].obj.rowIndex, |
| | | var n, i, j, to_row = this.rows[id], |
| | | from_rowIndex = this.rows[this.shift_start].obj.rowIndex, |
| | | to_rowIndex = to_row.obj.rowIndex; |
| | | |
| | | if (!to_row.expanded && to_row.has_children) |
| | | if (to_row = this.rows[(this.row_children(id)).pop()]) |
| | | to_rowIndex = to_row.obj.rowIndex; |
| | | |
| | | i = ((from_rowIndex < to_rowIndex)? from_rowIndex : to_rowIndex), |
| | | j = ((from_rowIndex > to_rowIndex)? from_rowIndex : to_rowIndex); |
| | | |
| | |
| | | for (n in this.rows) { |
| | | if (!filter || this.rows[n][filter] == true) { |
| | | this.last_selected = n; |
| | | this.highlight_row(n, true); |
| | | this.highlight_row(n, true, true); |
| | | } |
| | | else { |
| | | $(this.rows[n].obj).removeClass('selected').removeClass('unfocused'); |
| | |
| | | /** |
| | | * Highlight/unhighlight a row |
| | | */ |
| | | highlight_row: function(id, multiple) |
| | | highlight_row: function(id, multiple, norecur) |
| | | { |
| | | if (!this.rows[id]) |
| | | return; |
| | |
| | | if (!this.in_selection(id)) { // select row |
| | | this.selection.push(id); |
| | | $(this.rows[id].obj).addClass('selected'); |
| | | if (!this.rows[id].expanded) |
| | | if (!norecur && !this.rows[id].expanded) |
| | | this.highlight_children(id, true); |
| | | } |
| | | else { // unselect row |
| | |
| | | |
| | | this.selection = a_pre.concat(a_post); |
| | | $(this.rows[id].obj).removeClass('selected').removeClass('unfocused'); |
| | | if (!this.rows[id].expanded) |
| | | if (!norecur && !this.rows[id].expanded) |
| | | this.highlight_children(id, false); |
| | | } |
| | | } |
| | |
| | | for (i=0; i<len; i++) { |
| | | selected = this.in_selection(children[i]); |
| | | if ((status && !selected) || (!status && selected)) |
| | | this.highlight_row(children[i], true); |
| | | this.highlight_row(children[i], true, true); |
| | | } |
| | | }, |
| | | |
| | |
| | | public static $common_attrib = array('id','class','style','title','align'); |
| | | public static $containers = array('iframe','div','span','p','h1','h2','h3','form','textarea','table','thead','tbody','tr','th','td','style','script'); |
| | | |
| | | |
| | | /** |
| | | * Constructor |
| | | * |
| | |
| | | */ |
| | | public static function quote($str) |
| | | { |
| | | return @htmlspecialchars($str, ENT_COMPAT, RCUBE_CHARSET); |
| | | static $flags; |
| | | |
| | | if (!$flags) { |
| | | $flags = ENT_COMPAT; |
| | | if (defined('ENT_SUBSTITUTE')) { |
| | | $flags |= ENT_SUBSTITUTE; |
| | | } |
| | | } |
| | | |
| | | return @htmlspecialchars($str, $flags, RCUBE_CHARSET); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | $this->headers = $this->storage->get_message($uid); |
| | | |
| | | if (!$this->headers) |
| | | if (!$this->headers) { |
| | | return; |
| | | } |
| | | |
| | | $this->mime = new rcube_mime($this->headers->charset); |
| | | |
| | | $this->subject = $this->mime->decode_mime_string($this->headers->subject); |
| | | $this->subject = $this->headers->get('subject'); |
| | | list(, $this->sender) = each($this->mime->decode_address_list($this->headers->from, 1)); |
| | | |
| | | $this->set_safe((intval($_GET['_safe']) || $_SESSION['safe_messages'][$this->folder.':'.$uid])); |
| | |
| | | */ |
| | | public function get_header($name, $raw = false) |
| | | { |
| | | if (empty($this->headers)) |
| | | if (empty($this->headers)) { |
| | | return null; |
| | | } |
| | | |
| | | if ($this->headers->$name) |
| | | $value = $this->headers->$name; |
| | | else if ($this->headers->others[$name]) |
| | | $value = $this->headers->others[$name]; |
| | | |
| | | return $raw ? $value : $this->mime->decode_header($value); |
| | | return $this->headers->get($name, !$raw); |
| | | } |
| | | |
| | | |
| | |
| | | $value = $this->others[$name]; |
| | | } |
| | | |
| | | return $decode ? rcube_mime::decode_header($value, $this->charset) : $value; |
| | | if ($decode) { |
| | | $value = rcube_mime::decode_header($value, $this->charset); |
| | | $value = rcube_charset::clean($value); |
| | | } |
| | | |
| | | return $value; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | else if ($compose_mode == RCUBE_COMPOSE_DRAFT) { |
| | | if ($MESSAGE->headers->others['x-draft-info']) { |
| | | if ($draft_info = $MESSAGE->headers->get('x-draft-info')) { |
| | | // get reply_uid/forward_uid to flag the original message when sending |
| | | $info = rcmail_draftinfo_decode($MESSAGE->headers->others['x-draft-info']); |
| | | $info = rcmail_draftinfo_decode($draft_info); |
| | | |
| | | if ($info['type'] == 'reply') |
| | | $COMPOSE['reply_uid'] = $info['uid']; |
| | |
| | | } |
| | | } |
| | | |
| | | if ($MESSAGE->headers->in_reply_to) |
| | | $COMPOSE['reply_msgid'] = '<'.$MESSAGE->headers->in_reply_to.'>'; |
| | | if ($in_reply_to = $MESSAGE->headers->get('in-reply-to')) |
| | | $COMPOSE['reply_msgid'] = '<' . $in_reply_to . '>'; |
| | | |
| | | $COMPOSE['references'] = $MESSAGE->headers->references; |
| | | } |
| | |
| | | return; |
| | | |
| | | // move messages |
| | | if (!empty($_POST['_uid']) && !empty($_POST['_target_mbox'])) { |
| | | if (!empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) { |
| | | $uids = get_input_value('_uid', RCUBE_INPUT_POST); |
| | | $target = get_input_value('_target_mbox', RCUBE_INPUT_POST, true); |
| | | $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true); |
| | |
| | | } |
| | | // unknown action or missing query param |
| | | else { |
| | | exit; |
| | | $OUTPUT->show_message('internalerror', 'error'); |
| | | } |
| | | |
| | | // send response |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | $OUTPUT->send(); |
| | | } |
| | | else { |
| | | $OUTPUT->show_message('internalerror', 'error'); |
| | | } |
| | | |
| | | exit; |
| | | |
| | | $OUTPUT->send(); |
| | |
| | | } |
| | | // unknown action or missing query param |
| | | else { |
| | | $OUTPUT->show_message('internalerror', 'error'); |
| | | $OUTPUT->send(); |
| | | exit; |
| | | } |
| | | |
| | |
| | | $OUTPUT->set_env('skip_deleted', true); |
| | | if ($CONFIG['display_next']) |
| | | $OUTPUT->set_env('display_next', true); |
| | | if ($MESSAGE->headers->others['list-post']) |
| | | if ($MESSAGE->headers->get('list-post', false)) |
| | | $OUTPUT->set_env('list_post', true); |
| | | if ($CONFIG['forward_attachment']) |
| | | $OUTPUT->set_env('forward_attachment', true); |