diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-06-11 09:41:02 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-06-11 09:41:02 +0200 |
commit | 85e65c3c7672d0e56ada988a047f0f602ba0c964 (patch) | |
tree | 01a1a200064b7d7a7bebdbb6b243cb74739bfdc6 /program/include | |
parent | 174327c25cd68f203e0985df51b94765738c7dce (diff) |
Improvements to PR merge "add option show_real_foldernames"
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/rcmail.php | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 17c95d7ed..22d081130 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -1325,9 +1325,7 @@ class rcmail extends rcube $realnames = (bool)$attrib['realnames']; $msgcounts = $this->storage->get_cache('messagecount'); $collapsed = $this->config->get('collapsed_folders'); - - if ($this->config->get('show_real_foldernames')) - $realnames = true; + $realnames = $this->config->get('show_real_foldernames'); $out = ''; foreach ($arrFolders as $folder) { @@ -1484,8 +1482,10 @@ class rcmail extends rcube */ public function localize_foldername($name, $with_path = true) { + $realnames = $this->config->get('show_real_foldernames'); + // try to localize path of the folder - if ($with_path) { + if ($with_path && !$realnames) { $storage = $this->get_storage(); $delimiter = $storage->get_hierarchy_delimiter(); $path = explode($delimiter, $name); @@ -1494,8 +1494,7 @@ class rcmail extends rcube if ($count > 1) { for ($i = 0; $i < $count; $i++) { $folder = implode($delimiter, array_slice($path, 0, -$i)); - if (!$this->config->get('show_real_foldernames') && - ($folder_class = $this->folder_classname($folder))) { + if ($folder_class = $this->folder_classname($folder)) { $name = implode($delimiter, array_slice($path, $count - $i)); return $this->gettext($folder_class) . $delimiter . rcube_charset::convert($name, 'UTF7-IMAP'); } @@ -1503,13 +1502,11 @@ class rcmail extends rcube } } - if (!$this->config->get('show_real_foldernames') && - ($folder_class = $this->folder_classname($name))) { + if (!$realnames && ($folder_class = $this->folder_classname($name))) { return $this->gettext($folder_class); } - else { - return rcube_charset::convert($name, 'UTF7-IMAP'); - } + + return rcube_charset::convert($name, 'UTF7-IMAP'); } |