summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-02-08 08:57:13 +0100
committerAleksander Machniak <alec@alec.pl>2013-02-08 09:01:19 +0100
commite55fc1458ec34165f5f0ee0f3787b56ed58a6db6 (patch)
treedb5b92ddf66063f55805e9c2dad7657ad76d5d29 /plugins
parent8514ab48d4bd123212571f8d9989034663861969 (diff)
Fix filenames charset handling (#1488946)
Conflicts: plugins/zipdownload/zipdownload.php
Diffstat (limited to 'plugins')
-rw-r--r--plugins/zipdownload/zipdownload.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/zipdownload/zipdownload.php b/plugins/zipdownload/zipdownload.php
index 8bad9b341..de5888145 100644
--- a/plugins/zipdownload/zipdownload.php
+++ b/plugins/zipdownload/zipdownload.php
@@ -30,9 +30,9 @@ class zipdownload extends rcube_plugin
}
$rcmail = rcmail::get_instance();
- $this->charset = $rcmail->config->get('zipdownload_charset', RCMAIL_CHARSET);
$this->load_config();
+ $this->charset = $rcmail->config->get('zipdownload_charset', RCUBE_CHARSET);
$this->add_texts('localization');
if ($rcmail->config->get('zipdownload_attachments', 1) > -1 && ($rcmail->action == 'show' || $rcmail->action == 'preview'))
@@ -208,7 +208,7 @@ class zipdownload extends rcube_plugin
$disp_name = "message_rfc822.eml";
$disp_name = $uid . "_" . $disp_name;
-
+
$tmpfn = tempnam($temp_dir, 'zipmessage');
$tmpfp = fopen($tmpfn, 'w');
$imap->get_raw_body($uid, $tmpfp);
@@ -260,8 +260,8 @@ class zipdownload extends rcube_plugin
*/
private function _convert_filename($str, $from = RCMAIL_CHARSET)
{
- return strtr(rcube_charset_convert($str, $from, $this->charset), array(':'=>'', '/'=>'-'));
+ $str = rcube_charset::convert($str, $from == '' ? RCUBE_CHARSET : $from, $this->charset);
+
+ return strtr($str, array(':'=>'', '/'=>'-'));
}
}
-
-?> \ No newline at end of file