From a91e8565d38bba2c893617e1a8931e133d312bc9 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 9 Feb 2010 21:19:12 -0700 Subject: [PATCH] Fix label determination for INBOX. If namespace is INBOX., and mailbox is INBOX.INBOX, this mailbox should not have a translated label name. --- imp/lib/IMP.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/imp/lib/IMP.php b/imp/lib/IMP.php index c5d661d68..90e6b94a6 100644 --- a/imp/lib/IMP.php +++ b/imp/lib/IMP.php @@ -410,14 +410,15 @@ class IMP $out = substr($folder, strlen($ns_info['name'])); } else { $out = $folder; - }; + } if ($notranslate) { return $out; } foreach ($sub_array as $key => $val) { - if (stripos($out, $key) === 0) { + if ((($key != 'INBOX') || ($folder == $out)) && + stripos($out, $key) === 0) { $len = strlen($key); if ((strlen($out) == $len) || ($out[$len] == $delimiter)) { $out = substr_replace($out, Horde_String::convertCharset($val, Horde_Nls::getCharset(), 'UTF7-IMAP'), 0, $len); -- 2.11.0