summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/localization/en_US/labels.inc2
-rw-r--r--program/localization/pl_PL/labels.inc1
-rw-r--r--program/steps/mail/func.inc10
-rw-r--r--program/steps/settings/func.inc11
-rw-r--r--program/steps/settings/save_prefs.inc1
5 files changed, 21 insertions, 4 deletions
diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc
index 4dfdb637c..cf7c54cbc 100644
--- a/program/localization/en_US/labels.inc
+++ b/program/localization/en_US/labels.inc
@@ -263,7 +263,7 @@ $labels['autosend'] = 'send automatically';
$labels['ignore'] = 'ignore';
$labels['readwhendeleted'] = 'Mark the message as read on delete';
$labels['flagfordeletion'] = 'Flag the message for deletion instead of delete';
-
+$labels['showinlineimages'] = 'Display attached images below the message';
$labels['autosavedraft'] = 'Automatically save draft';
$labels['everynminutes'] = 'every $n minutes';
$labels['never'] = 'never';
diff --git a/program/localization/pl_PL/labels.inc b/program/localization/pl_PL/labels.inc
index 1fa322e18..725fc3890 100644
--- a/program/localization/pl_PL/labels.inc
+++ b/program/localization/pl_PL/labels.inc
@@ -59,6 +59,7 @@ $labels['preferhtml'] = 'Domyślny HTML';
$labels['htmlmessage'] = 'Wiadomość HTML';
$labels['showknownimages'] = 'Wyświetlaj obrazki od znanych nadawców';
$labels['prettydate'] = 'Ładne daty';
+$labels['showinlineimages'] = 'Wyświetlaj załączone obrazki pod treścią wiadomości';
$labels['messagesdisplaying'] = 'Wyświetlanie wiadomości';
$labels['messagescomposition'] = 'Tworzenie wiadomości';
$labels['addtoaddressbook'] = 'Dodaj do książki adresowej ';
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index af3f6e72f..a27023f27 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -745,10 +745,14 @@ function rcmail_message_body($attrib)
$ctype_primary = strtolower($MESSAGE->structure->ctype_primary);
$ctype_secondary = strtolower($MESSAGE->structure->ctype_secondary);
-
+
// list images after mail body
- if (get_boolean($attrib['showimages']) && $ctype_primary == 'multipart' &&
- !empty($MESSAGE->attachments) && !strstr($message_body, '<html')) {
+ if (get_boolean($attrib['showimages'])
+ && $CONFIG['inline_images']
+ && $ctype_primary == 'multipart'
+ && !empty($MESSAGE->attachments)
+ && !strstr($message_body, '<html'))
+ {
foreach ($MESSAGE->attachments as $attach_prop) {
if (strpos($attach_prop->mimetype, 'image/') === 0) {
$out .= html::tag('hr') . html::p(array('align' => "center"),
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index c52daf94e..c52025379 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -200,6 +200,17 @@ function rcmail_user_prefs_form($attrib)
$input_addrbook_show_images->show($config['addrbook_show_images']?1:0));
}
+ if (!isset($no_override['inline_images']))
+ {
+ $field_id = 'rcmfd_inline_images';
+ $input_inline_images = new html_checkbox(array('name' => '_inline_images', 'id' => $field_id, 'value' => 1));
+
+ $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n",
+ $field_id,
+ Q(rcube_label('showinlineimages')),
+ $input_inline_images->show($config['inline_images']?1:0));
+ }
+
$out .= "</table></fieldset>\n<fieldset><legend>" . Q(rcube_label('messagescomposition')) . "</legend>\n<table" . $attrib_str . ">\n\n";
// Show checkbox for HTML Editor
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index 08e5eec47..4498b7b32 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -27,6 +27,7 @@ $a_user_prefs = array(
'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE,
'addrbook_show_images' => isset($_POST['_addrbook_show_images']) ? TRUE : FALSE,
'htmleditor' => isset($_POST['_htmleditor']) ? TRUE : FALSE,
+ 'inline_images' => isset($_POST['_inline_images']) ? TRUE : FALSE,
'preview_pane' => isset($_POST['_preview_pane']) ? TRUE : FALSE,
'read_when_deleted' => isset($_POST['_read_when_deleted']) ? TRUE : FALSE,
'flag_for_deletion' => isset($_POST['_flag_for_deletion']) ? TRUE : FALSE,