From 057b9e3e7f5bd1707e72812b1e5f977face0baed Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 09 Jun 2013 09:41:41 -0400
Subject: [PATCH] Fix zipdownload plugin issue with filenames charset (#1489156)

---
 CHANGELOG                           |    1 +
 plugins/zipdownload/zipdownload.php |    8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 5c657a8..0492116 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,7 @@
 ===========================
 
 - Fix "null" instead of empty string on messages list in IE10 (#1489145)
+- Fix zipdownload plugin issue with filenames charset (#1489156)
 - Fix so non-inline images aren't skipped on forward (#1489150)
 - Fix legacy options handling
 - Fix so bounces addresses in Sender headers are skipped on Reply-All (#1489011)
diff --git a/plugins/zipdownload/zipdownload.php b/plugins/zipdownload/zipdownload.php
index de58881..535248d 100644
--- a/plugins/zipdownload/zipdownload.php
+++ b/plugins/zipdownload/zipdownload.php
@@ -105,7 +105,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;
@@ -258,9 +258,13 @@
 	/**
 	 * Helper function to convert filenames to the configured charset
 	 */
+<<<<<<< HEAD
 	private function _convert_filename($str, $from = RCMAIL_CHARSET)
+=======
+	private function _convert_filename($str)
+>>>>>>> 4922472... Fix zipdownload plugin issue with filenames charset (#1489156)
 	{
-        $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