David Carter
2013-05-29 149f8a00cc51c87fef3afe2fbb51822a3582c583
Change show_actual_foldernames to be show_real_foldernames.

Change requested by alec@alec.pl.
5 files modified
28 ■■■■ changed files
config/main.inc.php.dist 2 ●●● patch | view | raw | blame | history
program/include/rcmail.php 6 ●●●● patch | view | raw | blame | history
program/localization/en_GB/labels.inc 2 ●●● patch | view | raw | blame | history
program/steps/settings/func.inc 14 ●●●● patch | view | raw | blame | history
program/steps/settings/save_prefs.inc 4 ●●●● patch | view | raw | blame | history
config/main.inc.php.dist
@@ -470,7 +470,7 @@
$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
// Disable localization of the four default folder names listed above
$rcmail_config['show_actual_foldernames'] = false;
$rcmail_config['show_real_foldernames'] = false;
// automatically create the above listed default folders on first login
$rcmail_config['create_default_folders'] = false;
program/include/rcmail.php
@@ -1326,7 +1326,7 @@
        $msgcounts = $this->storage->get_cache('messagecount');
        $collapsed = $this->config->get('collapsed_folders');
        if ($this->config->get('show_actual_foldernames'))
        if ($this->config->get('show_real_foldernames'))
            $realnames = true;
        $out = '';
@@ -1494,7 +1494,7 @@
            if ($count > 1) {
                for ($i = 0; $i < $count; $i++) {
                    $folder = implode($delimiter, array_slice($path, 0, -$i));
                    if (!$this->config->get('show_actual_foldernames') &&
                    if (!$this->config->get('show_real_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');
@@ -1503,7 +1503,7 @@
            }
        }
        if (!$this->config->get('show_actual_foldernames') &&
        if (!$this->config->get('show_real_foldernames') &&
            ($folder_class = $this->folder_classname($name))) {
            return $this->gettext($folder_class);
        }
program/localization/en_GB/labels.inc
@@ -37,7 +37,7 @@
$labels['sent']   = 'Sent';
$labels['trash']  = 'Deleted Items';
$labels['junk']   = 'Junk';
$labels['show_actual_foldernames'] = 'Show actual names for special folders';
$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Subject';
program/steps/settings/func.inc
@@ -771,16 +771,16 @@
    );
    if (!isset($no_override['show_actual_foldernames'])) {
      $field_id = 'show_actual_foldernames';
      $input_show_actual_foldernames =
          new html_checkbox(array('name' => '_show_actual_foldernames',
    if (!isset($no_override['show_real_foldernames'])) {
      $field_id = 'show_real_foldernames';
      $input_show_real_foldernames =
          new html_checkbox(array('name' => '_show_real_foldernames',
                                  'id' => $field_id, 'value' => 1));
      $blocks['main']['options']['show_actul_foldernames'] = array(
      $blocks['main']['options']['show_real_foldernames'] = array(
        'title' => html::label($field_id,
                               Q(rcube_label('show_actual_foldernames'))),
        'content' => $input_show_actual_foldernames->show($config['show_actual_foldernames']?1:0),
                               Q(rcube_label('show_real_foldernames'))),
        'content' => $input_show_real_foldernames->show($config['show_real_foldernames']?1:0),
      );
    }
    // Configure special folders
program/steps/settings/save_prefs.inc
@@ -119,8 +119,8 @@
  case 'folders':
    $a_user_prefs = array(
      'show_actual_foldernames'  =>
      isset($_POST['_show_actual_foldernames']) ? TRUE : FALSE,
      'show_real_foldernames'  =>
      isset($_POST['_show_real_foldernames']) ? TRUE : FALSE,
      'drafts_mbox' => get_input_value('_drafts_mbox', RCUBE_INPUT_POST, true),
      'sent_mbox'   => get_input_value('_sent_mbox', RCUBE_INPUT_POST, true),
      'junk_mbox'   => get_input_value('_junk_mbox', RCUBE_INPUT_POST, true),