From bbc8565e5afa7e5352bc3aaf7cf067066ec6d4b1 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Thu, 04 Mar 2010 03:17:04 -0500
Subject: [PATCH] Flag original messages after sending a draft (#1486203)
---
plugins/show_additional_headers/show_additional_headers.php | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/plugins/show_additional_headers/show_additional_headers.php b/plugins/show_additional_headers/show_additional_headers.php
index c31c9df..1cbe690 100644
--- a/plugins/show_additional_headers/show_additional_headers.php
+++ b/plugins/show_additional_headers/show_additional_headers.php
@@ -23,13 +23,16 @@
if ($rcmail->action == 'show' || $rcmail->action == 'preview') {
$this->add_hook('imap_init', array($this, 'imap_init'));
$this->add_hook('message_headers_output', array($this, 'message_headers'));
+ } else if ($rcmail->action == '') {
+ // with enabled_caching we're fetching additional headers before show/preview
+ $this->add_hook('imap_init', array($this, 'imap_init'));
}
}
function imap_init($p)
{
$rcmail = rcmail::get_instance();
- if ($add_headers = $rcmail->config->get('show_additional_headers', array()))
+ if ($add_headers = (array)$rcmail->config->get('show_additional_headers', array()))
$p['fetch_headers'] = trim($p['fetch_headers'].' ' . strtoupper(join(' ', $add_headers)));
return $p;
@@ -38,7 +41,7 @@
function message_headers($p)
{
$rcmail = rcmail::get_instance();
- foreach ($rcmail->config->get('show_additional_headers', array()) as $header) {
+ foreach ((array)$rcmail->config->get('show_additional_headers', array()) as $header) {
$key = strtolower($header);
if ($value = $p['headers']->others[$key])
$p['output'][$key] = array('title' => $header, 'value' => $value);
--
Gitblit v1.9.1