summaryrefslogtreecommitdiff
path: root/program/steps/settings
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/settings')
-rw-r--r--program/steps/settings/edit_prefs.inc2
-rw-r--r--program/steps/settings/folders.inc3
-rw-r--r--program/steps/settings/func.inc11
-rw-r--r--program/steps/settings/save_prefs.inc1
4 files changed, 14 insertions, 3 deletions
diff --git a/program/steps/settings/edit_prefs.inc b/program/steps/settings/edit_prefs.inc
index 971ed60b6..468e4994d 100644
--- a/program/steps/settings/edit_prefs.inc
+++ b/program/steps/settings/edit_prefs.inc
@@ -40,7 +40,7 @@ function rcmail_user_prefs_form($attrib)
$out = $form_start;
- foreach ($SECTIONS[$CURR_SECTION]['blocks'] as $idx => $block) {
+ foreach ($SECTIONS[$CURR_SECTION]['blocks'] as $block) {
if (!empty($block['options'])) {
$table = new html_table(array('cols' => 2));
diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc
index 0c7d9063f..34a72dd95 100644
--- a/program/steps/settings/folders.inc
+++ b/program/steps/settings/folders.inc
@@ -283,7 +283,6 @@ function rcube_subscription_form($attrib)
$noselect = false;
$classes = array($i%2 ? 'even' : 'odd');
- $folder_js = Q($folder['id']);
$folder_utf8 = rcube_charset_convert($folder['id'], 'UTF7-IMAP');
$display_folder = str_repeat('    ', $folder['level'])
. Q($protected ? rcmail_localize_foldername($folder['id']) : $folder['name']);
@@ -394,7 +393,7 @@ function rcmail_rename_folder($oldname, $newname)
$a_threaded = (array) $RCMAIL->config->get('message_threading', array());
$oldprefix = '/^' . preg_quote($oldname . $delimiter, '/') . '/';
- foreach ($a_threaded as $key => $val) {
+ foreach (array_keys($a_threaded) as $key) {
if ($key == $oldname) {
unset($a_threaded[$key]);
$a_threaded[$newname] = true;
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 319c58db9..860f36c35 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -418,6 +418,17 @@ function rcmail_user_prefs($current=null)
);
}
+ // show checkbox to show email instead of name
+ if (!isset($no_override['message_show_email'])) {
+ $field_id = 'rcmfd_message_show_email';
+ $input_msgshowemail = new html_checkbox(array('name' => '_message_show_email', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['message_show_email'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('showemail'))),
+ 'content' => $input_msgshowemail->show($config['message_show_email']?1:0),
+ );
+ }
+
// show checkbox for HTML/plaintext messages
if (!isset($no_override['prefer_html'])) {
$field_id = 'rcmfd_htmlmsg';
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index dfb2b13ac..3bb82aa38 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -60,6 +60,7 @@ switch ($CURR_SECTION)
case 'mailview':
$a_user_prefs = array(
'message_extwin' => intval($_POST['_message_extwin']),
+ 'message_show_email' => isset($_POST['_message_show_email']) ? TRUE : FALSE,
'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE,
'inline_images' => isset($_POST['_inline_images']) ? TRUE : FALSE,
'show_images' => isset($_POST['_show_images']) ? intval($_POST['_show_images']) : 0,