summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authorDavid Carter <dpc22@cam.ac.uk>2013-05-29 07:45:22 +0100
committerDavid Carter <dpc22@magenta.csi.cam.ac.uk>2013-05-29 07:51:44 +0100
commit52deb18d9646116114f9649c87ffc4f0bc378db1 (patch)
treea05582ea283cf003378ee7d6081a0f364389fff5 /program/include/rcmail.php
parentb91bc101a0a3c8227b225ce557954f6a1e654ed3 (diff)
Add show_actual_foldernames preference and configuration option.
When enabled this setting shows actual folder names rather than the localised verions for the four default folders: $rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'sent-mail', 'spam', 'Trash');
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 89f2f9647..76edfab0b 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -1326,6 +1326,9 @@ class rcmail extends rcube
$msgcounts = $this->storage->get_cache('messagecount');
$collapsed = $this->config->get('collapsed_folders');
+ if ($this->config->get('show_actual_foldernames'))
+ $realnames = true;
+
$out = '';
foreach ($arrFolders as $folder) {
$title = null;
@@ -1491,7 +1494,8 @@ class rcmail extends rcube
if ($count > 1) {
for ($i = 0; $i < $count; $i++) {
$folder = implode($delimiter, array_slice($path, 0, -$i));
- if ($folder_class = $this->folder_classname($folder)) {
+ if (!$this->config->get('show_actual_foldernames') &&
+ ($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');
}
@@ -1499,7 +1503,8 @@ class rcmail extends rcube
}
}
- if ($folder_class = $this->folder_classname($name)) {
+ if (!$this->config->get('show_actual_foldernames') &&
+ ($folder_class = $this->folder_classname($name))) {
return $this->gettext($folder_class);
}
else {