From 49224720be7041b0865dd5d776da3513fd69035a Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 09 Jun 2013 09:40:41 -0400
Subject: [PATCH] Fix zipdownload plugin issue with filenames charset (#1489156)
---
CHANGELOG | 1 +
plugins/zipdownload/zipdownload.php | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index 179bb0b..bcc6e20 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
+- Fix zipdownload plugin issue with filenames charset (#1489156)
- Fix database cache expunge issues (#1489149)
- Fix date format issues on MS SQL Server (#1488918)
- Fix so non-inline images aren't skipped on forward (#1489150)
diff --git a/plugins/zipdownload/zipdownload.php b/plugins/zipdownload/zipdownload.php
index fbf1d23..5943126 100644
--- a/plugins/zipdownload/zipdownload.php
+++ b/plugins/zipdownload/zipdownload.php
@@ -108,7 +108,7 @@
foreach ($message->attachments as $part) {
$pid = $part->mime_id;
$part = $message->mime_parts[$pid];
- $disp_name = $this->_convert_filename($part->filename, $part->charset);
+ $disp_name = $this->_convert_filename($part->filename);
if ($part->body) {
$orig_message_raw = $part->body;
@@ -263,9 +263,9 @@
/**
* Helper function to convert filenames to the configured charset
*/
- private function _convert_filename($str, $from = RCUBE_CHARSET)
+ private function _convert_filename($str)
{
- $str = rcube_charset::convert($str, $from == '' ? RCUBE_CHARSET : $from, $this->charset);
+ $str = rcube_charset::convert($str, RCUBE_CHARSET, $this->charset);
return strtr($str, array(':'=>'', '/'=>'-'));
}
--
Gitblit v1.9.1