Make sure mimetypes is an array not object in a better way

pull/88/head
Aleksander Machniak 12 years ago
parent 2080feca93
commit a03c28a22f

@ -820,7 +820,7 @@ function rcube_webmail()
var qstring = '_mbox='+urlencode(this.env.mailbox)+'&_uid='+this.env.uid+'&_part='+props.part;
// open attachment in frame if it's of a supported mimetype
if (this.env.uid && props.mimetype && this.env.mimetypes && $.inArray(props.mimetype, $.map(this.env.mimetypes, function(v,k){ return v })) >= 0) {
if (this.env.uid && props.mimetype && this.env.mimetypes && $.inArray(props.mimetype, this.env.mimetypes) >= 0) {
if (props.mimetype == 'text/html')
qstring += '&_safe=1';
this.attachment_win = window.open(this.env.comm_path+'&_action=get&'+qstring+'&_frame=1', 'rcubemailattachment');

@ -79,7 +79,7 @@ if ($uid = get_input_value('_uid', RCUBE_INPUT_GET)) {
}
}
$OUTPUT->set_env('mimetypes', $mimetypes);
$OUTPUT->set_env('mimetypes', array_values($mimetypes));
if ($CONFIG['drafts_mbox'])
$OUTPUT->set_env('drafts_mailbox', $CONFIG['drafts_mbox']);

Loading…
Cancel
Save