summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-05-28 14:17:57 +0200
committerAleksander Machniak <alec@alec.pl>2012-05-28 14:17:57 +0200
commite349a8c9ae4adfc1aab48a5461902242930da7bf (patch)
tree7938bd47af7bca77b023d1eaf2bf1c1e23a57f0c /program/steps/mail
parent2d7b4ff03fc5a4ee4705698d96ad377b5f81a65c (diff)
Added browser capabilities detection, i.e. PDF and TIFF support
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/func.inc7
-rw-r--r--program/steps/mail/show.inc10
2 files changed, 15 insertions, 2 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 05d589503..fb438c9ed 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -81,8 +81,8 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') {
$OUTPUT->set_env('search_request', $search_request);
}
- $search_mods = $RCMAIL->config->get('search_mods', $SEARCH_MODS_DEFAULT);
- $OUTPUT->set_env('search_mods', $search_mods);
+ $search_mods = $RCMAIL->config->get('search_mods', $SEARCH_MODS_DEFAULT);
+ $OUTPUT->set_env('search_mods', $search_mods);
}
$threading = (bool) $RCMAIL->storage->get_threading();
@@ -115,6 +115,9 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') {
if ($CONFIG['junk_mbox'])
$OUTPUT->set_env('junk_mailbox', $CONFIG['junk_mbox']);
+ if (!empty($_SESSION['browser_caps']))
+ $OUTPUT->set_env('browser_capabilities', $_SESSION['browser_caps']);
+
if (!$OUTPUT->ajax_call)
$OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash',
'movingmessage', 'copyingmessage', 'deletingmessage', 'markingmessage',
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index 2d4d8e5a5..a104880ca 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -21,6 +21,16 @@
$PRINT_MODE = $RCMAIL->action=='print' ? TRUE : FALSE;
+// Read browser capabilities and store them in session
+if ($caps = get_input_value('_caps', RCUBE_INPUT_GET)) {
+ $browser_caps = array();
+ foreach (explode(',', $caps) as $cap) {
+ $cap = explode('=', $cap);
+ $browser_caps[$cap[0]] = $cap[1];
+ }
+ $_SESSION['browser_caps'] = $browser_caps;
+}
+
// similar code as in program/steps/mail/get.inc
if ($uid = get_input_value('_uid', RCUBE_INPUT_GET)) {
$MESSAGE = new rcube_message($uid);