if ( $use_long_format ) {
$shorten_box_names = 0;
} else {
- $shorten_box_names = getPref($data_dir, $username, 'mailbox_select_style', SMPREF_OFF);
+ $shorten_box_names = getPref($data_dir, $username, 'mailbox_select_style', SMPREF_MAILBOX_SELECT_INDENTED);
}
if ($boxes == 0) {
} else {
switch ($shorten_box_names)
{
- case 2: /* delimited, style = 2 */
+ case SMPREF_MAILBOX_SELECT_DELIMITED:
if ($translate_special_folders && $boxes_part['unformatted-dm']==$sent_folder) {
/*
* calculate pad level from number of delimiters. do it inside if control in order
$box2 = str_replace('  ', '. ', htmlspecialchars($boxes_part['formatted']));
}
break;
- case 1: /* indent, style = 1 */
+ case SMPREF_MAILBOX_SELECT_INDENTED:
if ($translate_special_folders && $boxes_part['unformatted-dm']==$sent_folder) {
$pad = str_pad('',12 * (count(explode($delimiter,$boxes_part['unformatted-dm']))-1),' ');
$box2 = $pad . _("Sent");
define('SMPREF_UNSEEN_ONLY', 1);
define('SMPREF_UNSEEN_TOTAL', 2);
+define('SMPREF_MAILBOX_SELECT_LONG', 0);
+define('SMPREF_MAILBOX_SELECT_INDENTED', 1);
+define('SMPREF_MAILBOX_SELECT_DELIMITED', 2);
+
/**
* Define constants for time/date display preferences.
* @since 1.2.0
/* How are mailbox select lists displayed: 0. full names, 1. indented (default),
* 3. delimited) */
-$mailbox_select_style = getPref($data_dir, $username, 'mailbox_select_style', SMPREF_ON);
+$mailbox_select_style = getPref($data_dir, $username, 'mailbox_select_style', SMPREF_MAILBOX_SELECT_INDENTED);
/* Allow user to customize, and display the full date, instead of day, or time based
on time distance from date of message */
'caption' => _("Selection List Style"),
'type' => SMOPT_TYPE_STRLIST,
'refresh' => SMOPT_REFRESH_NONE,
- 'posvals' => array( 0 => _("Long:") . ' "' . _("Folder") . $delim . _("Subfolder") . '"',
- 1 => _("Indented:") . " \"$nbsp$nbsp$nbsp$nbsp" . _("Subfolder") . '"',
- 2 => _("Delimited:") . " \".$nbsp" . _("Subfolder") . '"'),
+ 'posvals' => array(
+ SMPREF_MAILBOX_SELECT_LONG =>
+ _("Long:") . ' "' . _("Folder") . $delim . _("Subfolder") . '"',
+ SMPREF_MAILBOX_SELECT_INDENTED =>
+ _("Indented:") . " \"$nbsp$nbsp$nbsp$nbsp" . _("Subfolder") . '"',
+ SMPREF_MAILBOX_SELECT_DELIMITED =>
+ _("Delimited:") . " \".$nbsp" . _("Subfolder") . '"'),
'htmlencoded' => true
);