summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/js/app.js2
-rw-r--r--program/steps/mail/show.inc2
2 files changed, 2 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 6f45cd045..632ee964c 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -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');
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index 64e628880..3495df9c0 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -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']);