David Carter
2014-06-06 94d8fb5a42899377804e42a3084845d034563167
The following:
program/steps/mail/compose.inc :: rcmail_store_target_selection()
program/steps/settings/edit_folder.inc :: rcmail_folder_form()

both try to localise mailbox names.

Push the logic down into the folder_selector() method which can use:

$this->config->get('show_real_foldernames')

to decide the correct default behaviour.

Clients functions and methods can still override by adding 'realnames'
named parameter to the folder_selector() call. The obvious example is
the Settings -> Preferences -> Special Folders screen.
2 files modified
4 ■■■■ changed files
program/include/rcmail.php 3 ●●●● patch | view | raw | blame | history
program/steps/settings/edit_folder.inc 1 ●●●● patch | view | raw | blame | history
program/include/rcmail.php
@@ -1342,7 +1342,8 @@
     */
    public function folder_selector($p = array())
    {
        $p += array('maxlength' => 100, 'realnames' => false, 'is_escaped' => true);
        $realnames = $this->config->get('show_real_foldernames');
        $p += array('maxlength' => 100, 'realnames' => $realnames, 'is_escaped' => true);
        $a_mailboxes = array();
        $storage = $this->get_storage();
program/steps/settings/edit_folder.inc
@@ -134,7 +134,6 @@
        $select = $RCMAIL->folder_selector(array(
            'name'        => '_parent',
            'noselection' => '---',
            'realnames'   => false,
            'maxlength'   => 150,
            'unsubscribed' => true,
            'skip_noinferiors' => true,