From 199446c16d91b62e9924e7fff8d8a869175c0c85 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 02 Mar 2015 06:59:48 -0500
Subject: [PATCH] Fix so localized folder name is displayed in multi-folder search result (#1490243)
---
CHANGELOG | 1 +
program/steps/mail/func.inc | 13 +++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index 553886e..4a05593 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -19,6 +19,7 @@
- Fix "Non-static method PEAR::isError() should not be called statically" errors (#1490281)
- Fix parsing invalid HTML messages with BOM after <!DOCTYPE> (#1490291)
- Fix duplicate entry on timezones list in rcube_config::timezone_name_from_abbr() (#1490293)
+- Fix so localized folder name is displayed in multi-folder search result (#1490243)
RELEASE 1.1.0
-------------
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index c45fd2f..341c14b 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -399,6 +399,7 @@
$head_replace = true;
}
+ $delimiter = $RCMAIL->storage->get_hierarchy_delimiter();
$search_set = $RCMAIL->storage->get_search_set();
$multifolder = $search_set && $search_set[1]->multi;
@@ -489,8 +490,16 @@
$cont = show_bytes($header->$col);
else if ($col == 'date')
$cont = $RCMAIL->format_date($header->date);
- else if ($col == 'folder')
- $cont = rcube::Q(rcube_charset::convert($header->folder, 'UTF7-IMAP'));
+ else if ($col == 'folder') {
+ if ($last_folder !== $header->folder) {
+ $last_folder = $header->folder;
+ $last_folder_name = rcube_charset::convert($last_folder, 'UTF7-IMAP');
+ $last_folder_name = $RCMAIL->localize_foldername($last_folder_name, true);
+ $last_folder_name = str_replace($delimiter, " \xC2\xBB ", $last_folder_name);
+ }
+
+ $cont = rcube::Q($last_folder_name);
+ }
else
$cont = rcube::Q($header->$col);
--
Gitblit v1.9.1